1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-06 19:12:30 +01:00
ScreenPlay/ScreenPlayWeather/CMakeLists.txt
2022-03-12 14:36:03 +01:00

50 lines
1.4 KiB
CMake

project(
ScreenPlayWeather
VERSION 0.1
LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
find_package(
Qt6 6.2
COMPONENTS Core Quick
REQUIRED)
# Because this is a plugin, we need this for testing and development. This can be disabled when using the plugin in your project directly.
option(tst_ScreenPlayWeather "Builds TextProject" ON)
set(QML # cmake-format: sortable
src/TestMain.qml)
set(QML_PLUGIN_SOURCES # cmake-format: sortable
src/screenplayweather.cpp)
set(QML_PLUGIN_HEADER # cmake-format: sortable
src/day.h src/screenplayweather.h)
qt_add_library(${PROJECT_NAME} STATIC)
target_link_libraries(${PROJECT_NAME} PUBLIC ScreenPlayUtil)
target_include_directories(${PROJECT_NAME} PUBLIC src/)
qt_add_qml_module(
${PROJECT_NAME}
URI
${PROJECT_NAME}
OUTPUT_DIRECTORY
${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME}
VERSION
1.0
QML_FILES
${QML}
SOURCES
${QML_PLUGIN_SOURCES}
${QML_PLUGIN_HEADER})
if(${tst_ScreenPlayWeather})
qt_add_executable(tst_ScreenPlayWeather src/TestMain.cpp)
target_link_libraries(tst_ScreenPlayWeather PRIVATE Qt6::Quick ${PROJECT_NAME}plugin)
target_compile_definitions(tst_ScreenPlayWeather PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
endif()