forked from PCMan/lxqt-settings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
55 lines (43 loc) · 1.04 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
cmake_minimum_required(VERSION 2.8.6)
project(liblxqt-settings)
if(NOT CMAKE_BUILD_TYPE)
set( CMAKE_BUILD_TYPE Release )
endif(NOT CMAKE_BUILD_TYPE)
if(CMAKE_BUILD_TYPE MATCHES [Dd]ebug)
message(STATUS "Debug build")
add_definitions(-DDEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0")
set(CMAKE_VERBOSE TRUE)
else()
message(STATUS "Release build")
add_definitions(-DNDEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
endif()
find_package(Qt4 REQUIRED)
set(CMAKE_AUTOMOC TRUE)
find_package(PkgConfig REQUIRED)
pkg_check_modules(DCONF REQUIRED
dconf
)
include_directories(
${QT_INCLUDES}
${DCONF_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
set(CMAKE_CXX_FLAGS "-DQT_NO_KEYWORDS -fno-exceptions")
set(liblxqt-settings_SRCS
liblxqt-settings.cpp
main.cpp
)
qt4_automoc(${liblxqt-settings_SRCS})
add_executable(liblxqt-settings
${liblxqt-settings_SRCS}
)
target_link_libraries(liblxqt-settings
${QT_QTCORE_LIBRARY}
${DCONF_LIBRARIES}
)
install(TARGETS
liblxqt-settings
RUNTIME DESTINATION bin
)