mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:09:00 +08:00
[tobias-loew-flags] add new port (#41282)
This commit is contained in:
parent
f097a7895d
commit
9b44f143bd
62
ports/tobias-loew-flags/add-install-configuration.patch
Normal file
62
ports/tobias-loew-flags/add-install-configuration.patch
Normal file
@ -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")
|
||||
+
|
18
ports/tobias-loew-flags/portfile.cmake
Normal file
18
ports/tobias-loew-flags/portfile.cmake
Normal file
@ -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")
|
13
ports/tobias-loew-flags/vcpkg.json
Normal file
13
ports/tobias-loew-flags/vcpkg.json
Normal file
@ -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
|
||||
}
|
||||
]
|
||||
}
|
@ -9012,6 +9012,10 @@
|
||||
"baseline": "2019-10-14",
|
||||
"port-version": 1
|
||||
},
|
||||
"tobias-loew-flags": {
|
||||
"baseline": "2024-09-10",
|
||||
"port-version": 0
|
||||
},
|
||||
"toml11": {
|
||||
"baseline": "4.2.0",
|
||||
"port-version": 0
|
||||
|
9
versions/t-/tobias-loew-flags.json
Normal file
9
versions/t-/tobias-loew-flags.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "2de8995b035f3c2fa68d55eaec02d657c835cfbd",
|
||||
"version-date": "2024-09-10",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user