mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-21 09:47:54 +08:00
8641dfd9dd
* some libraries export <PackageName>LibraryDepends.cmake instead of <PackageName>Targets.cmake. Those file also need the fix of #1044 should close #4753 * prefered the general solution #4622. hopefully solved the issue within #4150 replaced the regex with something more readable (also ident is lost) should close: #4753 #4633 #4150 and maybe more * Hash vcpkg_fixup_cmake_targets.cmake * [boost] Fix use of find_package(Boost) with cache variables [socket-io-client] Fix install * reversed change back to use regex replace * [glbinding] Fix _IMPORT_PREFIX depth in *-export.cmake files * [tinyspline] Ignore warnings treated as errors * [libevent, liblemon, libpng, smpeg2, zlib] Fix apply patches * [libsodium] Fix apply patches * [folly] Link correct libraries in debug and release * [vtk] Remove unset of _IMPORT_PREFIX * [tinyspline] Do not treat warnings as errors * [smpeg2] Fix double* to int comparison * [nvtt] Define value for HAVE_UNISTD_H in MacOS * [libui] Fix MacOS X build * [zlib] Fix download URL * [qhull] Update to v7.2.1 * [podofo] Set value for HAVE_UNISTD_H in MacOS * [mongo-cxx-driver,ogre,podofo,qhull] Bump CONTROL version * [mongo-c-driver] Set _IMPORT_PREFIX * [tmxparser] Bump CONTROL version * [qhull,vxl] Bump CONTROL version
79 lines
2.4 KiB
CMake
79 lines
2.4 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO jedisct1/libsodium
|
|
REF 1.0.17
|
|
SHA512 faf6ab57d113b6b1614b51390823a646f059018327b6f493e9e918a908652d0932a75a1a6683032b7a3869f516f387d67acdf944568387feddff7b2f5b6e77d6
|
|
HEAD_REF master
|
|
PATCHES
|
|
"disable-tests.patch"
|
|
)
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
set(LIBSODIUM_RELEASE_CONFIGURATION ReleaseDLL)
|
|
set(LIBSODIUM_DEBUG_CONFIGURATION DebugDLL)
|
|
else()
|
|
set(LIBSODIUM_RELEASE_CONFIGURATION Release)
|
|
set(LIBSODIUM_DEBUG_CONFIGURATION Debug)
|
|
endif()
|
|
|
|
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
|
|
)
|
|
|
|
file(GLOB LIBSODIUM_HEADERS "${SOURCE_PATH}/src/libsodium/include/sodium/*.h")
|
|
file(INSTALL
|
|
${LIBSODIUM_HEADERS}
|
|
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
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
|
|
)
|
|
file(INSTALL
|
|
${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
|
|
)
|
|
endif()
|
|
|
|
file(INSTALL
|
|
${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
|
|
)
|
|
file(INSTALL
|
|
${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
|
|
)
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
file(INSTALL
|
|
${SOURCE_PATH}/LICENSE
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsodium
|
|
RENAME copyright
|
|
)
|