Files
WallReel/CMakeLists.txt
T
Uyanide 740411f194
Release / Build ArchLinux Package (push) Successful in 1m0s
Release / Publish to Gitea Release (push) Successful in 3s
Release / Publish to AUR (push) Successful in 9s
🐛 fix: correct behaviour of --disable-actions
2026-03-24 12:48:01 +01:00

93 lines
2.4 KiB
CMake

cmake_minimum_required(VERSION 3.16)
project(WallReel VERSION 2.0.2 LANGUAGES CXX)
set(EXECUTABLE_NAME "wallreel")
set(CORELIB_NAME "wallreel-core")
set(UILIB_NAME "wallreel-ui")
set(COREMODULE_URI "WallReel.Core")
set(UIMODULE_URI "WallReel.UI")
set(MODULE_VERSION_MAJOR 1)
set(MODULE_VERSION_MINOR 0)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 23)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Release")
add_definitions(-DSUPPRESS_QRC_LOG)
endif()
configure_file(WallReel/version.h.in ${CMAKE_BINARY_DIR}/generated/version.h)
find_package(Qt6 REQUIRED COMPONENTS Quick Widgets QuickControls2 Concurrent Sql)
qt_standard_project_setup(REQUIRES 6.4)
if(COMMAND qt_policy)
qt_policy(SET QTP0001 NEW)
qt_policy(SET QTP0004 NEW)
endif()
option(BUILD_TESTING "Build the testing tree." ON)
option(ADDRESS_SANITIZER "Enable Address Sanitizer for debugging." OFF)
add_subdirectory(WallReel/Core)
add_subdirectory(WallReel/UI)
if(ADDRESS_SANITIZER)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -g")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
endif()
add_executable(${EXECUTABLE_NAME}
WallReel/main.cpp
)
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
# If you are developing for iOS or macOS you should consider setting an
# explicit, fixed bundle identifier manually though.
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
# MACOSX_BUNDLE_GUI_IDENTIFIER com.example.wallpaper-carousel
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)
target_link_libraries(${EXECUTABLE_NAME} PRIVATE
${CORELIB_NAME}
${CORELIB_NAME}plugin
${UILIB_NAME}
${UILIB_NAME}plugin
${UILIB_NAME}_Pages
${UILIB_NAME}_Pagesplugin
${UILIB_NAME}_Modules
${UILIB_NAME}_Modulesplugin
${UILIB_NAME}_Components
${UILIB_NAME}_Componentsplugin
)
target_include_directories(${EXECUTABLE_NAME} PRIVATE
${CMAKE_BINARY_DIR}/generated
)
include(GNUInstallDirs)
install(TARGETS ${EXECUTABLE_NAME}
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
add_subdirectory(WallReel/Assets)