[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"
|
#define OLYMPIC_PROJECT_DATADIR ".keel"
|
||||||
#endif
|
#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::Error run(
|
||||||
ox::StringView appName,
|
ox::StringView appName,
|
||||||
ox::StringView projectDataDir,
|
ox::StringView projectDataDir,
|
||||||
@ -41,8 +49,12 @@ int WinMain() {
|
|||||||
int main(int argc, const char **argv) {
|
int main(int argc, const char **argv) {
|
||||||
#endif
|
#endif
|
||||||
OX_INIT_DEBUG_LOGGER(loggerConn, olympic::appName())
|
OX_INIT_DEBUG_LOGGER(loggerConn, olympic::appName())
|
||||||
|
#if OLYMPIC_LOAD_KEEL_MODULES
|
||||||
OLYMPIC_PROJECT_NAMESPACE::registerKeelModules();
|
OLYMPIC_PROJECT_NAMESPACE::registerKeelModules();
|
||||||
|
#endif
|
||||||
|
#if OLYMPIC_LOAD_STUDIO_MODULES
|
||||||
OLYMPIC_PROJECT_NAMESPACE::registerStudioModules();
|
OLYMPIC_PROJECT_NAMESPACE::registerStudioModules();
|
||||||
|
#endif
|
||||||
auto const err = run(olympic::appName(), OLYMPIC_PROJECT_DATADIR, argc, argv);
|
auto const err = run(olympic::appName(), OLYMPIC_PROJECT_DATADIR, argc, argv);
|
||||||
oxAssert(err, "Something went wrong...");
|
oxAssert(err, "Something went wrong...");
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@ -9,7 +9,10 @@ add_library(
|
|||||||
projecttreemodel.cpp
|
projecttreemodel.cpp
|
||||||
studioapp.cpp
|
studioapp.cpp
|
||||||
)
|
)
|
||||||
|
target_compile_definitions(
|
||||||
|
StudioAppLib PUBLIC
|
||||||
|
OLYMPIC_LOAD_STUDIO_MODULES=1
|
||||||
|
)
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
StudioAppLib PUBLIC
|
StudioAppLib PUBLIC
|
||||||
OxClArgs
|
OxClArgs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user