2017-10-17 18:25:58 -05:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
2017-11-12 00:22:51 -08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2017-10-17 18:25:58 -05:00
|
|
|
REPO jedisct1/libsodium
|
2019-01-09 12:31:28 -08:00
|
|
|
REF 1.0.17
|
|
|
|
SHA512 faf6ab57d113b6b1614b51390823a646f059018327b6f493e9e918a908652d0932a75a1a6683032b7a3869f516f387d67acdf944568387feddff7b2f5b6e77d6
|
2017-10-17 18:25:58 -05:00
|
|
|
HEAD_REF master
|
2017-12-06 18:08:03 -08:00
|
|
|
)
|
|
|
|
|
2019-05-01 17:43:48 -05:00
|
|
|
configure_file(
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt
|
|
|
|
${SOURCE_PATH}/CMakeLists.txt
|
|
|
|
COPYONLY
|
2018-12-19 17:50:38 +08:00
|
|
|
)
|
|
|
|
|
2019-05-01 17:43:48 -05: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-17 18:43:54 -05:00
|
|
|
|
2019-05-01 17:43:48 -05:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TESTING=OFF
|
2017-10-17 18:43:54 -05:00
|
|
|
)
|
|
|
|
|
2019-05-01 17:43:48 -05:00
|
|
|
vcpkg_install_cmake()
|
2018-12-19 20:01:14 +08:00
|
|
|
|
2019-05-01 17:43:48 -05:00
|
|
|
vcpkg_copy_pdbs()
|
2017-11-30 18:10:33 -08:00
|
|
|
|
2019-05-01 17:43:48 -05:00
|
|
|
vcpkg_fixup_cmake_targets(
|
|
|
|
CONFIG_PATH lib/cmake/unofficial-sodium
|
|
|
|
TARGET_PATH share/unofficial-sodium
|
2017-10-17 18:43:54 -05:00
|
|
|
)
|
2019-05-01 17:43:48 -05:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/include
|
2017-10-17 18:43:54 -05:00
|
|
|
)
|
|
|
|
|
2019-05-01 17:43:48 -05:00
|
|
|
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-17 18:25:58 -05:00
|
|
|
|
2019-05-01 17:43:48 -05:00
|
|
|
configure_file(
|
2018-02-22 06:22:12 -08:00
|
|
|
${SOURCE_PATH}/LICENSE
|
2019-05-01 17:43:48 -05:00
|
|
|
${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright
|
|
|
|
COPYONLY
|
2017-10-17 18:25:58 -05:00
|
|
|
)
|
2019-05-01 17:43:48 -05:00
|
|
|
|
|
|
|
#vcpkg_test_cmake(PACKAGE_NAME unofficial-sodium)
|