vcpkg/ports/libsodium/portfile.cmake

60 lines
1.3 KiB
CMake
Raw Normal View History

2017-10-18 07:25:58 +08:00
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
2017-10-18 07:25:58 +08:00
REPO jedisct1/libsodium
2019-06-18 04:19:39 +08:00
REF 1.0.18
SHA512 727fe50a5fb1df86ec5d807770f408a52609cbeb8510b4f4183b2a35a537905719bdb6348afcb103ff00ce946a8094ac9559b6e3e5b2ccc2a2d0c08f75577eeb
2017-10-18 07:25:58 +08:00
HEAD_REF master
)
configure_file(
${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt
${SOURCE_PATH}/CMakeLists.txt
COPYONLY
2018-12-19 17:50:38 +08:00
)
configure_file(
${CMAKE_CURRENT_LIST_DIR}/sodiumConfig.cmake.in
${SOURCE_PATH}/sodiumConfig.cmake.in
COPYONLY
2018-03-08 09:38:30 +08:00
)
2017-10-18 07:43:54 +08:00
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_TESTING=OFF
2017-10-18 07:43:54 +08:00
)
vcpkg_install_cmake()
2018-12-19 20:01:14 +08:00
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(
CONFIG_PATH lib/cmake/unofficial-sodium
TARGET_PATH share/unofficial-sodium
2017-10-18 07:43:54 +08:00
)
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
2017-10-18 07:43:54 +08:00
)
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/Makefile.am)
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_replace_string(
${CURRENT_PACKAGES_DIR}/include/sodium/export.h
"#ifdef SODIUM_STATIC"
"#if 1 //#ifdef SODIUM_STATIC"
)
endif ()
2017-10-18 07:25:58 +08:00
configure_file(
2018-02-22 22:22:12 +08:00
${SOURCE_PATH}/LICENSE
${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright
COPYONLY
2017-10-18 07:25:58 +08:00
)
#vcpkg_test_cmake(PACKAGE_NAME unofficial-sodium)