forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bloomberg-quantum] add new port (microsoft#34682)
* [quantum] add new port * fix deps * [bloomberg-quantum]:not work now * [quantum] add new port * [quantum] add new port * [quantum] add new port * fix deps * rename config file
- Loading branch information
Showing
5 changed files
with
99 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,22 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO bloomberg/quantum | ||
REF f4b872f99480bc7f2ab60620d99823e8f2d3b0d6 | ||
SHA512 c41930c8bb0a1b70fdd4123ef349a0e8e892e0ecd52b412a171b1ce05386323a9ed2376a792ac12cd69f7d5a97a257bc08c2b85ce8a5f16b6f4e75740823b53b | ||
HEAD_REF master | ||
PATCHES rename-config-file-and-namespace.patch | ||
) | ||
|
||
set(VCPKG_BUILD_TYPE release) # header-only | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
-DQUANTUM_EXPORT_PKGCONFIG=OFF | ||
) | ||
|
||
vcpkg_cmake_install() | ||
|
||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT} CONFIG_PATH "share/cmake/unofficial-${PORT}") | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") |
46 changes: 46 additions & 0 deletions
46
ports/bloomberg-quantum/rename-config-file-and-namespace.patch
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,46 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 5d22f0f..55d6f65 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -33,8 +33,9 @@ endif() | ||
if (NOT QUANTUM_PKGCONFIG_DIR) | ||
set(QUANTUM_PKGCONFIG_DIR share/pkgconfig) | ||
endif() | ||
+set(PROJECT_NAMESPACE_NAME unofficial-bloomberg-${PROJECT_NAME}) | ||
if (NOT QUANTUM_CMAKE_CONFIG_DIR) | ||
- set(QUANTUM_CMAKE_CONFIG_DIR share/cmake/${PROJECT_NAME}) | ||
+ set(QUANTUM_CMAKE_CONFIG_DIR share/cmake/${PROJECT_NAMESPACE_NAME}) | ||
endif() | ||
|
||
#Global options | ||
diff --git a/cmake/QuantumConfig.cmake.in b/cmake/unofficial-bloomberg-QuantumConfig.cmake.in | ||
similarity index 100% | ||
rename from cmake/QuantumConfig.cmake.in | ||
rename to cmake/unofficial-bloomberg-QuantumConfig.cmake.in | ||
diff --git a/quantum/CMakeLists.txt b/quantum/CMakeLists.txt | ||
index 1a721f9..1e93bc4 100644 | ||
--- a/quantum/CMakeLists.txt | ||
+++ b/quantum/CMakeLists.txt | ||
@@ -21,10 +21,10 @@ make_quantum_header() | ||
|
||
set(PKG_DIR "${CMAKE_BINARY_DIR}/package") | ||
set(PKGCONFIG_FILE "${PKG_DIR}/${PROJECT_TARGET_NAME}.pc") | ||
-set(TARGET_CONFIG_FILE "${PKG_DIR}/${PROJECT_NAME}Config.cmake") | ||
-set(TARGET_VERSION_FILE "${PKG_DIR}/${PROJECT_NAME}ConfigVersion.cmake") | ||
+set(TARGET_CONFIG_FILE "${PKG_DIR}/${PROJECT_NAMESPACE_NAME}Config.cmake") | ||
+set(TARGET_VERSION_FILE "${PKG_DIR}/${PROJECT_NAMESPACE_NAME}ConfigVersion.cmake") | ||
set(TARGET_EXPORT_NAME ${PROJECT_NAME}Targets) | ||
-set(NAMESPACE "${PROJECT_NAME}::") | ||
+set(NAMESPACE "${PROJECT_NAMESPACE_NAME}::") | ||
|
||
add_library(${PROJECT_TARGET_NAME} INTERFACE) | ||
set(QUANTUM_DEPENDENCIES Boost::context pthread) | ||
@@ -70,7 +70,7 @@ if (QUANTUM_EXPORT_CMAKE_CONFIG) | ||
|
||
# Generate CMAKE configuration file and exported targets | ||
configure_package_config_file( | ||
- "${PROJECT_SOURCE_DIR}/cmake/${PROJECT_NAME}Config.cmake.in" | ||
+ "${PROJECT_SOURCE_DIR}/cmake/${PROJECT_NAMESPACE_NAME}Config.cmake.in" | ||
"${TARGET_CONFIG_FILE}" | ||
INSTALL_DESTINATION "${QUANTUM_CMAKE_CONFIG_DIR}" | ||
PATH_VARS CMAKE_INSTALL_PREFIX CMAKE_INSTALL_INCLUDEDIR |
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 @@ | ||
{ | ||
"name": "bloomberg-quantum", | ||
"version-date": "2023-02-03", | ||
"description": "Powerful multi-threaded coroutine dispatcher and parallel execution engine", | ||
"homepage": "https://github.com/bloomberg/quantum/", | ||
"license": "Apache-2.0", | ||
"dependencies": [ | ||
"boost-context", | ||
{ | ||
"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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "9099d9be8e575f44a311cf7d5032ee5c9dcdc82f", | ||
"version-date": "2023-02-03", | ||
"port-version": 0 | ||
} | ||
] | ||
} |
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