-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
76 lines (55 loc) · 2.29 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
70
71
72
73
74
75
76
#...............................................................................
#
# This file is part of the ECCKey utility.
#
# ECCKey is distributed under the MIT license.
# For details see accompanying license.txt file,
# the public copy of which is also available at:
# http://tibbo.com/downloads/archive/ecckey/license.txt
#
#...............................................................................
cmake_minimum_required(VERSION 3.16)
project(ecckey)
include(axl_cmake.cmake NO_POLICY_SCOPE)
#. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
set(ECCKEY_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR})
set(ECCKEY_BIN_BASE_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin)
set(ECCKEY_DOC_DIR ${CMAKE_CURRENT_BINARY_DIR}/doc)
set(ECCKEY_PACKAGE_DIR ${CMAKE_CURRENT_BINARY_DIR}/package)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ECCKEY_BIN_BASE_DIR}/${CONFIGURATION_SCG})
set(ECCKEY_INSTALL_BIN_SUBDIR bin)
if(WIN32)
set(ECCKEY_INSTALL_DOC_SUBDIR doc)
set(ECCKEY_INSTALL_LICENSE_SUBDIR license)
else()
set(ECCKEY_INSTALL_DOC_SUBDIR share/${PROJECT_NAME}/doc)
set(ECCKEY_INSTALL_LICENSE_SUBDIR share/${PROJECT_NAME}/license)
endif()
#. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
include(version.cmake)
add_subdirectory(src)
add_subdirectory(doc)
#. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
install(
DIRECTORY license/
DESTINATION ${ECCKEY_INSTALL_LICENSE_SUBDIR}
)
#...............................................................................
set(CPACK_PACKAGE_VERSION_MAJOR ${ECCKEY_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${ECCKEY_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${ECCKEY_VERSION_REVISION})
if(WIN32)
set(CPACK_SOURCE_GENERATOR 7Z)
else()
set(CPACK_SOURCE_GENERATOR TXZ)
endif()
set(CPACK_SOURCE_IGNORE_FILES "/[.];[.]user$;/build/;/ci/;/paths.cmake$")
set(CPACK_SOURCE_PACKAGE_FILE_NAME ${PROJECT_NAME}-${ECCKEY_VERSION_FILE_SUFFIX}-src)
if(APPLE)
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${ECCKEY_VERSION_FILE_SUFFIX}-mac)
else()
string(TOLOWER ${CMAKE_SYSTEM_NAME} OS_NAME)
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${ECCKEY_VERSION_FILE_SUFFIX}-${OS_NAME}-${TARGET_CPU})
endif()
include(CPack)
#...............................................................................