-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
84 additions
and
10 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,41 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 20eaf53..b81f056 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -32,20 +32,7 @@ include(CheckIncludeFiles) | ||
include(CheckTypeSize) | ||
|
||
# location for install or package | ||
-if (CMAKE_SYSTEM_NAME MATCHES "Darwin") | ||
- include(GNUInstallDirs) | ||
- set(CMAKE_INSTALL_RPATH "@executable_path") | ||
- | ||
-elseif (CMAKE_SYSTEM_NAME MATCHES "(Linux|OpenBSD|FreeBSD|NetBSD|DragonFly)") | ||
- include(GNUInstallDirs) | ||
- set(CMAKE_INSTALL_RPATH "\$ORIGIN") | ||
- | ||
-elseif (CMAKE_SYSTEM_NAME MATCHES "Windows") | ||
- set(CMAKE_INSTALL_BINDIR bin) | ||
- set(CMAKE_INSTALL_LIBDIR lib) | ||
- set(CMAKE_INSTALL_INCLUDEDIR include) | ||
- | ||
-endif() | ||
+include(GNUInstallDirs) | ||
|
||
set(PACKAGE "cs_libguarded") | ||
set(PACKAGE_NAME "CsLibGuarded") | ||
@@ -98,13 +85,7 @@ else() | ||
endif() | ||
|
||
# destination for cmake export files | ||
-if (CMAKE_SYSTEM_NAME MATCHES "Windows") | ||
- set(PKG_PREFIX "cmake/CsLibGuarded") | ||
- | ||
-else() | ||
- set(PKG_PREFIX "${CMAKE_INSTALL_LIBDIR}/cmake/CsLibGuarded") | ||
- | ||
-endif() | ||
+set(PKG_PREFIX "${CMAKE_INSTALL_LIBDIR}/cmake/CsLibGuarded") | ||
|
||
# catch2 set up | ||
if(BUILD_TESTS) |
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 |
---|---|---|
@@ -1,11 +1,25 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO copperspice/cs_libguarded | ||
REF 1f159aa866a50f5d2952de41d8a99821b8ec37df | ||
SHA512 91380262e65ec7b8990c500c60b8d141960be24b69e01a4661c2e8fbfdb8e315c9a4509c2c65a74bc60a8fe690d6dbc8f2b39757d13da5068c95283a19d4c6c4 | ||
REF 9c1e82f42f228345f3b024bed5d08be643c00f8a | ||
SHA512 ab690489151f5f8451c63c8a78a89a586950f88d19b6df685d979db9442f36b68db402ae5a6749e75b17ac3e1c06447d2d4803d43f9d373031cc05d9b25770e9 | ||
HEAD_REF master | ||
PATCHES | ||
fix-install.patch | ||
) | ||
|
||
File(COPY ${SOURCE_PATH}/src/libguarded DESTINATION ${CURRENT_PACKAGES_DIR}/include) | ||
set(VCPKG_BUILD_TYPE release) # header-only port | ||
|
||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) | ||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
-DBUILD_TESTS=OFF | ||
) | ||
|
||
vcpkg_cmake_install() | ||
vcpkg_cmake_config_fixup(PACKAGE_NAME CsLibGuarded CONFIG_PATH lib/cmake/CsLibGuarded) | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") | ||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") |
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,4 @@ | ||
CsLibGuarded provides CMake targets: | ||
|
||
find_package(CsLibGuarded CONFIG REQUIRED) | ||
target_link_libraries(main PRIVATE CsLibGuarded::CsLibGuarded) |
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 |
---|---|---|
@@ -1,7 +1,17 @@ | ||
{ | ||
"name": "libguarded", | ||
"version-date": "2019-08-27", | ||
"port-version": 3, | ||
"description": "The libGuarded library is a standalone header-only library for multithreaded programming.", | ||
"homepage": "https://github.com/copperspice/libguarded" | ||
"version": "1.4.1", | ||
"description": "Header-only library for multithreaded programming.", | ||
"homepage": "https://github.com/copperspice/libguarded", | ||
"license": "BSD-2-Clause", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
] | ||
} |
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