diff options
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | utils/alsoft-config/CMakeLists.txt | 10 |
2 files changed, 13 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e5e03ea..5e25b850 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1058,7 +1058,7 @@ endif() IF(ALSOFT_UTILS AND NOT ALSOFT_NO_CONFIG_UTIL) - add_subdirectory(utils/alsoft-config) + find_package(Qt5Widgets) ENDIF() IF(ALSOFT_EXAMPLES) FIND_PACKAGE(SndFile) @@ -1345,9 +1345,9 @@ if(ALSOFT_UTILS) target_link_libraries(sofa-info PRIVATE ${LINKER_FLAGS} sofa-support) endif() message(STATUS "Building utility programs") - if(TARGET alsoft-config) - set(UTIL_TARGETS ${UTIL_TARGETS} alsoft-config) - message(STATUS "Building configuration program") + + if(NOT ALSOFT_NO_CONFIG_UTIL) + add_subdirectory(utils/alsoft-config) endif() message(STATUS "") diff --git a/utils/alsoft-config/CMakeLists.txt b/utils/alsoft-config/CMakeLists.txt index 3851356b..65a70638 100644 --- a/utils/alsoft-config/CMakeLists.txt +++ b/utils/alsoft-config/CMakeLists.txt @@ -1,6 +1,5 @@ project(alsoft-config) -find_package(Qt5Widgets) if(Qt5Widgets_FOUND) qt5_wrap_ui(UIS mainwindow.ui) @@ -20,4 +19,13 @@ if(Qt5Widgets_FOUND) if(TARGET build_version) add_dependencies(alsoft-config build_version) endif() + + message(STATUS "Building configuration program") + + if(ALSOFT_INSTALL_UTILS) + install(TARGETS alsoft-config + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() endif() |