|
| 1 | +From b8d80e06d1a36cce5b807dac82b479d6cfe5f760 Mon Sep 17 00:00:00 2001 |
| 2 | +From: qianlongxu < [email protected]> |
| 3 | +Date: Wed, 3 Dec 2025 12:50:07 +0800 |
| 4 | +Subject: [PATCH] skip binary and shared lib and jpeg |
| 5 | + |
| 6 | +--- |
| 7 | + CMakeLists.txt | 11 +++++++++++ |
| 8 | + 1 file changed, 11 insertions(+) |
| 9 | + |
| 10 | +diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 11 | +index 77e0527..ef5af28 100644 |
| 12 | +--- a/CMakeLists.txt |
| 13 | ++++ b/CMakeLists.txt |
| 14 | +@@ -5,6 +5,7 @@ |
| 15 | + cmake_minimum_required( VERSION 3.16 ) |
| 16 | + project ( YUV C CXX ) # "C" is required even for C++ projects |
| 17 | + option( UNIT_TEST "Built unit tests" OFF ) |
| 18 | ++OPTION( BINARY "Built binary" OFF ) |
| 19 | + |
| 20 | + include(CheckCSourceCompiles) |
| 21 | + |
| 22 | +@@ -172,6 +173,7 @@ endif() |
| 23 | + # this creates the static library (.a) |
| 24 | + add_library( ${ly_lib_static} STATIC ${ly_lib_parts}) |
| 25 | + |
| 26 | ++if(BUILD_SHARED_LIBS) |
| 27 | + # this creates the shared library (.so) |
| 28 | + add_library( ${ly_lib_shared} SHARED ${ly_lib_parts}) |
| 29 | + set_target_properties( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" ) |
| 30 | +@@ -179,7 +181,9 @@ set_target_properties( ${ly_lib_shared} PROPERTIES PREFIX "lib" ) |
| 31 | + if(WIN32) |
| 32 | + set_target_properties( ${ly_lib_shared} PROPERTIES IMPORT_PREFIX "lib" ) |
| 33 | + endif() |
| 34 | ++endif() |
| 35 | + |
| 36 | ++if(BINARY) |
| 37 | + # this creates the cpuid tool |
| 38 | + add_executable ( cpuid ${ly_base_dir}/util/cpuid.c ) |
| 39 | + target_link_libraries ( cpuid ${ly_lib_static} ) |
| 40 | +@@ -198,6 +202,7 @@ if (JPEG_FOUND) |
| 41 | + target_link_libraries( ${ly_lib_shared} ${JPEG_LIBRARY} ) |
| 42 | + add_definitions( -DHAVE_JPEG ) |
| 43 | + endif() |
| 44 | ++endif() |
| 45 | + |
| 46 | + if(UNIT_TEST) |
| 47 | + find_library(GTEST_LIBRARY gtest) |
| 48 | +@@ -241,10 +246,16 @@ if(UNIT_TEST) |
| 49 | + endif() |
| 50 | + |
| 51 | + |
| 52 | ++if(BINARY) |
| 53 | ++message("The BINARY option is enabled.") |
| 54 | + # install the conversion tool, .so, .a, and all the header files |
| 55 | + install ( TARGETS yuvconvert DESTINATION bin ) |
| 56 | ++endif() |
| 57 | + install ( TARGETS ${ly_lib_static} DESTINATION lib ) |
| 58 | ++if(BUILD_SHARED_LIBS) |
| 59 | ++message("The BUILD_SHARED_LIBS option is enabled.") |
| 60 | + install ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib ) |
| 61 | ++endif() |
| 62 | + install ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include ) |
| 63 | + |
| 64 | + # create the .deb and .rpm packages using cpack |
| 65 | +-- |
| 66 | +2.50.1 (Apple Git-155) |
| 67 | + |
0 commit comments