-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
executable file
·84 lines (60 loc) · 2.11 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
cmake_minimum_required( VERSION 3.14)
project( mulle-objc-runtime VERSION 0.25.0 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( CCompiler)
include( Files)
### Library
if( HEADERS_PHASE)
install( FILES ${INSTALL_PUBLIC_HEADERS} DESTINATION "include/${PROJECT_NAME}")
install( FILES ${INSTALL_PRIVATE_HEADERS} DESTINATION "include/${PROJECT_NAME}")
install( FILES ${INSTALL_CMAKE_INCLUDES} DESTINATION "include/${PROJECT_NAME}/cmake")
# short cut out
if( NOT COMPILE_PHASE AND NOT LINK_PHASE)
return()
endif()
endif()
if( LINK_PHASE)
include( Dependencies OPTIONAL)
endif()
include( Library)
message( STATUS "CMAKE_VERSION=${CMAKE_VERSION}")
# use LIBRARY_COMPILE_TARGET for compiler options
if( ${CMAKE_VERSION} VERSION_GREATER "3.14.0")
target_compile_definitions( "${LIBRARY_COMPILE_TARGET}" PUBLIC)
if( NOT MSVC)
target_compile_options( "${LIBRARY_COMPILE_TARGET}" PUBLIC -Wunused)
endif()
# use LIBRARY_LINK_TARGET for linker options
if( LINK_PHASE)
target_link_options( "${LIBRARY_LINK_TARGET}" PUBLIC)
endif()
endif()
include( InstallLibrary)
if( LINK_PHASE)
include( InstallCMakeInclude)
include( InstallCMakePackage)
endif()
set( EXECUTABLE_NAME mulle-objc-uniqueid)
# only need the hash function (done like this if runtime is built as shared)
set( EXECUTABLE_SOURCES ${UNIQUEID_SOURCES}
src/mulle-objc-uniqueid.c
)
set( EXECUTABLE_DEPENDENCY_NAMES
mulle-objc-runtime)
# only need the hash function
set( EXECUTABLE_LIBRARY_LIST "${MULLE__CORE_LIBRARY}")
include( Executable)
set( EXECUTABLE_NAME mulle-objc-signature)
# only need the signature function
set( EXECUTABLE_SOURCES ${SIGNATURE_SOURCES}
src/mulle-objc-signature.c)
set( EXECUTABLE_LIBRARY_LIST "")
set( EXECUTABLE_DEPENDENCY_NAMES "")
include( Executable)
include( InstallExecutable)
include( FinalOutput OPTIONAL)