-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
87 lines (70 loc) · 2.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
81
82
83
84
85
86
project(ucl-study-manager)
# Minimal CMAKE version
cmake_minimum_required(VERSION 2.8)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
find_package(Qt5 5.2.0 COMPONENTS Core Concurrent DBus Widgets WebKit WebKitWidgets REQUIRED)
find_library (tar NAMES tar)
set(UCL_STUDY_VERSION_MAJOR 0)
set(UCL_STUDY_VERSION_MINOR 1)
set(UCL_STUDY_VERSION_PATCH 0)
set(UCL_STUDY_VERSION "${UCL_STUDY_VERSION_MAJOR}.${UCL_STUDY_VERSION_MINOR}.${UCL_STUDY_VERSION_PATCH}")
set(CPACK_PACKAGE_VERSION_MAJOR ${QZEITGEIST_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${QZEITGEIST_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${QZEITGEIST_VERSION_PATCH})
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "ucl-study-manager")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
set(CMAKE_INSTALL_PREFIX "/")
#use CPack for packaging code up
include(CPack)
set(ucl_study_manager_HEADERS
study.h
Lib/tarball.h
Model/step.h
Model/part.h
Model/participant.h
Model/uploadjob.h
Services/webviewservice.h
Services/requestservice.h
Services/progressreportservice.h
Services/uploadservice.h
UI/mainwindow.h
Widgets/progressbutton.h
Widgets/progressbarbutton.h
)
set(ucl_study_manager_SRCS
main.cpp
study.cpp
Lib/tarball.cpp
Model/step.cpp
Model/part.cpp
Model/participant.cpp
Model/uploadjob.cpp
Services/webviewservice.cpp
Services/requestservice.cpp
Services/progressreportservice.cpp
Services/uploadservice.cpp
UI/mainwindow.cpp
Widgets/progressbutton.cpp
Widgets/progressbarbutton.cpp
)
set(ucl_study_manager_UIS
mainwindow.ui
uploadingtoolbarform.ui
)
SET(ucl_study_manager_RESOURCES
icons.qrc
)
qt5_wrap_ui(ucl_UIS_H ${ucl_study_manager_UIS})
qt5_add_resources(ucl_study_manager_RESOURCES_RCC ${ucl_study_manager_RESOURCES})
add_executable(ucl-study-manager ${ucl_study_manager_SRCS} ${ucl_UIS_H} ${ucl_study_manager_RESOURCES_RCC} ${ucl_study_manager_HEADERS})
target_link_libraries(ucl-study-manager qzeitgeist5 tar ${QT_QTDBUS_LIBRARIES} ${QT_QTGUI_LIBRARIES} ${QDBUS_LDFLAGS})
qt5_use_modules(ucl-study-manager Core DBus Test Concurrent Widgets WebKitWidgets)
install(FILES ${CMAKE_SOURCE_DIR}/data/ucl-study-manager.desktop DESTINATION usr/share/applications/)
install(FILES ${CMAKE_SOURCE_DIR}/data/ucl-study-manager.png DESTINATION usr/share/pixmaps/)
install(FILES ${CMAKE_SOURCE_DIR}/data/multitasking.conf DESTINATION etc/xdg/UCL/)
install(TARGETS ucl-study-manager DESTINATION usr/bin)