-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
60 lines (45 loc) · 1.35 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
57
58
59
60
cmake_minimum_required(VERSION 3.16.0)
project(qteletextmaker VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt6 COMPONENTS Core Widgets REQUIRED)
qt_standard_project_setup()
add_subdirectory(src/qteletextdecoder)
file (GLOB SOURCES src/qteletextmaker/*.cpp)
qt_add_executable(qteletextmaker ${SOURCES} src/qteletextmaker/actionicons.qrc)
target_link_libraries(qteletextmaker PRIVATE qteletextdecoder Qt::Widgets)
set_target_properties(qteletextmaker PROPERTIES
WIN32_EXECUTABLE ON
)
if(UNIX)
include(GNUInstallDirs)
set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}")
set(DOC_INSTALL_DIR "${CMAKE_INSTALL_DOCDIR}")
set(EXAMPLES_INSTALL_DIR "${DOC_INSTALL_DIR}/examples")
else()
set(BIN_INSTALL_DIR ".")
set(DOC_INSTALL_DIR ".")
set(EXAMPLES_INSTALL_DIR "./examples")
endif()
install(TARGETS qteletextmaker
BUNDLE DESTINATION .
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
)
install(FILES
${CMAKE_CURRENT_LIST_DIR}/README.md
${CMAKE_CURRENT_LIST_DIR}/LICENSE
DESTINATION ${DOC_INSTALL_DIR}
)
install(DIRECTORY
${CMAKE_CURRENT_LIST_DIR}/examples/
DESTINATION ${EXAMPLES_INSTALL_DIR}
)
qt_generate_deploy_app_script(
TARGET qteletextmaker
FILENAME_VARIABLE deploy_script
NO_UNSUPPORTED_PLATFORM_ERROR
)
install(SCRIPT ${deploy_script})