mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 06:08:03 +08:00
[cjson] fix windows-static for don't export symbols (#12026)
* fix windows-static for don't export symbols /* export symbols by default, this is necessary for copy pasting the C and header file */ #if !defined(CJSON_HIDE_SYMBOLS) && !defined(CJSON_IMPORT_SYMBOLS) && !defined(CJSON_EXPORT_SYMBOLS) #define CJSON_EXPORT_SYMBOLS #endif * Update CONTROL
This commit is contained in:
parent
85f453a8a4
commit
d2b92bff55
@ -1,5 +1,5 @@
|
||||
Source: cjson
|
||||
Version: 2019-11-30
|
||||
Version: 2019-11-30-1
|
||||
Description: Ultralightweight JSON parser in ANSI C
|
||||
Homepage: https://github.com/DaveGamble/cJSON
|
||||
|
||||
|
@ -15,8 +15,10 @@ vcpkg_check_features(
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_PUBLIC_SYMBOLS)
|
||||
string(COMPARE NOTEQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DENABLE_HIDDEN_SYMBOLS)
|
||||
else()
|
||||
set(ENABLE_PUBLIC_SYMBOLS OFF)
|
||||
set(DENABLE_HIDDEN_SYMBOLS OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
@ -26,6 +28,7 @@ vcpkg_configure_cmake(
|
||||
-DBUILD_SHARED_AND_STATIC_LIBS=OFF
|
||||
-DCJSON_OVERRIDE_BUILD_SHARED_LIBS=OFF
|
||||
-DENABLE_PUBLIC_SYMBOLS=${ENABLE_PUBLIC_SYMBOLS}
|
||||
-DENABLE_HIDDEN_SYMBOLS=${DENABLE_HIDDEN_SYMBOLS}
|
||||
-DENABLE_TARGET_EXPORT=ON # Export CMake config files
|
||||
-DENABLE_CJSON_TEST=OFF
|
||||
-DENABLE_FUZZING=OFF
|
||||
|
Loading…
x
Reference in New Issue
Block a user