Skip to content

Commit ebde4d4

Browse files
committed
build: support static libclosure builds
While we are still undecided on the state of libclosure (whether it should be supported as a dynamic-only linked dependency or whether we should support statically linking against the library), tweak the build to support the static builds on Windows.
1 parent 7b1423e commit ebde4d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/BlocksRuntime/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ if(WIN32)
99
if(NOT BUILD_SHARED_LIBS)
1010
target_compile_definitions(BlocksRuntime PRIVATE
1111
BlocksRuntime_STATIC)
12+
target_compile_options(BlocksRuntime PUBLIC
13+
"$<$<COMPILE_LANGUAGE:C,CXX>:SHELL:$<$<BOOL:${MSVC}>:-Xclang >-static-libclosure>"
14+
$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -static-libclosure>)
1215
endif()
1316
endif()
1417

0 commit comments

Comments
 (0)