early-access version 2853
This commit is contained in:
36
externals/vcpkg/ports/nsync/export-targets.patch
vendored
Executable file
36
externals/vcpkg/ports/nsync/export-targets.patch
vendored
Executable file
@@ -0,0 +1,36 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 328f9b6..6a71b5b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -41,6 +41,9 @@ function (set_cpp_target tgtname files)
|
||||
"${PROJECT_SOURCE_DIR}/platform/c++11.futex"
|
||||
)
|
||||
endif ()
|
||||
+
|
||||
+ target_include_directories("${tgtname}" PUBLIC $<INSTALL_INTERFACE:include>)
|
||||
+
|
||||
|
||||
target_compile_definitions ("${tgtname}" PRIVATE "${NSYNC_CPP_DEFINITIONS}")
|
||||
|
||||
@@ -399,14 +402,19 @@ endif ()
|
||||
# By default, install nsync always
|
||||
# set (CMAKE_SKIP_INSTALL_ALL_DEPENDENCY ON)
|
||||
|
||||
-install (TARGETS nsync
|
||||
+install (TARGETS nsync EXPORT unofficial-nsyncConfig
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development)
|
||||
|
||||
-install (TARGETS nsync_cpp OPTIONAL
|
||||
+install (TARGETS nsync_cpp OPTIONAL EXPORT unofficial-nsyncConfig
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development)
|
||||
|
||||
+install(EXPORT unofficial-nsyncConfig
|
||||
+ NAMESPACE unofficial::nsync::
|
||||
+ DESTINATION share/unofficial-nsync
|
||||
+)
|
||||
+
|
||||
set (NSYNC_INCLUDES
|
||||
"public/nsync.h"
|
||||
"public/nsync_atomic.h"
|
||||
32
externals/vcpkg/ports/nsync/fix-install.patch
vendored
Executable file
32
externals/vcpkg/ports/nsync/fix-install.patch
vendored
Executable file
@@ -0,0 +1,32 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6b1f1dc..328f9b6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -80,7 +80,7 @@ set (NSYNC_OS_CPP_SRC
|
||||
# https://cmake.org/cmake/help/v3.1/policy/CMP0054.html
|
||||
|
||||
# Pick the include directory for the operating system.
|
||||
-if ("${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsX")
|
||||
+if ("${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsX" OR "${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsStoreX")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/platform/win32")
|
||||
set (NSYNC_CPP_FLAGS "/TP")
|
||||
|
||||
@@ -230,7 +230,7 @@ elseif (("${CMAKE_SYSTEM_PROCESSOR}X" STREQUAL "ppc64X"))
|
||||
endif ()
|
||||
|
||||
# Windows uses some include files from the posix directory also.
|
||||
-if ("${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsX")
|
||||
+if ("${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsX" OR "${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsStoreX")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/platform/posix")
|
||||
endif ()
|
||||
|
||||
@@ -396,7 +396,8 @@ if (NSYNC_ENABLE_TESTS)
|
||||
endforeach (t)
|
||||
endif ()
|
||||
|
||||
-set (CMAKE_SKIP_INSTALL_ALL_DEPENDENCY ON)
|
||||
+# By default, install nsync always
|
||||
+# set (CMAKE_SKIP_INSTALL_ALL_DEPENDENCY ON)
|
||||
|
||||
install (TARGETS nsync
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries
|
||||
27
externals/vcpkg/ports/nsync/portfile.cmake
vendored
Executable file
27
externals/vcpkg/ports/nsync/portfile.cmake
vendored
Executable file
@@ -0,0 +1,27 @@
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO google/nsync
|
||||
REF 1.24.0
|
||||
SHA512 14dd582488072123a353c967664ed9a3f636865bb35e64d7256dcc809539129fa47c7979a4009fd45c9341cac537a4ca6b4b617ba2cae1d3995a7c251376339f
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-install.patch
|
||||
export-targets.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DNSYNC_ENABLE_TESTS=OFF
|
||||
)
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-nsync CONFIG_PATH share/unofficial-nsync)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
18
externals/vcpkg/ports/nsync/vcpkg.json
vendored
Executable file
18
externals/vcpkg/ports/nsync/vcpkg.json
vendored
Executable file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "nsync",
|
||||
"version": "1.24.0",
|
||||
"port-version": 1,
|
||||
"description": "nsync is a C library that exports various synchronization primitives, such as mutexes",
|
||||
"homepage": "https://github.com/google/nsync",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user