forked from huqingyu/sqq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
69 lines (53 loc) · 2.02 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
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
cmake_minimum_required(VERSION 2.6)
project(Qtqq)
set(version 0.8.2-alpha)
INCLUDE(FindX11)
find_package(Qt4 REQUIRED)
set(DESTINATION /usr/local/qtqq)
set(HAVE_X11_EXTENSIONS_SHAPE_H ${X11_Xshape_FOUND})
set(HAVE_X11_EXTENSIONS_XFIXES_H ${X11_Xfixes_FOUND})
# uninstall target
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
include(CheckIncludeFiles)
include(FindPkgConfig)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
if (NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr")
endif()
set(package ${PROJECT_NAME})
if ( CMAKE_BUILD_TYPE MATCHES "Debug" )
set(DEBUG_MODE 1)
set(prefix ${PROJECT_SOURCE_DIR})
set(pkgdatadir ${prefix}/data)
set(PLUGIN_DIR ${CMAKE_CURRENT_BINARY_DIR}/lib/plugins)
else ()
set(prefix ${CMAKE_INSTALL_PREFIX})
set(pkgdatadir ${prefix}/share/${package})
set(PLUGIN_DIR ${prefix}/lib/${PROJECT_NAME}/plugins)
endif ()
set(bindir ${prefix}/bin)
set(libdir ${prefix}/lib)
set(includedir ${prefix}/include)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(PLUGIN_LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH}/plugins)
configure_file(${PROJECT_SOURCE_DIR}/config.h.in ${PROJECT_BINARY_DIR}/config.h)
configure_file(${PROJECT_SOURCE_DIR}/config-ksnapshot.h.cmake ${PROJECT_BINARY_DIR}/config-ksnapshot.h)
include_directories(${PROJECT_BINARY_DIR})
set(THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty)
set(LOG4QT_INCLUDE_DIR ${THIRD_PARTY_DIR}/log4qt/src)
set(QXGS_INCLUDE_DIR ${THIRD_PARTY_DIR}/qxtglobalshortcut)
set(JSONCPP_INCLUDE_DIR ${THIRD_PARTY_DIR}/jsoncpp/include)
set(TRANSLATIONS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data/translations)
add_subdirectory(cmake)
add_subdirectory(3rdparty)
add_subdirectory(data)
add_subdirectory(src)