mirror of https://github.com/microsoft/vcpkg.git
45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index a08247a..7ccbf85 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -285,7 +285,7 @@ target_include_directories(srtp2 PUBLIC
|
|
)
|
|
if(ENABLE_OPENSSL)
|
|
target_include_directories(srtp2 PRIVATE ${OPENSSL_INCLUDE_DIR})
|
|
- target_link_libraries(srtp2 OpenSSL::Crypto)
|
|
+ target_link_libraries(srtp2 PRIVATE OpenSSL::Crypto)
|
|
elseif(ENABLE_MBEDTLS)
|
|
target_include_directories(srtp2 PRIVATE ${MBEDTLS_INCLUDE_DIRS})
|
|
target_link_libraries(srtp2 ${MBEDTLS_LIBRARIES})
|
|
@@ -294,7 +294,7 @@ elseif(ENABLE_NSS)
|
|
target_link_libraries(srtp2 ${NSS_LIBRARIES})
|
|
endif()
|
|
if(WIN32)
|
|
- target_link_libraries(srtp2 ws2_32)
|
|
+ target_link_libraries(srtp2 PRIVATE ws2_32)
|
|
target_compile_definitions(srtp2 PUBLIC _CRT_SECURE_NO_WARNINGS)
|
|
endif()
|
|
|
|
@@ -491,7 +491,7 @@ include(CMakePackageConfigHelpers)
|
|
# Generate the config file that is includes the exports
|
|
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
|
|
"${CMAKE_CURRENT_BINARY_DIR}/libSRTPConfig.cmake"
|
|
- INSTALL_DESTINATION "${CONFIG_FILE_DIR}"
|
|
+ INSTALL_DESTINATION lib/cmake/libSRTP
|
|
NO_SET_AND_CHECK_MACRO
|
|
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
|
)
|
|
diff --git a/Config.cmake.in b/Config.cmake.in
|
|
index 0ad9b17..c9ce5a7 100644
|
|
--- a/Config.cmake.in
|
|
+++ b/Config.cmake.in
|
|
@@ -1,3 +1,8 @@
|
|
@PACKAGE_INIT@
|
|
|
|
+if("@ENABLE_OPENSSL@")
|
|
+ include(CMakeFindDependencyMacro)
|
|
+ find_dependency(OpenSSL)
|
|
+endif()
|
|
+
|
|
include ( "${CMAKE_CURRENT_LIST_DIR}/libSRTPTargets.cmake" )
|