Skip to content

Commit 02b7d8f

Browse files
authored
Add CMakeLists.txt to Sources/BlocksRuntime
Sources in this directory are unused on most platforms, since Blocks are already included in libdispatch. Platforms, such as WASI, that don't have multi-threading support need to build bundled BlocksRuntime.
1 parent 4aaaa36 commit 02b7d8f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Sources/BlocksRuntime/CMakeLists.txt

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
add_library(BlocksRuntime
2+
data.c
3+
runtime.c)
4+
5+
target_include_directories(BlocksRuntime PUBLIC
6+
${CMAKE_CURRENT_SOURCE_DIR})
7+
8+
set_target_properties(BlocksRuntime PROPERTIES
9+
POSITION_INDEPENDENT_CODE FALSE)
10+
11+
add_library(BlocksRuntime::BlocksRuntime ALIAS BlocksRuntime)
12+
13+
install(TARGETS BlocksRuntime
14+
ARCHIVE DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>
15+
LIBRARY DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>)

0 commit comments

Comments
 (0)