python-cryptography: bump to version 1.7.2
[buildroot-gz.git] / package / librtlsdr / 0001-disable_shared_library_target_in_build.patch
blobb763c48b2e4fc9c35d3d060f1f30fe540edc837b
1 librtlsdr: disable shared library target in build
3 Disable shared library target if BUILD_SHARED_LIBS if OFF.
5 Signed-off-by: Yuvaraj Patil <yuvaraj.patil@wipro.com>
6 ---
7 diff -Nurp librtlsdr-v0.5.3_orig/src/CMakeLists.txt librtlsdr-v0.5.3/src/CMakeLists.txt
8 --- librtlsdr-v0.5.3_orig/src/CMakeLists.txt 2014-09-24 17:31:40.610337074 +0530
9 +++ librtlsdr-v0.5.3/src/CMakeLists.txt 2014-09-24 17:32:38.838334632 +0530
10 @@ -20,6 +20,7 @@
11 ########################################################################
12 # Setup library
13 ########################################################################
14 +if(BUILD_SHARED_LIBS)
15 add_library(rtlsdr_shared SHARED
16 librtlsdr.c
17 tuner_e4k.c
18 @@ -37,6 +38,7 @@ set_target_properties(rtlsdr_shared PROP
19 set_target_properties(rtlsdr_shared PROPERTIES OUTPUT_NAME rtlsdr)
20 set_target_properties(rtlsdr_shared PROPERTIES SOVERSION ${MAJOR_VERSION})
21 set_target_properties(rtlsdr_shared PROPERTIES VERSION ${LIBVER})
22 +endif()
24 add_library(rtlsdr_static STATIC
25 librtlsdr.c
26 @@ -71,6 +73,12 @@ if(NOT WIN32)
27 set_target_properties(rtlsdr_static PROPERTIES OUTPUT_NAME rtlsdr)
28 endif()
30 +if(BUILD_SHARED_LIBS)
31 +set(rtlsdr_lib rtlsdr_shared)
32 +else()
33 +set(rtlsdr_lib rtlsdr_static)
34 +endif()
36 ########################################################################
37 # Build utility
38 ########################################################################
39 @@ -81,33 +89,33 @@ add_executable(rtl_fm rtl_fm.c)
40 add_executable(rtl_eeprom rtl_eeprom.c)
41 add_executable(rtl_adsb rtl_adsb.c)
42 add_executable(rtl_power rtl_power.c)
43 -set(INSTALL_TARGETS rtlsdr_shared rtlsdr_static rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power)
44 +set(INSTALL_TARGETS ${rtlsdr_lib} rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power)
46 -target_link_libraries(rtl_sdr rtlsdr_shared convenience_static
47 +target_link_libraries(rtl_sdr ${rtlsdr_lib} convenience_static
48 ${LIBUSB_LIBRARIES}
49 ${CMAKE_THREAD_LIBS_INIT}
51 -target_link_libraries(rtl_tcp rtlsdr_shared convenience_static
52 +target_link_libraries(rtl_tcp ${rtlsdr_lib} convenience_static
53 ${LIBUSB_LIBRARIES}
54 ${CMAKE_THREAD_LIBS_INIT}
56 -target_link_libraries(rtl_test rtlsdr_shared convenience_static
57 +target_link_libraries(rtl_test ${rtlsdr_lib} convenience_static
58 ${LIBUSB_LIBRARIES}
59 ${CMAKE_THREAD_LIBS_INIT}
61 -target_link_libraries(rtl_fm rtlsdr_shared convenience_static
62 +target_link_libraries(rtl_fm ${rtlsdr_lib} convenience_static
63 ${LIBUSB_LIBRARIES}
64 ${CMAKE_THREAD_LIBS_INIT}
66 -target_link_libraries(rtl_eeprom rtlsdr_shared convenience_static
67 +target_link_libraries(rtl_eeprom ${rtlsdr_lib} convenience_static
68 ${LIBUSB_LIBRARIES}
69 ${CMAKE_THREAD_LIBS_INIT}
71 -target_link_libraries(rtl_adsb rtlsdr_shared convenience_static
72 +target_link_libraries(rtl_adsb ${rtlsdr_lib} convenience_static
73 ${LIBUSB_LIBRARIES}
74 ${CMAKE_THREAD_LIBS_INIT}
76 -target_link_libraries(rtl_power rtlsdr_shared convenience_static
77 +target_link_libraries(rtl_power ${rtlsdr_lib} convenience_static
78 ${LIBUSB_LIBRARIES}
79 ${CMAKE_THREAD_LIBS_INIT}