-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
44 lines (32 loc) · 1.26 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
cmake_minimum_required(VERSION 2.8.11)
# Project properties
project(GdbCrashHandler)
set(GDBCH_VERSION 0.3.0)
# Soname
# MAJOR is incremented when symbols are removed or changed in an incompatible way
# MINOR is incremented when new symbols are added
set(GDBCH_LIB_MAJOR 1)
set(GDBCH_LIB_MINOR 0)
# Variables
set(LIB_INSTALL_DIR lib${LIB_SUFFIX} CACHE PATH "Library installation dir")
set(INCLUDE_INSTALL_DIR include CACHE PATH "Header installation dir")
string(REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}/" "" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR})
string(REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}/" "" PC_LIB_DIR ${LIB_INSTALL_DIR} )
# Dependencies
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5LinguistTools REQUIRED)
find_package(QuaZip-Qt5 REQUIRED)
set(CMAKE_AUTOMOC ON)
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_TOLOWER)
if(NOT CMAKE_BUILD_TYPE_TOLOWER MATCHES "debug")
add_definitions(-DQT_NO_DEBUG_OUTPUT)
endif()
# Subdirectories
add_subdirectory(lib)
add_subdirectory(example)
# Dist
ADD_CUSTOM_TARGET(dist
COMMAND git archive --format=tar --prefix=${CMAKE_PROJECT_NAME}-${GDBCH_VERSION}/ HEAD | xz > ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${GDBCH_VERSION}.tar.xz
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)