diff --git a/src/olympic/applib/applib.cpp b/src/olympic/applib/applib.cpp index 977d80a7..fdca8e77 100644 --- a/src/olympic/applib/applib.cpp +++ b/src/olympic/applib/applib.cpp @@ -17,6 +17,14 @@ #define OLYMPIC_PROJECT_DATADIR ".keel" #endif +#ifndef OLYMPIC_LOAD_KEEL_MODULES +#define OLYMPIC_LOAD_KEEL_MODULES 1 +#endif + +#ifndef OLYMPIC_LOAD_STUDIO_MODULES +#define OLYMPIC_LOAD_STUDIO_MODULES 0 +#endif + ox::Error run( ox::StringView appName, ox::StringView projectDataDir, @@ -41,8 +49,12 @@ int WinMain() { int main(int argc, const char **argv) { #endif OX_INIT_DEBUG_LOGGER(loggerConn, olympic::appName()) +#if OLYMPIC_LOAD_KEEL_MODULES OLYMPIC_PROJECT_NAMESPACE::registerKeelModules(); +#endif +#if OLYMPIC_LOAD_STUDIO_MODULES OLYMPIC_PROJECT_NAMESPACE::registerStudioModules(); +#endif auto const err = run(olympic::appName(), OLYMPIC_PROJECT_DATADIR, argc, argv); oxAssert(err, "Something went wrong..."); if (err) { diff --git a/src/studio/applib/src/CMakeLists.txt b/src/studio/applib/src/CMakeLists.txt index 419e5d02..b9c1d765 100644 --- a/src/studio/applib/src/CMakeLists.txt +++ b/src/studio/applib/src/CMakeLists.txt @@ -9,7 +9,10 @@ add_library( projecttreemodel.cpp studioapp.cpp ) - +target_compile_definitions( + StudioAppLib PUBLIC + OLYMPIC_LOAD_STUDIO_MODULES=1 +) target_link_libraries( StudioAppLib PUBLIC OxClArgs