2020-04-18 00:10:00 +03:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
# Get c4core src
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO biojppm/c4core
|
2023-03-03 04:04:39 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 e96d91daeba30a5caf1772a1fbcdd4011e42e112cd560652d23d61089ef751f88c305abc41b17f45652b44090a3b4e8d853acc1bc32ce8f6f46b3ad410028e9f
|
2020-04-18 00:10:00 +03:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2024-06-12 19:06:51 -07:00
|
|
|
set(CM_COMMIT_HASH 95b2410e31ebf28b56a4fffffef52c7d13d657ad)
|
2021-08-03 07:32:40 +08:00
|
|
|
set(CM_COMMIT_HASH fe41e86552046c3df9ba73a40bf3d755df028c1e)
|
2020-04-18 00:10:00 +03:00
|
|
|
|
|
|
|
# Get cmake scripts for c4core
|
2022-06-07 03:43:42 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
CMAKE_ARCHIVE
|
2021-06-15 11:46:16 -07:00
|
|
|
URLS "https://github.com/biojppm/cmake/archive/${CM_COMMIT_HASH}.zip"
|
|
|
|
FILENAME "cmake-${CM_COMMIT_HASH}.zip"
|
2021-08-03 07:32:40 +08:00
|
|
|
SHA512 7292f9856d9c41581f2731e73fdf08880e0f4353b757da38a13ec89b62c5c8cb52b9efc1a9ff77336efa0b6809727c17649e607d8ecacc965a9b2a7a49925237
|
2020-04-18 00:10:00 +03:00
|
|
|
)
|
|
|
|
|
2022-06-07 03:43:42 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH_CMAKE
|
2020-04-18 00:10:00 +03:00
|
|
|
ARCHIVE ${CMAKE_ARCHIVE}
|
|
|
|
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/deps"
|
|
|
|
)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/cmake")
|
2022-06-07 03:43:42 +08:00
|
|
|
file(RENAME "${SOURCE_PATH_CMAKE}" "${SOURCE_PATH}/cmake")
|
2020-04-18 00:10:00 +03:00
|
|
|
|
2024-06-12 19:06:51 -07:00
|
|
|
set(DB_COMMIT_HASH 5dcbe41d2bd4712c8014aa7e843723ad7b40fd74)
|
2020-04-18 00:10:00 +03:00
|
|
|
|
2022-06-07 03:43:42 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
DEBUGBREAK_ARCHIVE
|
2021-06-15 11:46:16 -07:00
|
|
|
URLS "https://github.com/biojppm/debugbreak/archive/${DB_COMMIT_HASH}.zip"
|
|
|
|
FILENAME "debugbreak-${DB_COMMIT_HASH}.zip"
|
2024-06-12 19:06:51 -07:00
|
|
|
SHA512 a4735225058b48031e68c91853c71d3cc31c8f2bfc3592cfc7a9a16f406224a814535ecade81ab4ead76458eeab8752e7e7cd521d893db5791dd4aaac3ba20d9
|
2020-04-18 00:10:00 +03:00
|
|
|
)
|
|
|
|
|
2022-06-07 03:43:42 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH_DEBUGBREAK
|
2020-04-18 00:10:00 +03:00
|
|
|
ARCHIVE ${DEBUGBREAK_ARCHIVE}
|
|
|
|
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/deps"
|
|
|
|
)
|
|
|
|
|
2021-06-15 11:46:16 -07:00
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/src/c4/ext/debugbreak")
|
2022-06-07 03:43:42 +08:00
|
|
|
file(RENAME "${SOURCE_PATH_DEBUGBREAK}" "${SOURCE_PATH}/src/c4/ext/debugbreak")
|
2021-06-15 11:46:16 -07:00
|
|
|
|
2024-06-12 19:06:51 -07:00
|
|
|
set(FF_COMMIT_HASH 052975dd5f8166d0f9e4a215fa75a349d5985b91)
|
2021-06-15 11:46:16 -07:00
|
|
|
|
2022-06-07 03:43:42 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
FAST_FLOAT_ARCHIVE
|
2021-06-15 11:46:16 -07:00
|
|
|
URLS "https://github.com/biojppm/fast_float/archive/${FF_COMMIT_HASH}.zip"
|
|
|
|
FILENAME "fast_float-${FF_COMMIT_HASH}.zip"
|
2024-06-12 19:06:51 -07:00
|
|
|
SHA512 af63cbf1d6620cda87a5f0ca06dcaf46ddfe63658ae5ba91232a2416e8179cba3b2b3d06ff53c1ab2ba3745ae39b0cb787e04be3a9dbe1287605704c2ed13019
|
2021-06-15 11:46:16 -07:00
|
|
|
)
|
|
|
|
|
2022-06-07 03:43:42 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH_FAST_FLOAT
|
2021-06-15 11:46:16 -07:00
|
|
|
ARCHIVE ${FAST_FLOAT_ARCHIVE}
|
|
|
|
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/deps"
|
|
|
|
)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/src/c4/ext/fast_float")
|
2022-06-07 03:43:42 +08:00
|
|
|
file(RENAME "${SOURCE_PATH_FAST_FLOAT}" "${SOURCE_PATH}/src/c4/ext/fast_float")
|
2020-04-18 00:10:00 +03:00
|
|
|
|
2022-06-07 03:43:42 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-04-18 00:10:00 +03:00
|
|
|
)
|
|
|
|
|
2022-06-07 03:43:42 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-04-18 00:10:00 +03:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake)
|
2022-06-07 03:43:42 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
|
2020-04-18 00:10:00 +03:00
|
|
|
elseif(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/c4core)
|
2022-06-07 03:43:42 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/c4core)
|
2020-04-18 00:10:00 +03:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# Fix paths in config file
|
|
|
|
file(READ "${CURRENT_PACKAGES_DIR}/share/c4core/c4coreConfig.cmake" _contents)
|
|
|
|
string(REGEX REPLACE [[[ \t\r\n]*"\${PACKAGE_PREFIX_DIR}[\./\\]*"]] [["${PACKAGE_PREFIX_DIR}/../.."]] _contents "${_contents}")
|
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/share/c4core/c4coreConfig.cmake" "${_contents}")
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
2023-03-03 04:04:39 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|