python-pyasn: bump to version 1.6.0b1
[buildroot-gz.git] / package / libftdi1 / 0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
blob487fc2821525287cb377b8f0fc8e4c71a67ee1b0
1 From 7e57ff280b55b45e74329b9988279e8831d32eab Mon Sep 17 00:00:00 2001
2 From: Samuel Martin <s.martin49@gmail.com>
3 Date: Sun, 25 Jan 2015 09:45:04 +0100
4 Subject: [PATCH 1/2] cmake: use the standard CMake flag to drive the shared
5 object build
7 Remove the STATICLIBS CMake option (and the code handling it) and let
8 the standard CMake flags drive the shared object build.
10 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
11 ---
12 CMakeLists.txt | 2 --
13 ftdipp/CMakeLists.txt | 15 +--------------
14 src/CMakeLists.txt | 13 +------------
15 3 files changed, 2 insertions(+), 28 deletions(-)
17 diff --git a/CMakeLists.txt b/CMakeLists.txt
18 index 74f80f4..0ba0b08 100644
19 --- a/CMakeLists.txt
20 +++ b/CMakeLists.txt
21 @@ -46,8 +46,6 @@ set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development")
22 set(CPACK_COMPONENT_STATICLIBS_GROUP "Development")
23 set(CPACK_COMPONENT_HEADERS_GROUP "Development")
25 -option ( STATICLIBS "Build static libraries" ON )
27 # guess LIB_SUFFIX, don't take debian multiarch into account
28 if ( NOT DEFINED LIB_SUFFIX )
29 if( CMAKE_SYSTEM_NAME MATCHES "Linux"
30 diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt
31 index 7500211..27e7884 100644
32 --- a/ftdipp/CMakeLists.txt
33 +++ b/ftdipp/CMakeLists.txt
34 @@ -23,8 +23,7 @@ if (FTDIPP)
35 set(FTDI_BUILD_CPP True PARENT_SCOPE)
36 message(STATUS "Building libftdi1++")
38 - # Shared library
39 - add_library(ftdipp1 SHARED ${cpp_sources})
40 + add_library(ftdipp1 ${cpp_sources})
42 math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatiblity with previous releases
43 set_target_properties(ftdipp1 PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
44 @@ -41,18 +40,6 @@ if (FTDIPP)
45 LIBRARY DESTINATION lib${LIB_SUFFIX}
46 ARCHIVE DESTINATION lib${LIB_SUFFIX}
49 - # Static library
50 - if ( STATICLIBS )
51 - add_library(ftdipp1-static STATIC ${cpp_sources})
52 - set_target_properties(ftdipp1-static PROPERTIES OUTPUT_NAME "ftdipp1")
53 - set_target_properties(ftdipp1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
55 - install ( TARGETS ftdipp1-static
56 - ARCHIVE DESTINATION lib${LIB_SUFFIX}
57 - COMPONENT staticlibs
58 - )
59 - endif ()
61 install ( FILES ${cpp_headers}
62 DESTINATION include/${PROJECT_NAME}
63 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
64 index 9fd86a6..501d4a8 100644
65 --- a/src/CMakeLists.txt
66 +++ b/src/CMakeLists.txt
67 @@ -21,7 +21,7 @@ configure_file(ftdi_version_i.h.in "${CMAKE_CURRENT_BINARY_DIR}/ftdi_version_i.h
68 set(c_sources ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.c ${CMAKE_CURRENT_SOURCE_DIR}/ftdi_stream.c CACHE INTERNAL "List of c sources" )
69 set(c_headers ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.h CACHE INTERNAL "List of c headers" )
71 -add_library(ftdi1 SHARED ${c_sources})
72 +add_library(ftdi1 ${c_sources})
74 math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatiblity with previous releases
75 set_target_properties(ftdi1 PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
76 @@ -38,17 +38,6 @@ install ( TARGETS ftdi1
77 ARCHIVE DESTINATION lib${LIB_SUFFIX}
80 -if ( STATICLIBS )
81 - add_library(ftdi1-static STATIC ${c_sources})
82 - target_link_libraries(ftdi1-static ${LIBUSB_LIBRARIES})
83 - set_target_properties(ftdi1-static PROPERTIES OUTPUT_NAME "ftdi1")
84 - set_target_properties(ftdi1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
85 - install ( TARGETS ftdi1-static
86 - ARCHIVE DESTINATION lib${LIB_SUFFIX}
87 - COMPONENT staticlibs
88 - )
89 -endif ()
91 install ( FILES ${c_headers}
92 DESTINATION include/${PROJECT_NAME}
93 COMPONENT headers
94 --
95 2.2.2