-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
57 lines (38 loc) · 1.23 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
cmake_minimum_required( VERSION 3.15)
project( MulleFoundation-startup VERSION 0.20.5 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)
### Library
if( HEADERS_PHASE)
if( NOT COMPILE_PHASE AND NOT LINK_PHASE)
return()
endif()
endif()
if( BUILD_SHARED_LIBS)
message( FATAL_ERROR "Startup library must be built static")
endif()
# this is an option
set( CREATE_OBJC_LOADER_INC OFF)
if( LINK_PHASE)
include( Dependencies OPTIONAL)
endif()
unset( STARTUP_LIBRARY_NAME)
include( Library)
# use LIBRARY_COMPILE_TARGET for compiler options
target_compile_definitions( "${LIBRARY_COMPILE_TARGET}" PUBLIC)
target_compile_options( "${LIBRARY_COMPILE_TARGET}" PUBLIC -Wall)
# use LIBRARY_LINK_TARGET for linker options
if( LINK_PHASE)
target_link_options( "${LIBRARY_LINK_TARGET}" PUBLIC)
endif()
include( InstallLibrary)
if( LINK_PHASE)
include( InstallCMakeInclude)
include( InstallCMakePackage)
endif()
include( FinalOutput OPTIONAL)