2019-02-22 08:49:17 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO QuantStack/xeus
|
2020-11-06 04:42:29 +08:00
|
|
|
REF 424b7cd177886906a59eee535b7de59088461910 # 0.24.1
|
2020-09-28 08:33:19 +08:00
|
|
|
SHA512 877ca45bf649b567a9921d3e8f0adb0299dbe956978bd6e217d0c06617cf3466d08d90d607fd33e129089472e1a96ecec78b1fc21346bc13ba268168a5a6b068
|
2019-02-22 08:49:17 +08:00
|
|
|
HEAD_REF master
|
2020-11-06 04:42:29 +08:00
|
|
|
PATCHES
|
2020-09-28 08:33:19 +08:00
|
|
|
Fix-Compile-nlohmann-json.patch
|
2019-02-22 08:49:17 +08:00
|
|
|
)
|
|
|
|
|
2019-05-07 01:11:03 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS)
|
|
|
|
|
2019-02-22 08:49:17 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DBUILD_EXAMPLES=OFF
|
2019-05-07 01:11:03 +08:00
|
|
|
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
|
2019-02-22 08:49:17 +08:00
|
|
|
-DBUILD_TESTS=OFF
|
|
|
|
-DDOWNLOAD_GTEST=OFF
|
|
|
|
-DDISABLE_ARCH_NATIVE=OFF
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2019-05-07 01:11:03 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2019-02-22 08:49:17 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
|
|
|
|
|
2020-11-06 04:42:29 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2019-05-07 01:11:03 +08:00
|
|
|
|
2020-11-06 04:42:29 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
2019-02-22 08:49:17 +08:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/xeus/xeus.hpp
|
|
|
|
"#ifdef XEUS_STATIC_LIB"
|
|
|
|
"#if 1 // #ifdef XEUS_STATIC_LIB"
|
|
|
|
)
|
2020-09-28 08:33:19 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2019-02-22 08:49:17 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# Handle copyright
|
2020-11-06 04:42:29 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2019-02-22 08:49:17 +08:00
|
|
|
|
|
|
|
# Install usage
|
2020-11-06 04:42:29 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|