-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
56 lines (50 loc) · 1.32 KB
/
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
47
48
49
50
51
52
53
54
55
56
cmake_minimum_required(VERSION 3.16)
project(qtwebbrowser LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick WebEngineQuick VirtualKeyboard)
set(SOURCES
src/appengine.cpp
src/appengine.h
src/main.cpp
src/navigationhistoryproxymodel.cpp
src/navigationhistoryproxymodel.h
src/touchtracker.cpp
src/touchtracker.h
)
if(NOT CMAKE_CROSSCOMPILING)
list(APPEND SOURCES
src/touchmockingapplication.cpp
src/touchmockingapplication.h
)
endif()
qt_add_resources(SOURCES src/resources.qrc)
qt_add_executable(qtwebbrowser ${SOURCES})
set_target_properties(qtwebbrowser PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
target_link_libraries(qtwebbrowser PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt::WebEngineQuick
Qt::VirtualKeyboard
)
if(NOT CMAKE_CROSSCOMPILING)
target_compile_definitions(qtwebbrowser
PRIVATE DESKTOP_BUILD=1
)
target_link_libraries(qtwebbrowser PRIVATE
Qt::GuiPrivate
)
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr/local/bin")
endif()
else()
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/data/user/qt/qtwebbrowser-app")
endif()
endif()