-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
80 lines (60 loc) · 1.8 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
cmake_minimum_required(VERSION 3.1.0)
project(Picta-dl_GUI VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(TARGET ${CMAKE_PROJECT_NAME})
find_package(Qt5 COMPONENTS Widgets Network REQUIRED)
include_directories(${Qt5Widgets_INCLUDES} ${Qt5Network_INCLUDES})
add_definitions(${Qt5Widgets_DEFINITIONS})
add_definitions(${Qt5Network_DEFINITIONS})
set(QT5_LIBRARIES Qt5::Widgets Qt5::Network)
set(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
set(SOURCES
main.cpp
RunGuard.cpp
mainwindow.cpp
configuration.cpp
simplecrypt.cpp
information.cpp
)
set(HEADERS
mainwindow.h
RunGuard.h
configuration.h
simplecrypt.h
information.h
)
set(FORMS
mainwindow.ui
configuration.ui
information.ui
)
set(RESOURCES
Resources/images.qrc
Resources/styles.qrc
)
set(RES_MANIFEST
Resources/resManifest.rc
)
if(WIN32)
set_source_files_properties(${RES_MANIFEST} LANGUAGE RC)
list(APPEND RESOURCES ${RES_MANIFEST})
endif(WIN32)
# include(CTest)
# enable_testing()
add_executable(${TARGET} ${HEADERS} ${FORMS} ${SOURCES} ${RESOURCES})
target_link_libraries(${TARGET} ${QT5_LIBRARIES})
if(UNIX)
include(GNUInstallDirs)
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(PROGRAMS picta-dlg DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES picta-dl-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(FILES Resources/Logos/picta-dl-gui.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps)
endif(UNIX)
# set(CPACK_PROJECT_NAME ${PROJECT_NAME})
# set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
# include(CPack)