1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00
ScreenPlay/ScreenPlayWidget/CMakeLists.txt

35 lines
1009 B
CMake
Raw Normal View History

2020-10-29 18:53:52 +01:00
project(ScreenPlayWidget LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)
find_package(
2020-10-29 18:53:52 +01:00
Qt5
COMPONENTS Quick Widgets Gui QuickCompiler WebEngine
REQUIRED)
2020-10-29 18:53:52 +01:00
set(src main.cpp src/widgetwindow.cpp)
2020-10-29 18:53:52 +01:00
set(headers src/widgetwindow.h)
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
set(resources SPWidgetResources.qrc)
else()
2020-10-29 18:53:52 +01:00
qtquick_compiler_add_resources(resources SPWidgetResources.qrc)
endif()
2020-05-16 13:40:38 +02:00
add_executable(${PROJECT_NAME} ${src} ${headers} ${resources})
2021-01-16 17:31:07 +01:00
if(WIN32)
2021-01-16 17:57:36 +01:00
# Disable console window on Windows
# https://stackoverflow.com/questions/8249028/how-do-i-keep-my-qt-c-program-from-opening-a-console-in-windows
set_property(TARGET ${PROJECT_NAME} PROPERTY WIN32_EXECUTABLE true)
2021-01-16 17:31:07 +01:00
endif()
if(APPLE)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE true)
endif()
2021-05-12 17:33:17 +02:00
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Quick Qt5::Gui Qt5::Widgets Qt5::Core ScreenPlaySDK ScreenPlayUtil)