1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-06 19:12:30 +01:00
ScreenPlay/ScreenPlayUtil/CMakeLists.txt
Elias Steurer d5276b8169 Add Qt5 and Qt6 compatibility to CMake
Because the WebEngine got renamed we have
to make it this ugly. This will only work with Qt5
for now because Qt6 still breaks things.
2021-07-11 08:27:13 +02:00

27 lines
652 B
CMake

project(ScreenPlayUtil LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)
find_package(
QT NAMES Qt6 Qt5
COMPONENTS Core
REQUIRED)
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS Core
REQUIRED)
set(SOURCES src/util.cpp src/contenttypes.cpp)
set(HEADER inc/public/ScreenPlayUtil/util.h inc/public/ScreenPlayUtil/contenttypes.h inc/public/ScreenPlayUtil/projectfile.h)
add_library(${PROJECT_NAME} STATIC ${SOURCES} ${HEADER})
target_include_directories(
${PROJECT_NAME}
PUBLIC inc/public/
PRIVATE src/)
target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Core)