2019-02-22 08:49:17 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO QuantStack/xeus
|
2019-05-07 01:11:03 +08:00
|
|
|
REF 0.19.1
|
|
|
|
SHA512 1f42cf3b5007fef957c259eee58bdc5d6b812dd32ca316823e33837d3802df0675f778a9c8f2fb97e9ff982c584229d3733e5894684e75498cc244e9c29df209
|
2019-02-22 08:49:17 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
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})
|
|
|
|
|
2019-05-07 01:11:03 +08:00
|
|
|
file(COPY
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
|
|
|
|
)
|
|
|
|
|
2019-02-22 08:49:17 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/include
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/share
|
|
|
|
)
|
|
|
|
|
|
|
|
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"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
|
|
|
|
|
|
|
# Install usage
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
|
|
|
|
|
|
|
# CMake integration test
|
2019-05-07 01:11:03 +08:00
|
|
|
vcpkg_test_cmake(PACKAGE_NAME ${PORT})
|