From: Peter Lemenkov Date: Wed, 5 Jun 2024 20:51:34 +0200 Subject: [PATCH] Move Linux variables to the top Signed-off-by: Peter Lemenkov diff --git a/CMakeLists.txt b/CMakeLists.txt index 6dfc93ce..aae18296 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,9 @@ PROJECT ( YUV C CXX ) # "C" is required even for C++ projects CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 ) OPTION( UNIT_TEST "Built unit tests" OFF ) +# create the .deb and .rpm packages using cpack +INCLUDE ( CM_linux_packages.cmake ) + SET ( ly_base_dir ${PROJECT_SOURCE_DIR} ) SET ( ly_src_dir ${ly_base_dir}/source ) SET ( ly_inc_dir ${ly_base_dir}/include ) @@ -190,7 +193,3 @@ INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin ) INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib ) INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include ) - -# create the .deb and .rpm packages using cpack -INCLUDE ( CM_linux_packages.cmake ) - From: Peter Lemenkov Date: Fri, 21 Sep 2018 12:45:55 +0200 Subject: [PATCH] Use a proper so-version Signed-off-by: Peter Lemenkov diff --git a/CMakeLists.txt b/CMakeLists.txt index aae18296..408032c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,6 +123,7 @@ ADD_LIBRARY( ${ly_lib_static} STATIC ${ly_lib_parts}) ADD_LIBRARY( ${ly_lib_shared} SHARED ${ly_lib_parts}) SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" ) SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES PREFIX "lib" ) +SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES VERSION "${YUV_VERSION}" SOVERSION "${YUV_VER_MAJOR}" ) if(WIN32) SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES IMPORT_PREFIX "lib" ) endif() 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 408032c6..a8368af4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,15 +130,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) @@ -168,7 +168,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) From: Peter Lemenkov Date: Mon, 24 Sep 2018 15:08:45 +0200 Subject: [PATCH] Disable static library Signed-off-by: Peter Lemenkov diff --git a/CMakeLists.txt b/CMakeLists.txt index a8368af4..b3b22c47 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 @@ -116,9 +115,6 @@ if(NOT MSVC) 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}" ) @@ -189,8 +185,7 @@ if(UNIT_TEST) endif() -# install the conversion tool, .so, .a, and all the header files +# install the conversion tool, .so, and all the header files INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin ) -INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib ) INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include ) From: Peter Lemenkov Date: Wed, 5 Jun 2024 20:52:19 +0200 Subject: [PATCH] Link against math library for roundf Signed-off-by: Peter Lemenkov diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e4c79db..b6a19a09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,11 +130,11 @@ 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_shared} ) +TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_shared} m ) # this creates the yuvconstants tool ADD_EXECUTABLE ( yuvconstants ${ly_base_dir}/util/yuvconstants.c ) -TARGET_LINK_LIBRARIES ( yuvconstants ${ly_lib_shared} ) +TARGET_LINK_LIBRARIES ( yuvconstants ${ly_lib_shared} m ) find_package ( JPEG ) if (JPEG_FOUND)