mirror of
https://github.com/cemu-project/vcpkg.git
synced 2024-11-23 19:29:49 +00:00
[slikenet]Add new port. (#8693)
This commit is contained in:
parent
9c8e4cdc76
commit
cd2c2c8081
5
ports/slikenet/CONTROL
Normal file
5
ports/slikenet/CONTROL
Normal file
@ -0,0 +1,5 @@
|
||||
Source: slikenet
|
||||
Version: 2019-10-22
|
||||
Homepage: https://github.com/SLikeSoft/SLikeNet
|
||||
Description: SLikeNetT is an Open Source/Free Software cross-platform network engine written in C++ and specifially designed for games (and applications which have comparable requirements on a network engine like games) building upon the discontinued RakNet network engine which had more than 13 years of active development.
|
||||
Build-Depends: openssl
|
49
ports/slikenet/fix-install.patch
Normal file
49
ports/slikenet/fix-install.patch
Normal file
@ -0,0 +1,49 @@
|
||||
diff --git a/Lib/DLL/CMakeLists.txt b/Lib/DLL/CMakeLists.txt
|
||||
index 2d1e078..7e705cf 100644
|
||||
--- a/Lib/DLL/CMakeLists.txt
|
||||
+++ b/Lib/DLL/CMakeLists.txt
|
||||
@@ -50,13 +50,13 @@ ELSE(WIN32 AND NOT UNIX)
|
||||
ENDIF(WIN32 AND NOT UNIX)
|
||||
|
||||
target_link_libraries(SLikeNetDLL ${SLIKENET_LIBRARY_LIBS})
|
||||
-IF(NOT WIN32 OR UNIX)
|
||||
- configure_file(../../slikenet-config-version.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/slikenet-config-version.cmake @ONLY)
|
||||
-
|
||||
- install(TARGETS SLikeNetDLL EXPORT SLikeNetDLL DESTINATION lib/slikenet-${SLikeNet_VERSION})
|
||||
+IF(1)
|
||||
+ install(TARGETS SLikeNetDLL
|
||||
+ EXPORT SLikeNetDLL
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib)
|
||||
INSTALL(FILES ${ALL_COMPATIBILITY_HEADER_SRC} DESTINATION include/slikenet-${SLikeNet_VERSION})
|
||||
INSTALL(FILES ${ALL_COMPATIBILITY_HEADER_SRC_2} DESTINATION include/slikenet-${SLikeNet_VERSION}/slikenet/slikenet)
|
||||
INSTALL(FILES ${ALL_HEADER_SRCS} DESTINATION include/slikenet-${SLikeNet_VERSION}/slikenet/include/slikenet)
|
||||
- INSTALL(FILES ../../slikenet-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/slikenet-config-version.cmake DESTINATION lib/slikenet-${SLikeNet_VERSION})
|
||||
- INSTALL(EXPORT SLikeNetDLL DESTINATION lib/slikenet-${SLikeNet_VERSION})
|
||||
-ENDIF(NOT WIN32 OR UNIX)
|
||||
+ENDIF(1)
|
||||
diff --git a/Lib/LibStatic/CMakeLists.txt b/Lib/LibStatic/CMakeLists.txt
|
||||
index 955a99d..9211c45 100644
|
||||
--- a/Lib/LibStatic/CMakeLists.txt
|
||||
+++ b/Lib/LibStatic/CMakeLists.txt
|
||||
@@ -54,13 +54,14 @@ IF(WIN32 AND NOT UNIX)
|
||||
IF(NOT ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles")
|
||||
set_target_properties(SLikeNetLibStatic PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB:\"LIBCD.lib LIBCMTD.lib MSVCRT.lib\"" )
|
||||
ENDIF(NOT ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles")
|
||||
-ELSE(WIN32 AND NOT UNIX)
|
||||
- configure_file(../../slikenet-config-version.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/slikenet-config-version.cmake @ONLY)
|
||||
+ENDIF(WIN32 AND NOT UNIX)
|
||||
|
||||
INSTALL(TARGETS SLikeNetLibStatic EXPORT SLikeNetLibStatic DESTINATION lib/slikenet-${SLikeNet_VERSION})
|
||||
+ INSTALL(TARGETS SLikeNetLibStatic
|
||||
+ EXPORT SLikeNetLibStatic
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION share/slikenet)
|
||||
INSTALL(FILES ${ALL_COMPATIBILITY_HEADER_SRC} DESTINATION include/slikenet-${SLikeNet_VERSION})
|
||||
INSTALL(FILES ${ALL_COMPATIBILITY_HEADER_SRC_2} DESTINATION include/slikenet-${SLikeNet_VERSION}/slikenet)
|
||||
INSTALL(FILES ${ALL_HEADER_SRCS} DESTINATION include/slikenet-${SLikeNet_VERSION}/include/slikenet)
|
||||
- INSTALL(FILES ../../slikenet-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/slikenet-config-version.cmake DESTINATION lib/slikenet-${SLikeNet_VERSION})
|
||||
- INSTALL(EXPORT SLikeNetLibStatic FILE slikenet.cmake DESTINATION lib/slikenet-${SLikeNet_VERSION})
|
||||
-ENDIF(WIN32 AND NOT UNIX)
|
36
ports/slikenet/portfile.cmake
Normal file
36
ports/slikenet/portfile.cmake
Normal file
@ -0,0 +1,36 @@
|
||||
vcpkg_fail_port_install(ON_TARGET "UWP")
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO SLikeSoft/SLikeNet
|
||||
REF cca394f05e9e9e3e315a85539e648f267d3f2fcc
|
||||
SHA512 410954bda5a7be309eb71c3078f8ea67ff21aae2ce923f01db77b09265969f1350afb45b90194118bfad274f0a36a2d3bbc38d86a15507fdfc4bc8edc4a0204c
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-install.patch
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
set(SLIKENET_ENABLE_STATIC TRUE)
|
||||
set(SLIKENET_ENABLE_DLL FALSE)
|
||||
else()
|
||||
set(SLIKENET_ENABLE_STATIC FALSE)
|
||||
set(SLIKENET_ENABLE_DLL TRUE)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DSLIKENET_ENABLE_DLL=${SLIKENET_ENABLE_DLL}
|
||||
-DSLIKENET_ENABLE_STATIC=${SLIKENET_ENABLE_STATIC}
|
||||
-DSLIKENET_ENABLE_SAMPLES=FALSE
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
Loading…
Reference in New Issue
Block a user