Files
SOM/CMakeLists.txt

51 lines
984 B
CMake

cmake_minimum_required(VERSION 3.19)
project(SOM LANGUAGES CXX)
find_package(Qt6 6.5 REQUIRED COMPONENTS Core Widgets)
option(DEV_BUILD "Enable developer-mode build" OFF)
if(DEV_BUILD)
add_compile_definitions(DEV_BUILD=1)
else()
add_compile_definitions(DEV_BUILD=0)
endif()
qt_standard_project_setup()
qt_add_executable(som
WIN32 MACOSX_BUNDLE
src/main.cpp
src/mainwindow.cpp
src/mainwindow.h
src/mainwindow.ui
src/interface.h
)
set_target_properties(som PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/out"
)
target_link_libraries(som
PRIVATE
Qt::Core
Qt::Widgets
)
add_subdirectory(plugins)
include(GNUInstallDirs)
install(TARGETS som
BUNDLE DESTINATION .
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
qt_generate_deploy_app_script(
TARGET som
OUTPUT_SCRIPT deploy_script
NO_UNSUPPORTED_PLATFORM_ERROR
)
install(SCRIPT ${deploy_script})