Skip to content

Commit 9b243da

Browse files
committed
CoreFoundation: fix CoreFoundation for Foundation static builds
CoreFoundation built statically for Foundation is used as an objects library. We want to re-export the symbols. This requires that exports are enabled for the target, but CMake defines _EXPORT symbols only for shared libraries and `-rdynamic` executables. Use the custom macro for the static case for Foundation.
1 parent 3411deb commit 9b243da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CoreFoundation/Base.subproj/CFBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
#endif
135135

136136
#if defined(_USRDLL)
137-
#if defined(CoreFoundation_EXPORTS)
137+
#if defined(CoreFoundation_EXPORTS) || defined(CF_BUILDING_CF)
138138
#define CF_EXPORT _CF_EXTERN __declspec(dllexport)
139139
#else
140140
#define CF_EXPORT _CF_EXTERN __declspec(dllimport)

0 commit comments

Comments
 (0)