File tree Expand file tree Collapse file tree 6 files changed +20
-0
lines changed Expand file tree Collapse file tree 6 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ if(ENABLE_TESTING)
55
55
add_subdirectory (TestFoundation )
56
56
endif ()
57
57
58
+ add_subdirectory (cmake/modules )
59
+
58
60
# TODO(compnerd) install as a Framework as that is how swift actually is built
59
61
install (DIRECTORY
60
62
${CMAKE_CURRENT_BINARY_DIR} /CoreFoundation.framework/Headers/
Original file line number Diff line number Diff line change @@ -234,6 +234,8 @@ set_target_properties(FoundationXML PROPERTIES
234
234
Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR} /swift
235
235
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_BINARY_DIR} /swift )
236
236
237
+ set_property (GLOBAL APPEND PROPERTY Foundation_EXPORTS
238
+ Foundation FoundationNetworking FoundationXML )
237
239
get_swift_host_arch (swift_arch )
238
240
install (TARGETS Foundation FoundationNetworking FoundationXML
239
241
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
Original file line number Diff line number Diff line change @@ -4,5 +4,6 @@ add_executable(plutil
4
4
target_link_libraries (plutil PRIVATE
5
5
Foundation )
6
6
7
+ set_property (GLOBAL APPEND Foundation_EXPORTS plutil )
7
8
install (TARGETS plutil
8
9
DESTINATION ${CMAKE_INSTALL_BINDIR} )
Original file line number Diff line number Diff line change
1
+
2
+ set (Foundation_EXPORTS_FILE ${CMAKE_CURRENT_BINARY_DIR} /FoundationExports.cmake )
3
+ configure_file (FoundationConfig.cmake.in
4
+ ${CMAKE_CURRENT_BINARY_DIR} /FoundationConfig.cmake )
5
+
6
+ get_property (Foundation_EXPORTS GLOBAL PROPERTY Foundation_EXPORTS )
7
+ export (TARGETS ${Foundation_EXPORTS} FILE ${Foundation_EXPORTS_FILE} )
Original file line number Diff line number Diff line change
1
+
2
+ if (NOT TARGET Foundation )
3
+ include (@Foundation_EXPORTS_FILE@ )
4
+ endif ()
Original file line number Diff line number Diff line change @@ -20,3 +20,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Windows)
20
20
endif ()
21
21
set_target_properties (uuid PROPERTIES
22
22
POSITION_INDEPENDENT_CODE YES )
23
+
24
+ if (NOT BUILD_SHARED_LIBS )
25
+ set_property (GLOBAL APPEND PROPERTY Foundation_EXPORTS uuid )
26
+ endif ()
You can’t perform that action at this time.
0 commit comments