2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2023-07-08 00:25:07 +08:00
|
|
|
set(BDE_TOOLS_VERSION "${VERSION}")
|
2019-05-03 13:57:43 +08:00
|
|
|
|
2023-07-08 00:25:07 +08:00
|
|
|
# Acquire Python and add it to PATH
|
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
2019-05-03 13:57:43 +08:00
|
|
|
|
|
|
|
# Acquire BDE Tools and add them to PATH
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH TOOLS_PATH
|
|
|
|
REPO "bloomberg/bde-tools"
|
2023-07-08 00:25:07 +08:00
|
|
|
REF "${BDE_TOOLS_VERSION}"
|
|
|
|
SHA512 3c39da8d1ea40459e36e11ada93cc2821ae1b16a831f93cccab463996394a400cc08bb1654642eae1aa5187f139d7fb80c4729e464051eee182133eb8a74158d
|
|
|
|
HEAD_REF main
|
2019-05-03 13:57:43 +08:00
|
|
|
)
|
2023-07-08 00:25:07 +08:00
|
|
|
|
2019-05-03 13:57:43 +08:00
|
|
|
message(STATUS "Configure bde-tools-v${BDE_TOOLS_VERSION}")
|
2023-07-08 00:25:07 +08:00
|
|
|
vcpkg_add_to_path("${PYTHON3_EXE_PATH}")
|
|
|
|
vcpkg_add_to_path("${TOOLS_PATH}/bin")
|
2019-05-03 13:57:43 +08:00
|
|
|
|
|
|
|
# Acquire BDE sources
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO "bloomberg/bde"
|
2023-07-08 00:25:07 +08:00
|
|
|
REF "${VERSION}"
|
|
|
|
SHA512 810b4a06a08739dcd990751dd543aa7dc58355f9d64a7c96ef0cf45c81501946434db42ad5bcf5d16110d5a463586b587ce09a446136e824298f39a8a871b490
|
|
|
|
HEAD_REF main
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
-DBDE_BUILD_TARGET_CPP17=ON
|
|
|
|
-DCMAKE_CXX_STANDARD=17
|
|
|
|
-DCMAKE_CXX_STANDARD_REQUIRED=ON
|
|
|
|
-DCMAKE_CXX_EXTENSIONS=OFF
|
|
|
|
-DBBS_BUILD_SYSTEM=1
|
|
|
|
"-DBdeBuildSystem_DIR:PATH=${TOOLS_PATH}/BdeBuildSystem"
|
|
|
|
OPTIONS_RELEASE
|
|
|
|
-DBDE_BUILD_TARGET_OPT=1
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DBDE_BUILD_TARGET_DBG=1
|
2019-05-03 13:57:43 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# Build release
|
2023-07-08 00:25:07 +08:00
|
|
|
vcpkg_cmake_build()
|
2019-05-03 13:57:43 +08:00
|
|
|
|
|
|
|
# Install release
|
2023-07-08 00:25:07 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/)
|
2019-05-03 13:57:43 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/bde
|
|
|
|
RENAME copyright
|
|
|
|
)
|
2021-10-28 06:19:28 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|