]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/libyuv/fix-build-type.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / libyuv / fix-build-type.patch
1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index 50442cd..fdc82f2 100644
3 --- a/CMakeLists.txt
4 +++ b/CMakeLists.txt
5 @@ -28,24 +28,32 @@ LIST ( SORT ly_unittest_sources )
6 INCLUDE_DIRECTORIES( BEFORE ${ly_inc_dir} )
7
8 # this creates the static library (.a)
9 +if (NOT BUILD_SHARED_LIBS)
10 ADD_LIBRARY ( ${ly_lib_static} STATIC ${ly_source_files} )
11 SET_TARGET_PROPERTIES( ${ly_lib_static} PROPERTIES PUBLIC_HEADER include/libyuv.h )
12 -
13 +else()
14 # this creates the shared library (.so)
15 ADD_LIBRARY ( ${ly_lib_shared} SHARED ${ly_source_files} )
16 SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" )
17 SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES PREFIX "lib" )
18 -
19 +endif()
20 # this creates the conversion tool
21 ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc )
22 -TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} )
23 -
24 +if (BUILD_SHARED_LIBS)
25 + TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_shared} )
26 +else()
27 + TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} )
28 +endif()
29
30 INCLUDE ( FindJPEG )
31 if (JPEG_FOUND)
32 - include_directories( ${JPEG_INCLUDE_DIR} )
33 - target_link_libraries( ${ly_lib_shared} PUBLIC ${JPEG_LIBRARY} )
34 - target_link_libraries( yuvconvert ${JPEG_LIBRARY} )
35 + include_directories( ${JPEG_INCLUDE_DIR})
36 + if( BUILD_SHARED_LIBS)
37 + target_link_libraries(${ly_lib_shared} PUBLIC ${JPEG_LIBRARY})
38 + else()
39 + target_link_libraries(${ly_lib_static} PUBLIC ${JPEG_LIBRARY})
40 + endif()
41 + target_link_libraries(yuvconvert ${JPEG_LIBRARY})
42 add_definitions( -DHAVE_JPEG )
43 endif()
44
45 @@ -88,11 +96,13 @@ endif()
46
47
48 # install the conversion tool, .so, .a, and all the header files
49 -INSTALL ( TARGETS yuvconvert DESTINATION bin )
50 +INSTALL ( TARGETS yuvconvert DESTINATION tools )
51 INSTALL ( FILES ${ly_include_files} DESTINATION include/libyuv )
52 -INSTALL ( TARGETS ${ly_lib_static} EXPORT libyuv-targets DESTINATION lib INCLUDES DESTINATION include PUBLIC_HEADER DESTINATION include )
53 -INSTALL ( TARGETS ${ly_lib_shared} EXPORT libyuv-targets LIBRARY DESTINATION lib RUNTIME DESTINATION bin )
54 -
55 +if (NOT BUILD_SHARED_LIBS)
56 + INSTALL ( TARGETS ${ly_lib_static} EXPORT libyuv-targets DESTINATION lib INCLUDES DESTINATION include PUBLIC_HEADER DESTINATION include )
57 +else()
58 + INSTALL ( TARGETS ${ly_lib_shared} EXPORT libyuv-targets LIBRARY DESTINATION lib RUNTIME DESTINATION bin )
59 +endif()
60 INSTALL( EXPORT libyuv-targets DESTINATION share/cmake/libyuv/ EXPORT_LINK_INTERFACE_LIBRARIES )
61
62 # create the .deb and .rpm packages using cpack