[olympic/applib] Make applib module loading optional
This commit is contained in:
parent
393259a010
commit
6a1e2f7566
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user