From: Peter Lemenkov Date: Fri, 21 Sep 2018 12:47:42 +0200 Subject: [PATCH] Link against shared library Signed-off-by: Peter Lemenkov 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)