new_alterator/CMakeLists.txt

60 lines
1.9 KiB
CMake
Raw Normal View History

2022-07-05 15:20:23 +03:00
cmake_minimum_required(VERSION 3.14)
2022-07-12 18:55:20 +03:00
project(new_alterator
LANGUAGES CXX
VERSION 0.1
DESCRIPTION "Front end of new alterator")
set(CMAKE_DEBUG_POSTFIX d)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2022-07-13 18:16:48 +03:00
set(CMAKE_INSTALL_PREFIX
"/home/SMB.BASEALT.RU/kozyrevid/work/new_alterator/install")
set(@build_type@ ${CMAKE_BUILD_TYPE})
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
2022-07-13 18:16:48 +03:00
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Quick QuickWidgets DBus)
2022-07-13 18:16:48 +03:00
set(SOURCES
${CMAKE_SOURCE_DIR}/src/dist_info.cpp
${CMAKE_SOURCE_DIR}/src/main.cpp)
2022-07-12 18:55:20 +03:00
2022-07-13 18:16:48 +03:00
set(HEADERS
${CMAKE_SOURCE_DIR}/include/dist_info.h)
2022-07-12 18:55:20 +03:00
2022-07-13 18:16:48 +03:00
set(RESOURCES
${CMAKE_SOURCE_DIR}/resources/wiki_logo.svg
${CMAKE_SOURCE_DIR}/resources/DistInfo.qml
${CMAKE_SOURCE_DIR}/resources/Test.qml
${CMAKE_SOURCE_DIR}/resources/resources.qrc)
2022-07-12 18:55:20 +03:00
2022-07-13 18:16:48 +03:00
set(SHARED
${CMAKE_SOURCE_DIR}/shared/AlteratorWindow.qml
${CMAKE_SOURCE_DIR}/shared/AlteratorToolBar.qml
${CMAKE_SOURCE_DIR}/shared/TextWithHeader.qml
${CMAKE_SOURCE_DIR}/shared/shared.qrc
${CMAKE_SOURCE_DIR}/shared/qmldir)
2022-07-12 18:55:20 +03:00
2022-07-13 18:16:48 +03:00
add_executable(new_alterator
${CMAKE_SOURCE_DIR}/shared/shared.qrc
${CMAKE_SOURCE_DIR}/resources/resources.qrc
${CMAKE_SOURCE_DIR}/src/dist_info.cpp
${CMAKE_SOURCE_DIR}/include/dist_info.h
${CMAKE_SOURCE_DIR}/src/main.cpp)
2022-07-12 18:55:20 +03:00
2022-07-13 18:16:48 +03:00
configure_file(alterator_loader_config.h.in alterator/alterator_loader_config.h)
2022-07-12 18:55:20 +03:00
2022-07-13 18:16:48 +03:00
add_subdirectory(alterator)
2022-07-12 18:55:20 +03:00
set_target_properties(new_alterator PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
2022-07-13 18:16:48 +03:00
target_link_libraries(new_alterator PUBLIC alteratorlib)
target_link_libraries(new_alterator INTERFACE
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Quick
Qt${QT_VERSION_MAJOR}::QuickWidgets
2022-07-12 18:55:20 +03:00
Qt${QT_VERSION_MAJOR}::DBus)
2022-07-13 18:16:48 +03:00
install(TARGETS new_alterator DESTINATION bin)