Add option to enable/disable amuse-gui

This commit is contained in:
Phillip Stephens 2023-01-11 12:49:43 -08:00
parent 101746f268
commit bc1e04b116
1 changed files with 8 additions and 2 deletions

View File

@ -21,6 +21,8 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boo AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}
add_subdirectory(athena) add_subdirectory(athena)
endif() endif()
option(AMUSE_BUILD_EDITOR "Build Amuse with editor enabled (includes VST)" OFF)
add_library(amuse add_library(amuse
lib/AudioGroup.cpp lib/AudioGroup.cpp
lib/AudioGroupData.cpp lib/AudioGroupData.cpp
@ -164,10 +166,14 @@ if(TARGET boo AND NOT WINDOWS_STORE AND NOT NX)
# Editor # Editor
find_package(Qt6 COMPONENTS Widgets PATHS /usr/local/opt/qt) find_package(Qt6 COMPONENTS Widgets PATHS /usr/local/opt/qt)
if (Qt6Widgets_FOUND) if (Qt6Widgets_FOUND AND AMUSE_BUILD_EDITOR)
message(STATUS "Qt6 found, amuse-gui will be built") message(STATUS "Qt6 found, amuse-gui will be built")
add_subdirectory(Editor) add_subdirectory(Editor)
else() else()
message(STATUS "Qt6 not found, amuse-gui will not be built") if (NOT AMUSE_BUILD_EDITOR)
message(STATUS "amuse-gui has been disabled and will not be built, to enable pass `-DAMUSE_BUILD_EDITOR=ON` to cmake")
else()
message(STATUS "Qt6 not found, amuse-gui will not be built")
endif()
endif() endif()
endif() endif()