forked from bcdev/epr-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
68 lines (49 loc) · 1.93 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
# Copyright (c) 2013 Antonio Valentino <antonio.valentino@tiscali.it>
cmake_minimum_required(VERSION 2.8)
project(epr-api)
# set version number
set(EPR_API_VERSION_MAJOR 2)
set(EPR_API_VERSION_MINOR 3)
set(EPR_API_VERSION_PATCH 0)
set(EPR_API_VERSION_STRING
"${EPR_API_VERSION_MAJOR}.${EPR_API_VERSION_MINOR}.${EPR_API_VERSION_PATCH}")
# options
option(BUILD_STATIC_LIB "build the static version of the library" ON)
option(BUILD_TESTS "build test programs" OFF)
option(BUILD_DOCS "build Doxygen documentation" OFF)
option(DISABLE_SYMBOL_CONTROL
"Do not try to control symbols that are exported by the dynamic library.
This option can be used to fix some build issue with non standard linkers."
OFF)
# testing
enable_testing()
# sub-directories
add_subdirectory(src)
if(BUILD_TESTS)
add_subdirectory(bccunit)
endif(BUILD_TESTS)
if(BUILD_DOCS)
add_subdirectory(docs)
endif(BUILD_DOCS)
# uninstall target
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/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)
# packaging
include(InstallRequiredSystemLibraries)
set(CPACK_GENERATOR TGZ ZIP STGZ)
set(CPACK_SOURCE_GENERATOR TGZ ZIP)
set(CPACK_PACKAGE_VERSION_MAJOR ${EPR_API_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${EPR_API_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${EPR_API_VERSION_PATCH})
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.txt")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"Delft object-oriented radar interferometric software")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
set(CPACK_SOURCE_IGNORE_FILES "/build.*;.*~;\\\\.git.*;\\\\.user$;\\\\.DS_Store")
set(CPACK_STRIP_FILES TRUE)
set(CPACK_SOURCE_STRIP_FILES TRUE)
include(CPack)