-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[vcpkg baseline][qpid-proton] Fix dependencies (#24267)
* [vcpkg baseline][qpid-proton] Fix dependencies * version * Re-fix jsoncpp * version * typo * version * okay fix for reals Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
- Loading branch information
1 parent
9f074ff
commit 3f2dfb8
Showing
6 changed files
with
150 additions
and
29 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,117 @@ | ||
diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt | ||
index 27b40e7..1931b65 100644 | ||
--- a/c/CMakeLists.txt | ||
+++ b/c/CMakeLists.txt | ||
@@ -727,11 +727,6 @@ install (FILES | ||
${CMAKE_CURRENT_BINARY_DIR}/ProtonConfig.cmake | ||
${CMAKE_CURRENT_BINARY_DIR}/ProtonConfigVersion.cmake | ||
DESTINATION ${LIB_INSTALL_DIR}/cmake/Proton) | ||
-install (FILES | ||
- ../tools/cmake/Modules/FindCyrusSASL.cmake | ||
- ../tools/cmake/Modules/FindOpenSSL.cmake | ||
- ../tools/cmake/Modules/FindThreads.cmake | ||
- DESTINATION ${LIB_INSTALL_DIR}/cmake/Proton) | ||
|
||
if (ENABLE_BENCHMARKS) | ||
add_subdirectory(benchmarks) | ||
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt | ||
index 03fe80a..fd6a31d 100644 | ||
--- a/cpp/CMakeLists.txt | ||
+++ b/cpp/CMakeLists.txt | ||
@@ -26,12 +26,15 @@ find_package(Threads) | ||
include(versions.cmake) | ||
|
||
# Check for JSON-CPP support for connection configuration | ||
-find_package(JsonCpp) | ||
-option(ENABLE_JSONCPP "Use jsoncpp parser for connection configuration" ${JsonCpp_FOUND}) | ||
+option(ENABLE_JSONCPP "Use jsoncpp parser for connection configuration" OFF) | ||
if (ENABLE_JSONCPP) | ||
- include_directories(${JsonCpp_INCLUDE_DIRS}) | ||
+ find_package(jsoncpp CONFIG REQUIRED) | ||
set(CONNECT_CONFIG_SRC src/connect_config.cpp) | ||
- set(CONNECT_CONFIG_LIBS ${JsonCpp_LIBRARY}) | ||
+ if (TARGET jsoncpp_lib) | ||
+ set(CONNECT_CONFIG_LIBS jsoncpp_lib) | ||
+ elseif (TARGET jsoncpp_static) | ||
+ set(CONNECT_CONFIG_LIBS jsoncpp_static) | ||
+ endif() | ||
else() | ||
set(CONNECT_CONFIG_SRC src/connect_config_dummy.cpp) | ||
endif() | ||
|
||
--- a/c/src/ProtonConfig.cmake.in | ||
+++ b/c/src/ProtonConfig.cmake.in | ||
@@ -20,39 +20,40 @@ | ||
# Name: Proton | ||
# Description: Qpid Proton C library | ||
# Version: @PN_VERSION@ | ||
# URL: http://qpid.apache.org/proton/ | ||
|
||
@PACKAGE_INIT@ | ||
-if (NOT Proton_USE_STATIC_LIBS) | ||
+include(CMakeFindDependencyMacro) | ||
+if (1) | ||
include("${CMAKE_CURRENT_LIST_DIR}/ProtonTargets.cmake") | ||
else() | ||
include("${CMAKE_CURRENT_LIST_DIR}/ProtonTargetsStatic.cmake") | ||
endif() | ||
|
||
set(Proton_VERSION @PN_VERSION@) | ||
|
||
# find dependencies, because static libs don't transitively pull them | ||
-if (Proton_USE_STATIC_LIBS) | ||
- set(CMAKE_MODULE_PATH_OLD ${CMAKE_MODULE_PATH}) | ||
- set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") | ||
+if (1) | ||
+ #set(CMAKE_MODULE_PATH_OLD ${CMAKE_MODULE_PATH}) | ||
+ #set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") | ||
|
||
set(CyrusSASL_FOUND @CyrusSASL_FOUND@) | ||
if (CyrusSASL_FOUND) | ||
- find_package (CyrusSASL REQUIRED) | ||
+ find_dependency (CyrusSASL) | ||
endif() | ||
|
||
set(OPENSSL_FOUND @OPENSSL_FOUND@) | ||
set(OpenSSL_FOUND @OpenSSL_FOUND@) | ||
if (OPENSSL_FOUND OR OpenSSL_FOUND) | ||
- find_package (OpenSSL REQUIRED) | ||
+ find_dependency (OpenSSL) | ||
endif() | ||
|
||
- find_package (Threads REQUIRED) | ||
+ find_dependency (Threads) | ||
|
||
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_OLD}) | ||
+ #set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_OLD}) | ||
endif() | ||
|
||
set (Proton_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@) | ||
set (Proton_LIBRARIES Proton::qpid-proton) | ||
set (Proton_FOUND True) | ||
|
||
--- a/cpp/ProtonCppConfig.cmake.in | ||
+++ b/cpp/ProtonCppConfig.cmake.in | ||
@@ -20,19 +20,21 @@ | ||
# Name: Proton | ||
# Description: Qpid Proton C library | ||
# Version: @PN_VERSION@ | ||
# URL: http://qpid.apache.org/proton/ | ||
|
||
@PACKAGE_INIT@ | ||
-if (NOT ProtonCpp_USE_STATIC_LIBS) | ||
+include(CMakeFindDependencyMacro) | ||
+find_dependency(Proton CONFIG) | ||
+if (1) | ||
include("${CMAKE_CURRENT_LIST_DIR}/ProtonCppTargets.cmake") | ||
else() | ||
include("${CMAKE_CURRENT_LIST_DIR}/ProtonCppTargetsStatic.cmake") | ||
endif() | ||
|
||
set (ProtonCpp_VERSION @PN_VERSION@) | ||
|
||
set (ProtonCpp_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@) | ||
set (ProtonCpp_LIBRARIES Proton::cpp) | ||
set (ProtonCpp_FOUND True) | ||
|
||
check_required_components(ProtonCpp) |
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 was deleted.
Oops, something went wrong.
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
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