-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
65 lines (52 loc) · 1.44 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
project(lxrandr-qt)
cmake_minimum_required(VERSION 2.8.6)
# Qt
find_package(Qt4 REQUIRED QtCore QtGui)
# glib using pkg-config
find_package(PkgConfig)
pkg_check_modules(GLIB REQUIRED
glib-2.0
)
# set visibility to hidden to hide symbols, unlesss they're exporeted manually in the code
set(CMAKE_CXX_FLAGS "-DQT_NO_KEYWORDS -fno-exceptions")
include_directories(
${QT_INCLUDES}
${GLIB_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
set(CMAKE_AUTOMOC TRUE)
set(lxrandr-qt_SRCS
lxrandr-qt.cpp
monitorsettingsdialog.cpp
)
set(lxrandr-qt_UIS
lxrandr.ui
monitor.ui
)
qt4_wrap_ui(lxrandr-qt_UI_H
${lxrandr-qt_UIS}
)
add_executable(lxrandr-qt
${lxrandr-qt_SRCS}
${lxrandr-qt_UI_H}
)
target_link_libraries(lxrandr-qt
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${GLIB_LIBRARIES}
)
install(TARGETS lxrandr-qt RUNTIME DESTINATION bin)
# building tarball with CPack -------------------------------------------------
# To create a source distribution, type:
# make package_source
include (InstallRequiredSystemLibraries)
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README")
set (CPACK_PACKAGE_VENDOR "")
set (CPACK_PACKAGE_VERSION_MAJOR "0")
set (CPACK_PACKAGE_VERSION_MINOR "1")
set (CPACK_PACKAGE_VERSION_PATCH "0")
set (CPACK_GENERATOR TBZ2)
set (CPACK_SOURCE_GENERATOR TBZ2)
set (CPACK_SOURCE_IGNORE_FILES /build/;.gitignore;.*~;.git;.kdev4;temp)
include (CPack)