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 194
194
# endif
195
195
#else
196
196
# if defined(_WIN32)
197
- # if defined(dispatch_EXPORT) || defined(__DISPATCH_BUILDING_DISPATCH__ )
197
+ # if defined(dispatch_EXPORTS )
198
198
# define DISPATCH_EXPORT DISPATCH_EXTERN __declspec (dllexport)
199
199
# else
200
200
# define DISPATCH_EXPORT DISPATCH_EXTERN __declspec (dllimport)
Original file line number Diff line number Diff line change @@ -7,8 +7,11 @@ if(WIN32)
7
7
BlocksRuntime.def )
8
8
9
9
if (NOT BUILD_SHARED_LIBS )
10
- target_compile_definitions (BlocksRuntime PRIVATE
10
+ target_compile_definitions (BlocksRuntime PUBLIC
11
11
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> )
12
15
endif ()
13
16
endif ()
14
17
Original file line number Diff line number Diff line change @@ -92,6 +92,10 @@ target_include_directories(dispatch PUBLIC
92
92
target_include_directories (dispatch PRIVATE
93
93
${PROJECT_SOURCE_DIR} /private )
94
94
95
+ if (NOT BUILD_SHARED_LIBS )
96
+ target_compile_definitions (dispatch PUBLIC
97
+ dispatch_STATIC )
98
+ endif ()
95
99
if (WIN32 )
96
100
target_compile_definitions (dispatch PRIVATE
97
101
_CRT_NONSTDC_NO_WARNINGS
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ add_library(bsdtests
23
23
STATIC
24
24
bsdtests.c
25
25
dispatch_test.c )
26
+ target_link_libraries (bsdtests PUBLIC
27
+ dispatch )
26
28
target_include_directories (bsdtests
27
29
PRIVATE
28
30
${CMAKE_CURRENT_BINARY_DIR}
You can’t perform that action at this time.
0 commit comments