contrib: srt: Apply a patch to fix link flags
[vlc.git] / contrib / src / srt / fix-pc.patch
1 From 2f96045d17b2fc912d8bece54adf1cbe774166dd Mon Sep 17 00:00:00 2001
2 From: Justin Kim <justin.kim@collabora.com>
3 Date: Fri, 8 Dec 2017 20:43:54 +0900
4 Subject: [PATCH] CMakeLists.txt: substitute link flags for package names
5
6 Signed-off-by: Justin Kim <justin.kim@collabora.com>
7 ---
8  CMakeLists.txt | 3 ++-
9  1 file changed, 2 insertions(+), 1 deletion(-)
10
11 diff --git a/CMakeLists.txt b/CMakeLists.txt
12 index 8e02b58..d9a8a1b 100644
13 --- a/CMakeLists.txt
14 +++ b/CMakeLists.txt
15 @@ -90,6 +90,7 @@ set_if(LINUX ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
16  # find OpenSSL
17  if ( USE_GNUTLS )
18         pkg_check_modules (SSL REQUIRED gnutls nettle)
19 +       set (SRT_LIBS_PRIVATE ${SSL_LDFLAGS})
20  
21         add_definitions(
22                 -DUSE_GNUTLS=1
23 @@ -102,6 +103,7 @@ else()
24         find_package(OpenSSL REQUIRED)
25         set (SSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
26         set (SSL_LIBRARIES ${OPENSSL_LIBRARIES})
27 +       set (SRT_LIBS_PRIVATE ${SSL_LIBRARIES})
28  
29         add_definitions(
30                 -DHAICRYPT_USE_OPENSSL_EVP=1
31 @@ -358,7 +360,6 @@ target_include_directories(${TARGET_haicrypt}
32  
33  set_target_properties (${TARGET_haicrypt} PROPERTIES VERSION ${SRT_VERSION} SOVERSION ${SRT_VERSION_MAJOR})
34  target_link_libraries(${TARGET_haicrypt} PRIVATE ${SSL_LIBRARIES})
35 -set (SRT_LIBS_PRIVATE ${SSL_LIBRARIES})
36  if (WIN32)
37         target_link_libraries(${TARGET_haicrypt} PRIVATE ws2_32.lib)
38         set (SRT_LIBS_PRIVATE ${SRT_LIBS_PRIVATE} ws2_32.lib)
39 -- 
40 2.15.1
41