File tree Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 194194# endif
195195#else
196196# if defined(_WIN32)
197- # if defined(dispatch_EXPORT) || defined(__DISPATCH_BUILDING_DISPATCH__ )
197+ # if defined(dispatch_EXPORTS )
198198# define DISPATCH_EXPORT DISPATCH_EXTERN __declspec (dllexport)
199199# else
200200# define DISPATCH_EXPORT DISPATCH_EXTERN __declspec (dllimport)
Original file line number Diff line number Diff line change @@ -7,8 +7,11 @@ if(WIN32)
77 BlocksRuntime.def)
88
99 if (NOT BUILD_SHARED_LIBS )
10- target_compile_definitions (BlocksRuntime PRIVATE
10+ target_compile_definitions (BlocksRuntime PUBLIC
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 ()
1316endif ()
1417
Original file line number Diff line number Diff line change @@ -92,6 +92,10 @@ target_include_directories(dispatch PUBLIC
9292target_include_directories (dispatch PRIVATE
9393 ${PROJECT_SOURCE_DIR} /private )
9494
95+ if (NOT BUILD_SHARED_LIBS )
96+ target_compile_definitions (dispatch PUBLIC
97+ dispatch_STATIC)
98+ endif ()
9599if (WIN32 )
96100 target_compile_definitions (dispatch PRIVATE
97101 _CRT_NONSTDC_NO_WARNINGS
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ add_library(bsdtests
2323 STATIC
2424 bsdtests.c
2525 dispatch_test.c)
26+ target_link_libraries (bsdtests PUBLIC
27+ dispatch)
2628target_include_directories (bsdtests
2729 PRIVATE
2830 ${CMAKE_CURRENT_BINARY_DIR}
You can’t perform that action at this time.
0 commit comments