2017-10-18 07:25:58 +08:00
|
|
|
vcpkg_from_github(
|
2017-11-12 16:22:51 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2017-10-18 07:25:58 +08:00
|
|
|
REPO jedisct1/libsodium
|
2023-08-09 02:32:45 +08:00
|
|
|
REF ${VERSION}
|
2023-12-20 15:16:05 +08:00
|
|
|
SHA512 6094d7bf191ea3be85f2ddab76b71f1b9c69c786493db5b84d3c5d5a0237003377ddf6a8687a962ea651fe4a9369cf5ee1676ba0bae82690f5f7ef31a698efa9
|
2017-10-18 07:25:58 +08:00
|
|
|
HEAD_REF master
|
2017-12-07 10:08:03 +08:00
|
|
|
)
|
|
|
|
|
2022-05-18 02:15:06 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
2018-12-19 17:50:38 +08:00
|
|
|
|
2022-09-09 05:01:20 +08:00
|
|
|
if(VCPKG_TARGET_IS_EMSCRIPTEN)
|
|
|
|
set(ADDITIONAL_OPTIONS "-DENABLE_SSP=OFF")
|
|
|
|
endif()
|
|
|
|
|
2021-03-30 00:45:43 +08:00
|
|
|
vcpkg_cmake_configure(
|
2022-05-18 02:15:06 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-05-02 06:43:48 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TESTING=OFF
|
2022-09-09 05:01:20 +08:00
|
|
|
${ADDITIONAL_OPTIONS}
|
2017-10-18 07:43:54 +08:00
|
|
|
)
|
|
|
|
|
2021-03-30 00:45:43 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-12-19 20:01:14 +08:00
|
|
|
|
2019-05-02 06:43:48 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2017-12-01 10:10:33 +08:00
|
|
|
|
2021-03-30 00:45:43 +08:00
|
|
|
vcpkg_cmake_config_fixup(
|
|
|
|
PACKAGE_NAME unofficial-sodium
|
2017-10-18 07:43:54 +08:00
|
|
|
)
|
2023-08-09 02:32:45 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2019-05-02 06:43:48 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE
|
2022-05-18 02:15:06 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
2017-10-18 07:43:54 +08:00
|
|
|
)
|
|
|
|
|
2022-05-18 02:15:06 +08:00
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/Makefile.am")
|
2019-06-13 12:39:10 +08:00
|
|
|
|
2019-05-02 06:43:48 +08:00
|
|
|
configure_file(
|
2022-05-18 02:15:06 +08:00
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/sodiumConfig.cmake.in"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/unofficial-sodium/unofficial-sodiumConfig.cmake"
|
2021-03-30 00:45:43 +08:00
|
|
|
@ONLY
|
|
|
|
)
|
2022-05-18 02:15:06 +08:00
|
|
|
|
2023-08-09 02:32:45 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|