-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [nsync] create a new port * [nsync] support system name WindowsStore * [nsync] use "version" instead of "version-string" * [nsync] add version JSON * Update ports/nsync/portfile.cmake * [nsync] apply PR feedback * [nsync] update SHA of port * [nsync] extract vcpkg_replace_string to patch * update version SHA Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
- Loading branch information
1 parent
3b469cb
commit 511e887
Showing
5 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
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 | ||
) | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
OPTIONS | ||
-DNSYNC_ENABLE_TESTS=OFF | ||
) | ||
vcpkg_install_cmake() | ||
vcpkg_copy_pdbs() | ||
|
||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) | ||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "nsync", | ||
"version": "1.24.0", | ||
"description": "nsync is a C library that exports various synchronization primitives, such as mutexes", | ||
"homepage": "https://github.com/google/nsync" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "65f07dbc95a609c95de7befffbf37da598652cee", | ||
"version": "1.24.0", | ||
"port-version": 0 | ||
} | ||
] | ||
} |