[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:
xhbuming 2020-06-24 04:01:52 +08:00 committed by GitHub
parent 85f453a8a4
commit d2b92bff55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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