Skip to content

Commit

Permalink
Rename to MUSE_MODULE_MUSESAMPLER_LOAD_IN_DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
cbjeukendrup committed Dec 23, 2024
1 parent ae3922d commit 93c7c6d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/app/appfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,15 @@ std::shared_ptr<muse::IApplication> AppFactory::newGuiApp(const CmdOptions& opti
app->addModule(new muse::mpe::MpeModule());

#ifdef MUSE_MODULE_MUSESAMPLER
bool needAdd = true;
#ifndef MUSE_MODULE_MUSESAMPLER_ENABLE_DEBUG
bool shouldAddMuseSamplerModule = true;
#ifndef MUSE_MODULE_MUSESAMPLER_LOAD_IN_DEBUG
if (runtime::isDebug()) {
needAdd = false;
LOGI() << "Muse Sampler is not a debuggable binary. Skipping adding.";
shouldAddMuseSamplerModule = false;
LOGI() << "Not adding MuseSampler module in a debug build";
}
#endif

if (needAdd) {
if (shouldAddMuseSamplerModule) {
app->addModule(new muse::musesampler::MuseSamplerModule());
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/framework/cmake/MuseDeclareOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ declare_muse_module_opt(MPE ON)
declare_muse_module_opt(MULTIINSTANCES ON)

declare_muse_module_opt(MUSESAMPLER ON)
option(MUSE_MODULE_MUSESAMPLER_ENABLE_DEBUG "Enable musesampler debug support" OFF)
option(MUSE_MODULE_MUSESAMPLER_LOAD_IN_DEBUG "Load MuseSampler module in debug builds" OFF)

declare_muse_module_opt(NETWORK ON)
option(MUSE_MODULE_NETWORK_WEBSOCKET "Enable websocket support" OFF)
Expand Down
1 change: 1 addition & 0 deletions src/framework/cmake/muse_framework_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
#cmakedefine MUSE_MODULE_MUSESAMPLER 1
#cmakedefine MUSE_MODULE_MUSESAMPLER_TESTS 1
#cmakedefine MUSE_MODULE_MUSESAMPLER_API 1
#cmakedefine MUSE_MODULE_MUSESAMPLER_LOAD_IN_DEBUG 1

#cmakedefine MUSE_MODULE_NETWORK 1
#cmakedefine MUSE_MODULE_NETWORK_TESTS 1
Expand Down
4 changes: 0 additions & 4 deletions src/framework/musesampler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,4 @@ set(MODULE_SRC
${CMAKE_CURRENT_LIST_DIR}/internal/musesampleractioncontroller.h
)

if(MUSE_MODULE_MUSESAMPLER_ENABLE_DEBUG)
set(MODULE_DEF -DMUSE_MODULE_MUSESAMPLER_ENABLE_DEBUG)
endif()

setup_module()

0 comments on commit 93c7c6d

Please sign in to comment.