-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
46 lines (32 loc) · 975 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
cmake_minimum_required(VERSION 3.16)
project(project-web VERSION 0.2 LANGUAGES CXX)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
if(WIN32)
list(APPEND CMAKE_PREFIX_PATH "C:\\Qt\\6.7.2\\msvc2019_64")
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_subdirectory(src)
find_package(Qt6 REQUIRED COMPONENTS Widgets Core Gui WebEngineWidgets QuickWidgets)
if(LINUX)
find_package(KF6WindowSystem)
endif()
qt_standard_project_setup()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb")
qt_add_executable(project-web
${SOURCES}
resources.qrc
)
target_link_libraries(project-web PRIVATE Qt6::Widgets Qt6::Core Qt6::Gui Qt6::WebEngineWidgets Qt6::QuickWidgets)
if(LINUX)
target_link_libraries(project-web PRIVATE KF6::WindowSystem)
endif()
set_target_properties(project-web PROPERTIES
WIN32_EXECUTABLE ON
MACOSX_BUNDLE ON
)
if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(project-web)
endif()