mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-17 06:38:12 +08:00
Merge pull request #5003 from myd7349/issue-3374-3385
[libsodium] Fix #3374, #3385
This commit is contained in:
commit
27aa5a402f
@ -22,18 +22,20 @@ else()
|
||||
set(LIBSODIUM_DEBUG_CONFIGURATION Debug)
|
||||
endif()
|
||||
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj
|
||||
RELEASE_CONFIGURATION ${LIBSODIUM_RELEASE_CONFIGURATION}
|
||||
DEBUG_CONFIGURATION ${LIBSODIUM_DEBUG_CONFIGURATION}
|
||||
)
|
||||
|
||||
IF(VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
|
||||
SET(BUILD_ARCH "Win32")
|
||||
ELSE()
|
||||
SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE})
|
||||
ENDIF()
|
||||
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj
|
||||
RELEASE_CONFIGURATION ${LIBSODIUM_RELEASE_CONFIGURATION}
|
||||
DEBUG_CONFIGURATION ${LIBSODIUM_DEBUG_CONFIGURATION}
|
||||
OPTIONS
|
||||
/p:ForceImportBeforeCppTargets=${SOURCE_PATH}/builds/msvc/properties/${BUILD_ARCH}.props
|
||||
)
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/src/libsodium/include/sodium.h
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
||||
@ -45,6 +47,12 @@ file(INSTALL
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include/sodium
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/include/sodium/export.h _contents)
|
||||
string(REPLACE "#ifdef SODIUM_STATIC" "#if 1 //#ifdef SODIUM_STATIC" _contents "${_contents}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/sodium/export.h "${_contents}")
|
||||
endif ()
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll
|
||||
|
Loading…
x
Reference in New Issue
Block a user