1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-09 20:42:47 +01:00
ScreenPlay/ScreenPlayWallpaper/CMakeLists.txt

42 lines
1.4 KiB
CMake
Raw Normal View History

2020-10-29 18:53:52 +01:00
project(ScreenPlayWallpaper LANGUAGES CXX)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)
find_package(
2020-10-29 18:53:52 +01:00
Qt5
COMPONENTS Quick Widgets Gui WebEngine QuickCompiler
REQUIRED)
if(WIN32)
2020-10-29 18:53:52 +01:00
set(src_plattform src/windowsdesktopproperties.cpp src/winwindow.cpp)
set(headers_plattform src/windowsdesktopproperties.h src/winwindow.h)
elseif(APPLE)
2020-10-29 18:53:52 +01:00
set(src_plattform src/macintegration.cpp src/macwindow.cpp)
2020-10-31 19:59:46 +01:00
set(headers_plattform src/macintegration.h src/macbridge.h src/macwindow.h src/MacBridge.mm)
elseif(UNIX)
2020-10-29 18:53:52 +01:00
set(src_plattform main.cpp src/linuxwindow.cpp)
set(headers_plattform src/linuxwindow.h)
endif()
2020-10-29 18:53:52 +01:00
set(src main.cpp src/basewindow.cpp)
set(headers src/basewindow.h)
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
set(resources SPWResources.qrc)
else()
2020-10-29 18:53:52 +01:00
qtquick_compiler_add_resources(resources SPWResources.qrc)
endif()
2020-10-29 18:53:52 +01:00
add_executable(${PROJECT_NAME} ${src} ${headers} ${src_plattform} ${headers_plattform} ${resources})
# 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)
2020-10-29 18:53:52 +01:00
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Quick Qt5::Gui Qt5::Widgets Qt5::Core Qt5::WebEngine ScreenPlaySDK)
2020-10-31 19:59:46 +01:00
if(APPLE)
target_link_libraries(${PROJECT_NAME} PRIVATE "-framework Cocoa")
endif()