forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tobias-loew-flags] add new port (microsoft#41282)
- Loading branch information
Showing
5 changed files
with
106 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,62 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 78d96ff..3215aca 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -65,7 +65,39 @@ endif() | ||
################################################## | ||
add_library(boost_flags INTERFACE) | ||
#target_include_directories(boost_flags PUBLIC ${Boost_INCLUDE_DIRS}) | ||
-target_include_directories(boost_flags INTERFACE ${CMAKE_SOURCE_DIR}/include) | ||
+target_include_directories(boost_flags | ||
+ INTERFACE | ||
+ $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include> | ||
+ $<INSTALL_INTERFACE:include> | ||
+ ) | ||
+set_target_properties(boost_flags PROPERTIES | ||
+ EXPORT_NAME flags | ||
+) | ||
+include(CMakePackageConfigHelpers) | ||
+ | ||
+configure_package_config_file( | ||
+ cmake/unofficial-tobias-loew-flags-config.cmake.in | ||
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake/unofficial-tobias-loew-flags-config.cmake" | ||
+ INSTALL_DESTINATION share/unofficial-tobias-loew-flags/ | ||
+ NO_CHECK_REQUIRED_COMPONENTS_MACRO) | ||
+ | ||
+# Install. | ||
+install(TARGETS boost_flags EXPORT unofficial-tobias-loew-flags) | ||
+ | ||
+install( | ||
+ EXPORT unofficial-tobias-loew-flags | ||
+ NAMESPACE unofficial::tobias-loew-flags:: | ||
+ FILE unofficial-tobias-loew-flags-targets.cmake | ||
+ DESTINATION share/unofficial-tobias-loew-flags/) | ||
+ | ||
+install(DIRECTORY include/boost DESTINATION include) | ||
+ | ||
+install( | ||
+ FILES | ||
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake/unofficial-tobias-loew-flags-config.cmake" | ||
+ DESTINATION share/unofficial-tobias-loew-flags) | ||
+ | ||
+if(0) | ||
if (Boost_FOUND) | ||
target_include_directories(boost_flags INTERFACE ${Boost_INCLUDE_DIRS}) | ||
endif() | ||
@@ -79,4 +111,5 @@ endif() | ||
# Subdirectories | ||
################################################## | ||
add_subdirectory(test) | ||
+endif() | ||
# add_subdirectory(example) | ||
diff --git a/cmake/unofficial-tobias-loew-flags-config.cmake.in b/cmake/unofficial-tobias-loew-flags-config.cmake.in | ||
new file mode 100644 | ||
index 0000000..9a784e1 | ||
--- /dev/null | ||
+++ b/cmake/unofficial-tobias-loew-flags-config.cmake.in | ||
@@ -0,0 +1,5 @@ | ||
+ | ||
+@PACKAGE_INIT@ | ||
+ | ||
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-tobias-loew-flags-targets.cmake") | ||
+ |
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,18 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO tobias-loew/flags | ||
REF 7a3cb950b79e7ab596ae22da30fa685c70ef497b | ||
SHA512 a7835c3508830c1e215c301588ca26be84a6e1ca6ed4bfb5a3225bb390bf0637ac368bd7214e56809b24f6ac26a9e6f9478adf03d8e9140c2bd430c88f1c8f26 | ||
HEAD_REF main | ||
PATCHES add-install-configuration.patch | ||
) | ||
|
||
set(VCPKG_BUILD_TYPE release) # header-only | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
) | ||
|
||
vcpkg_cmake_install() | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") |
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,13 @@ | ||
{ | ||
"name": "tobias-loew-flags", | ||
"version-date": "2024-09-10", | ||
"description": "type-safe bitwise operations in C++, to be proposed for Boost", | ||
"homepage": "https://tobias-loew.github.io/flags/doc/html/flags.html", | ||
"license": "BSL-1.0", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "2de8995b035f3c2fa68d55eaec02d657c835cfbd", | ||
"version-date": "2024-09-10", | ||
"port-version": 0 | ||
} | ||
] | ||
} |