mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-21 10:12:01 +01:00
[sockpp] Add new port (#11562)
* [sockpp] Add new port * [sockpp] Address review comments * [sockpp] Update ci.baseline * [sockpp] Fix typo * [sockpp] Fix sockppConfig.cmake
This commit is contained in:
parent
e7041e1ef6
commit
f5676127ee
5
ports/sockpp/CONTROL
Normal file
5
ports/sockpp/CONTROL
Normal file
@ -0,0 +1,5 @@
|
||||
Source: sockpp
|
||||
Version: 0.7
|
||||
Homepage: https://github.com/fpagliughi/sockpp
|
||||
Description: Simple, modern, C++ socket library. This is a fairly low-level C++ wrapper around the Berkeley sockets library using socket, acceptor, and connector classes that are familiar concepts from other languages.
|
||||
Supports: !uwp
|
32
ports/sockpp/portfile.cmake
Normal file
32
ports/sockpp/portfile.cmake
Normal file
@ -0,0 +1,32 @@
|
||||
vcpkg_fail_port_install(ON_TARGET "uwp")
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO fpagliughi/sockpp
|
||||
REF d8c86c01db43542a06ad05424da037f6b9892253
|
||||
SHA512 9b7ae3fea08bfd4a0d6479d7fbcc24da9101476c4f8e4a684138c7d974827cdf374282a4641e58f03c08aeb83f2c1856fc3c5193e5847fb4b3d9182c1c396087
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_replace_string(${SOURCE_PATH}/CMakeLists.txt "\${SOCKPP}-static" "\${SOCKPP}")
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DSOCKPP_BUILD_SHARED=OFF
|
||||
-DSOCKPP_BUILD_STATIC=ON
|
||||
-DSOCKPP_BUILD_DOCUMENTATION=OFF
|
||||
-DSOCKPP_BUILD_EXAMPLES=OFF
|
||||
-DSOCKPP_BUILD_TESTS=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(INSTALL ${CURRENT_PORT_DIR}/sockppConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
23
ports/sockpp/sockppConfig.cmake
Normal file
23
ports/sockpp/sockppConfig.cmake
Normal file
@ -0,0 +1,23 @@
|
||||
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)
|
||||
if(NOT SOCKPP_FIND_COMPONENTS)
|
||||
set(SOCKPP_FIND_COMPONENTS sockpp)
|
||||
if(SOCKPP_FIND_REQUIRED)
|
||||
set(SOCKPP_FIND_REQUIRED_sockpp TRUE)
|
||||
endif()
|
||||
set(SOCKPP_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
set(SOCKPP_INCLUDE_DIRS ${_DIR}/include)
|
||||
set(SOCKPP_LIBRARIES)
|
||||
if (EXISTS ${_DIR}/lib/libsockpp.a)
|
||||
list(APPEND SOCKPP_LIBRARIES optimized ${_DIR}/lib/libsockpp.a)
|
||||
endif()
|
||||
if (EXISTS ${_DIR}/debug/lib/libsockpp.a)
|
||||
list(APPEND SOCKPP_LIBRARIES debug ${_DIR}/debug/lib/libsockpp.a)
|
||||
endif()
|
||||
if (EXISTS ${_DIR}/lib/sockpp.lib)
|
||||
list(APPEND SOCKPP_LIBRARIES optimized ${_DIR}/lib/sockpp.lib)
|
||||
endif()
|
||||
if (EXISTS ${_DIR}/debug/lib/sockpp.lib)
|
||||
list(APPEND SOCKPP_LIBRARIES debug ${_DIR}/debug/lib/sockpp.lib)
|
||||
endif()
|
5
ports/sockpp/usage
Normal file
5
ports/sockpp/usage
Normal file
@ -0,0 +1,5 @@
|
||||
The package sockpp provides CMake integration:
|
||||
|
||||
find_package(sockpp CONFIG REQUIRED)
|
||||
target_include_directories(main PRIVATE ${SOCKPP_INCLUDE_DIRS})
|
||||
target_link_libraries(main PRIVATE ${SOCKPP_LIBRARIES})
|
@ -1714,6 +1714,8 @@ smpeg2:x64-linux=fail
|
||||
smpeg2:x64-uwp=fail
|
||||
soci:arm-uwp=fail
|
||||
soci:x64-uwp=fail
|
||||
sockpp:arm-uwp=fail
|
||||
sockpp:x64-uwp=fail
|
||||
soem:x64-uwp=fail
|
||||
soem:arm-uwp=fail
|
||||
soil:arm-uwp=fail
|
||||
|
Loading…
x
Reference in New Issue
Block a user