From 4d3ef674ac8efe24c4f300a4986265b155d749a0 Mon Sep 17 00:00:00 2001 From: NRK Date: Fri, 7 Mar 2025 21:06:56 +0000 Subject: [PATCH] disable static library --- CMakeLists.txt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c064a7..3d723f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,6 @@ set ( ly_src_dir ${ly_base_dir}/source ) set ( ly_inc_dir ${ly_base_dir}/include ) set ( ly_tst_dir ${ly_base_dir}/unit_test ) set ( ly_lib_name yuv ) -set ( ly_lib_static ${ly_lib_name} ) set ( ly_lib_shared ${ly_lib_name}_shared ) # We cannot use GLOB here since we want to be able to separate out files that @@ -174,9 +173,6 @@ if(LOONGARCH64) endif() endif() -# this creates the static library (.a) -add_library( ${ly_lib_static} STATIC ${ly_lib_parts}) - # this creates the shared library (.so) add_library( ${ly_lib_shared} SHARED ${ly_lib_parts}) set_target_properties( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" ) @@ -187,15 +183,15 @@ endif() # this creates the cpuid tool add_executable ( cpuid ${ly_base_dir}/util/cpuid.c ) -target_link_libraries ( cpuid ${ly_lib_static} ) +target_link_libraries ( cpuid ${ly_lib_shared} ) # 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 ${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 ${ly_lib_shared} ) find_package ( JPEG ) if (JPEG_FOUND) @@ -225,7 +221,7 @@ if(UNIT_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) @@ -248,7 +244,6 @@ endif() # install the conversion tool, .so, .a, and all the header files install ( TARGETS yuvconvert DESTINATION ${CMAKE_INSTALL_BINDIR} ) -install ( TARGETS ${ly_lib_static} DESTINATION ${CMAKE_INSTALL_LIBDIR} ) install ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) install ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) -- 2.48.1