File tree Expand file tree Collapse file tree 27 files changed +134
-2
lines changed Expand file tree Collapse file tree 27 files changed +134
-2
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,11 @@ find_package(ArgumentParser)
44
44
find_package (LLBuild )
45
45
find_package (SwiftDriver )
46
46
find_package (SwiftSystem )
47
+ find_package (SwiftCrypto )
47
48
find_package (TSC )
48
49
# NOTE: these two are required for LLBuild dependencies
49
50
find_package (Threads )
50
51
find_package (SQLite3 )
51
52
52
53
add_subdirectory (Sources )
54
+ add_subdirectory (cmake/modules )
Original file line number Diff line number Diff line change @@ -37,3 +37,8 @@ target_link_libraries(SWBAndroidPlatform PUBLIC
37
37
SWBUtil )
38
38
target_sources (SWBAndroidPlatform PRIVATE
39
39
"${CMAKE_CURRENT_BINARY_DIR} /resource_bundle_accessor.swift" )
40
+
41
+ target_include_directories (SWBAndroidPlatform PUBLIC
42
+ ${CMAKE_CURRENT_BINARY_DIR} )
43
+
44
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBAndroidPlatform )
Original file line number Diff line number Diff line change @@ -75,3 +75,8 @@ target_link_libraries(SWBApplePlatform PUBLIC
75
75
SWBTaskConstruction )
76
76
target_sources (SWBApplePlatform PRIVATE
77
77
"${CMAKE_CURRENT_BINARY_DIR} /resource_bundle_accessor.swift" )
78
+
79
+ target_include_directories (SWBApplePlatform PUBLIC
80
+ ${CMAKE_CURRENT_BINARY_DIR} )
81
+
82
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBApplePlatform )
Original file line number Diff line number Diff line change @@ -37,3 +37,8 @@ target_link_libraries(SWBBuildService PUBLIC
37
37
SWBWebAssemblyPlatform
38
38
SWBWindowsPlatform
39
39
$< $< NOT:$< PLATFORM_ID:Darwin> > :SwiftSystem::SystemPackage> )
40
+
41
+ target_include_directories (SWBBuildService PUBLIC
42
+ ${CMAKE_CURRENT_BINARY_DIR} )
43
+
44
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBBuildService )
Original file line number Diff line number Diff line change @@ -20,3 +20,8 @@ target_link_libraries(SWBBuildServiceBundle PRIVATE
20
20
SWBCore )
21
21
22
22
install (TARGETS SWBBuildServiceBundle )
23
+
24
+ target_include_directories (SWBBuildServiceBundle PUBLIC
25
+ ${CMAKE_CURRENT_BINARY_DIR} )
26
+
27
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBBuildServiceBundle )
Original file line number Diff line number Diff line change @@ -22,3 +22,8 @@ target_link_libraries(SWBBuildSystem PUBLIC
22
22
SWBCore
23
23
SWBTaskConstruction
24
24
SWBTaskExecution )
25
+
26
+ target_include_directories (SWBBuildSystem PUBLIC
27
+ ${CMAKE_CURRENT_BINARY_DIR} )
28
+
29
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBBuildSystem )
Original file line number Diff line number Diff line change @@ -19,3 +19,8 @@ set_target_properties(SWBCAS PROPERTIES
19
19
target_link_libraries (SWBCAS PUBLIC
20
20
SWBUtil
21
21
SWBCSupport )
22
+
23
+ target_include_directories (SWBCAS PUBLIC
24
+ ${CMAKE_CURRENT_BINARY_DIR} )
25
+
26
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBCAS )
Original file line number Diff line number Diff line change @@ -12,3 +12,8 @@ add_library(SWBCLibc
12
12
libc.c )
13
13
target_include_directories (SWBCLibc INTERFACE
14
14
include )
15
+
16
+ target_include_directories (SWBCLibc PUBLIC
17
+ ${CMAKE_CURRENT_BINARY_DIR} )
18
+
19
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBCLibc )
Original file line number Diff line number Diff line change @@ -16,8 +16,15 @@ target_compile_definitions(SWBCSupport PRIVATE
16
16
$< $< PLATFORM_ID:Windows> :_CRT_NONSTDC_NO_WARNINGS> )
17
17
target_compile_options (SWBCSupport PRIVATE
18
18
-fblocks )
19
+ target_link_options (SWBCSupport PUBLIC
20
+ $< $< PLATFORM_ID:Darwin> :-lc++> )
19
21
target_include_directories (SWBCSupport PUBLIC
20
22
${CMAKE_CURRENT_SOURCE_DIR} )
21
23
# TODO(compnerd) wire this up with `find_package`
22
24
target_link_libraries (SWBCSupport PRIVATE
23
25
$< $< NOT:$< PLATFORM_ID:Darwin> > :BlocksRuntime> )
26
+
27
+ target_include_directories (SWBCSupport PUBLIC
28
+ ${CMAKE_CURRENT_BINARY_DIR} )
29
+
30
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBCSupport )
Original file line number Diff line number Diff line change @@ -207,3 +207,8 @@ target_link_libraries(SWBCore PUBLIC
207
207
SwiftDriver )
208
208
target_sources (SWBCore PRIVATE
209
209
"${CMAKE_CURRENT_BINARY_DIR} /resource_bundle_accessor.swift" )
210
+
211
+ target_include_directories (SWBCore PUBLIC
212
+ ${CMAKE_CURRENT_BINARY_DIR} )
213
+
214
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBCore )
Original file line number Diff line number Diff line change @@ -35,3 +35,8 @@ target_link_libraries(SWBGenericUnixPlatform PUBLIC
35
35
SWBUtil )
36
36
target_sources (SWBGenericUnixPlatform PRIVATE
37
37
"${CMAKE_CURRENT_BINARY_DIR} /resource_bundle_accessor.swift" )
38
+
39
+ target_include_directories (SWBGenericUnixPlatform PUBLIC
40
+ ${CMAKE_CURRENT_BINARY_DIR} )
41
+
42
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBGenericUnixPlatform )
Original file line number Diff line number Diff line change @@ -14,5 +14,9 @@ set_target_properties(SWBLLBuild PROPERTIES
14
14
Swift_LANGUAGE_VERSION 6 )
15
15
target_link_libraries (SWBLLBuild PUBLIC
16
16
SWBUtil
17
- $< $< NOT:$< BOOL:${SwiftBuild_USE_LLBUILD_FRAMEWORK} > > :libllbuild>
18
17
$< $< NOT:$< BOOL:${SwiftBuild_USE_LLBUILD_FRAMEWORK} > > :llbuildSwift> )
18
+
19
+ target_include_directories (SWBLLBuild PUBLIC
20
+ ${CMAKE_CURRENT_BINARY_DIR} )
21
+
22
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBLLBuild )
Original file line number Diff line number Diff line change @@ -19,3 +19,8 @@ target_link_libraries(SWBLibc PUBLIC
19
19
# without this explicit configuration.
20
20
target_include_directories (SWBLibc PUBLIC
21
21
${CMAKE_CURRENT_BINARY_DIR} )
22
+
23
+ target_include_directories (SWBLibc PUBLIC
24
+ ${CMAKE_CURRENT_BINARY_DIR} )
25
+
26
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBLibc )
Original file line number Diff line number Diff line change @@ -33,3 +33,5 @@ target_link_libraries(SWBMacro PUBLIC
33
33
34
34
target_include_directories (SWBMacro PUBLIC
35
35
${CMAKE_CURRENT_BINARY_DIR} )
36
+
37
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBMacro )
Original file line number Diff line number Diff line change @@ -20,3 +20,8 @@ set_target_properties(SWBProjectModel PROPERTIES
20
20
Swift_LANGUAGE_VERSION 6 )
21
21
target_link_libraries (SWBProjectModel PUBLIC
22
22
SWBProtocol )
23
+
24
+ target_include_directories (SWBProjectModel PUBLIC
25
+ ${CMAKE_CURRENT_BINARY_DIR} )
26
+
27
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBProjectModel )
Original file line number Diff line number Diff line change @@ -48,3 +48,8 @@ set_target_properties(SWBProtocol PROPERTIES
48
48
Swift_LANGUAGE_VERSION 6 )
49
49
target_link_libraries (SWBProtocol PUBLIC
50
50
SWBUtil )
51
+
52
+ target_include_directories (SWBProtocol PUBLIC
53
+ ${CMAKE_CURRENT_BINARY_DIR} )
54
+
55
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBProtocol )
Original file line number Diff line number Diff line change @@ -37,3 +37,8 @@ target_link_libraries(SWBQNXPlatform PUBLIC
37
37
SWBUtil )
38
38
target_sources (SWBQNXPlatform PRIVATE
39
39
"${CMAKE_CURRENT_BINARY_DIR} /resource_bundle_accessor.swift" )
40
+
41
+ target_include_directories (SWBQNXPlatform PUBLIC
42
+ ${CMAKE_CURRENT_BINARY_DIR} )
43
+
44
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBQNXPlatform )
Original file line number Diff line number Diff line change @@ -18,3 +18,8 @@ set_target_properties(SWBServiceCore PROPERTIES
18
18
Swift_LANGUAGE_VERSION 6 )
19
19
target_link_libraries (SWBServiceCore PUBLIC
20
20
SWBProtocol )
21
+
22
+ target_include_directories (SWBServiceCore PUBLIC
23
+ ${CMAKE_CURRENT_BINARY_DIR} )
24
+
25
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBServiceCore )
Original file line number Diff line number Diff line change @@ -63,3 +63,8 @@ set_target_properties(SWBTaskConstruction PROPERTIES
63
63
target_link_libraries (SWBTaskConstruction PUBLIC
64
64
SWBCore
65
65
SWBUtil )
66
+
67
+ target_include_directories (SWBTaskConstruction PUBLIC
68
+ ${CMAKE_CURRENT_BINARY_DIR} )
69
+
70
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBTaskConstruction )
Original file line number Diff line number Diff line change @@ -82,3 +82,8 @@ target_link_libraries(SWBTaskExecution PUBLIC
82
82
SWBLLBuild
83
83
SWBTaskConstruction
84
84
SWBUtil )
85
+
86
+ target_include_directories (SWBTaskExecution PUBLIC
87
+ ${CMAKE_CURRENT_BINARY_DIR} )
88
+
89
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBTaskExecution )
Original file line number Diff line number Diff line change @@ -42,3 +42,8 @@ target_link_libraries(SWBUniversalPlatform PUBLIC
42
42
SWBUtil )
43
43
target_sources (SWBUniversalPlatform PRIVATE
44
44
"${CMAKE_CURRENT_BINARY_DIR} /resource_bundle_accessor.swift" )
45
+
46
+ target_include_directories (SWBUniversalPlatform PUBLIC
47
+ ${CMAKE_CURRENT_BINARY_DIR} )
48
+
49
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBUniversalPlatform )
Original file line number Diff line number Diff line change @@ -108,5 +108,10 @@ target_link_libraries(SWBUtil PUBLIC
108
108
SWBCSupport
109
109
SWBLibc
110
110
ArgumentParser
111
- $< $< AND:$< NOT:$< PLATFORM_ID:Windows> > ,$< NOT:$< PLATFORM_ID:Darwin> > > :Crypto::Crypto >
111
+ $< $< AND:$< NOT:$< PLATFORM_ID:Windows> > ,$< NOT:$< PLATFORM_ID:Darwin> > > :Crypto>
112
112
$< $< NOT:$< PLATFORM_ID:Darwin> > :SwiftSystem::SystemPackage> )
113
+
114
+ target_include_directories (SWBUtil PUBLIC
115
+ ${CMAKE_CURRENT_BINARY_DIR} )
116
+
117
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBUtil )
Original file line number Diff line number Diff line change @@ -36,3 +36,8 @@ target_link_libraries(SWBWebAssemblyPlatform PUBLIC
36
36
SWBUtil )
37
37
target_sources (SWBWebAssemblyPlatform PRIVATE
38
38
"${CMAKE_CURRENT_BINARY_DIR} /resource_bundle_accessor.swift" )
39
+
40
+ target_include_directories (SWBWebAssemblyPlatform PUBLIC
41
+ ${CMAKE_CURRENT_BINARY_DIR} )
42
+
43
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBWebAssemblyPlatform )
Original file line number Diff line number Diff line change @@ -38,3 +38,8 @@ target_link_libraries(SWBWindowsPlatform PUBLIC
38
38
SWBUtil )
39
39
target_sources (SWBWindowsPlatform PRIVATE
40
40
"${CMAKE_CURRENT_BINARY_DIR} /resource_bundle_accessor.swift" )
41
+
42
+ target_include_directories (SWBWindowsPlatform PUBLIC
43
+ ${CMAKE_CURRENT_BINARY_DIR} )
44
+
45
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SWBWindowsPlatform )
Original file line number Diff line number Diff line change @@ -66,3 +66,8 @@ target_link_libraries(SwiftBuild PUBLIC
66
66
SWBProtocol
67
67
SWBUtil
68
68
SWBProjectModel )
69
+
70
+ target_include_directories (SwiftBuild PUBLIC
71
+ ${CMAKE_CURRENT_BINARY_DIR} )
72
+
73
+ set_property (GLOBAL APPEND PROPERTY SWIFTBUILD_EXPORTS SwiftBuild )
Original file line number Diff line number Diff line change
1
+ set (SWIFTBUILD_EXPORTS_FILE ${CMAKE_CURRENT_BINARY_DIR} /SwiftBuildExports.cmake )
2
+
3
+ configure_file (SwiftBuildConfig.cmake.in
4
+ ${CMAKE_CURRENT_BINARY_DIR} /SwiftBuildConfig.cmake )
5
+
6
+ get_property (SWIFTBUILD_EXPORTS GLOBAL PROPERTY SWIFTBUILD_EXPORTS )
7
+ export (TARGETS ${SWIFTBUILD_EXPORTS}
8
+ NAMESPACE SwiftBuild::
9
+ FILE ${SWIFTBUILD_EXPORTS_FILE} )
Original file line number Diff line number Diff line change
1
+ if (NOT TARGET SwiftBuild::SwiftBuild )
2
+ include (@SWIFTBUILD_EXPORTS_FILE@ )
3
+ endif ()
You can’t perform that action at this time.
0 commit comments