libyuv/Link-against-shared-library.patch
Callum Farmer 3fb622b3c0 Accepting request 1088148 from home:dziobian
- Update to snapshot 20230517+a377993 (version 1869 as referenced from Chromium master)
  * this is needed to build Electron 24
- Add libyuv-tools package
- Run test suite in %check

OBS-URL: https://build.opensuse.org/request/show/1088148
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libyuv?expand=0&rev=11
2023-05-22 12:49:55 +00:00

34 lines
1.3 KiB
Diff

From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 21 Sep 2018 12:47:42 +0200
Subject: [PATCH] Link against shared library
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e1f87062..bff03e88 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,11 +34,11 @@ SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES VERSION "0.0.0" SOVERSION 0
# this creates the conversion tool
ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc )
-TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} )
+TARGET_LINK_LIBRARIES ( yuvconvert PRIVATE ${ly_lib_shared} )
# this creates the yuvconstants tool
ADD_EXECUTABLE ( yuvconstants ${ly_base_dir}/util/yuvconstants.c )
-TARGET_LINK_LIBRARIES ( yuvconstants ${ly_lib_static} )
+TARGET_LINK_LIBRARIES ( yuvconstants PRIVATE ${ly_lib_shared} -lm )
find_package ( JPEG )
if (JPEG_FOUND)
@@ -61,7 +61,7 @@ if(TEST)
endif()
add_executable(libyuv_unittest ${ly_unittest_sources})
- target_link_libraries(libyuv_unittest ${ly_lib_name} ${GTEST_LIBRARY})
+ target_link_libraries(libyuv_unittest ${ly_lib_shared} ${GTEST_LIBRARY})
find_library(PTHREAD_LIBRARY pthread)
if(NOT PTHREAD_LIBRARY STREQUAL "PTHREAD_LIBRARY-NOTFOUND")
target_link_libraries(libyuv_unittest pthread)