Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ports/xeus/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: xeus
Version: 2019-02-13-1
Version: 0.19.1-1
Description: C++ implementation of the Jupyter kernel protocol
Build-Depends: cppzmq, cryptopp, libuuid (linux), nlohmann-json, xtl, zeromq
Build-Depends: cppzmq, libuuid (linux), nlohmann-json, openssl, xtl, zeromq
19 changes: 13 additions & 6 deletions ports/xeus/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,35 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO QuantStack/xeus
REF f78c60c7ce28baecb2479f2b82e4e8d1a6c35188
SHA512 9d83f32f641bcad4ac96e263c465d46bdfa7d18d41f1e201309244c95587ce08ff2426f7cdd3a4399563d46064ed9bedd4d0babf4840f65e95c6a2c6f23ac9bb
REF 0.19.1
SHA512 1f42cf3b5007fef957c259eee58bdc5d6b812dd32ca316823e33837d3802df0675f778a9c8f2fb97e9ff982c584229d3733e5894684e75498cc244e9c29df209
HEAD_REF master
PATCHES
static-lib.patch
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_EXAMPLES=OFF
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
-DBUILD_TESTS=OFF
-DDOWNLOAD_GTEST=OFF
-DXEUS_USE_SHARED_CRYPTOPP=OFF # `cryptopp` port currently only supports static linkage.
-DDISABLE_ARCH_NATIVE=OFF
)

vcpkg_install_cmake()

vcpkg_copy_pdbs()

vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})

file(COPY
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
)

file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
Expand All @@ -44,4 +51,4 @@ configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copy
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})

# CMake integration test
#vcpkg_test_cmake(PACKAGE_NAME ${PORT})
vcpkg_test_cmake(PACKAGE_NAME ${PORT})
63 changes: 0 additions & 63 deletions ports/xeus/static-lib.patch

This file was deleted.

2 changes: 1 addition & 1 deletion ports/xeus/usage
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The package xeus provides CMake targets:

find_package(xeus CONFIG REQUIRED)
target_link_libraries(main PRIVATE xeus)
target_link_libraries(main PRIVATE xeus xeus_static)
9 changes: 9 additions & 0 deletions ports/xeus/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
_find_package(${ARGS})

if(TARGET xeus AND NOT TARGET xeus_static)
add_library(xeus_static INTERFACE IMPORTED)
set_target_properties(xeus_static PROPERTIES INTERFACE_LINK_LIBRARIES xeus)
elseif(TARGET xeus_static AND NOT TARGET xeus)
add_library(xeus INTERFACE IMPORTED)
set_target_properties(xeus PROPERTIES INTERFACE_LINK_LIBRARIES xeus_static)
endif()