Fix dependencies for azure-core-amqp-cpp (#4770)

* Fix dependencies for azure-core-amqp-cpp

* Update sdk/core/azure-core-amqp/CMakeLists.txt

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
This commit is contained in:
Anton Kolesnyk 2023-07-07 12:23:12 -07:00 committed by GitHub
parent 2f32786171
commit 2f3e5de931
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -31,7 +31,7 @@ if(NOT AZ_ALL_LIBRARIES)
endif()
find_package(uamqp CONFIG REQUIRED)
find_package(umock_c)
find_package(umock_c CONFIG REQUIRED)
find_package(azure_macro_utils_c CONFIG REQUIRED)
find_package(azure_c_shared_utility CONFIG REQUIRED)
@ -101,8 +101,9 @@ add_library(Azure::azure-core-amqp ALIAS azure-core-amqp)
# coverage. Has no effect if BUILD_CODE_COVERAGE is OFF
create_code_coverage(core azure-core-amqp azure-core-amqp-tests "tests?/*;samples?/*")
# uAMQP's headers require the manual addition of umock_c and azure_macro_utils_c to the target link libraries.
target_link_libraries(azure-core-amqp PRIVATE uamqp umock_c azure_macro_utils_c PUBLIC Azure::azure-core)
# cspell:words aziotsharedutil
# uAMQP's headers require the manual addition of umock_c, azure_macro_utils_c, and aziotsharedutil to the target link libraries.
target_link_libraries(azure-core-amqp PRIVATE uamqp umock_c azure_macro_utils_c aziotsharedutil PUBLIC Azure::azure-core)
get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp")
generate_documentation(azure-core-amqp ${AZ_LIBRARY_VERSION})

View File

@ -4,9 +4,12 @@
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(azure-core-cpp "1.9.0-beta.1")
find_dependency(azure-core-cpp)
find_dependency(azure-uamqp-c)
find_dependency(uamqp)
find_dependency(umock_c)
find_dependency(azure_macro_utils_c)
find_dependency(azure_c_shared_utility)
include("${CMAKE_CURRENT_LIST_DIR}/azure-core-amqp-cppTargets.cmake")