-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
executable file
·88 lines (72 loc) · 2.6 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
77
78
79
80
81
82
83
84
85
86
87
88
cmake_minimum_required( VERSION 3.14)
project( mulle-allocator VERSION 7.0.1 LANGUAGES C)
### mulle-sde environment
# add cmake module paths to search path
list( INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/share")
list( INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/reflect")
list( INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include( Environment)
include( Files)
# Configure version header
### Library
if( HEADERS_PHASE)
install( FILES ${INSTALL_PUBLIC_HEADERS} DESTINATION "include/mulle-allocator")
install( FILES ${INSTALL_PRIVATE_HEADERS} DESTINATION "include/mulle-allocator")
install( FILES ${INSTALL_CMAKE_INCLUDES} DESTINATION "include/mulle-allocator/cmake")
# short cut out
if( NOT COMPILE_PHASE AND NOT LINK_PHASE)
return()
endif()
endif()
if( LINK_PHASE)
include( Dependencies OPTIONAL)
endif()
include( Library)
include( InstallLibrary)
if( LINK_PHASE)
# we don't need these headers, during compile so fine if we do it during
# link only
include( InstallCMakeInclude)
include( InstallCMakePackage)
# # can do this multiple times
# install( TARGETS ${LIBRARY_NAME}
# EXPORT ${PROJECT_NAME}-targets)
#
#
# target_include_directories( ${LIBRARY_NAME} PUBLIC
# $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
# $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
#
# # Set target properties
# set_target_properties( ${LIBRARY_NAME} PROPERTIES
# VERSION ${PROJECT_VERSION}
# SOVERSION ${PROJECT_VERSION_MAJOR}
# EXPORT_NAME ${PROJECT_NAME})
#
# # Create and install config files
# include( CMakePackageConfigHelpers)
#
# configure_package_config_file(
# cmake/${PROJECT_NAME}-config.cmake.in
# ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
# INSTALL_DESTINATION lib/cmake/${PROJECT_NAME})
#
# configure_file( cmake/${PROJECT_NAME}-config.h.in ${PROJECT_NAME}-config.h)
#
# install( EXPORT ${PROJECT_NAME}-targets
# FILE ${PROJECT_NAME}-targets.cmake
# NAMESPACE ${PROJECT_NAME}::
# DESTINATION lib/cmake/${PROJECT_NAME})
#
# write_basic_package_version_file(
# "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake"
# VERSION ${PROJECT_VERSION}
# COMPATIBILITY SameMajorVersion)
#
# install(FILES
# "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
# "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake"
# DESTINATION lib/cmake/${PROJECT_NAME}
# )
endif()
include( FinalOutput OPTIONAL)