libftdi-git Archives

Subject: A library to talk to FTDI chips branch, master, updated. v1.0-9-g6217bc0

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 15 Mar 2013 16:57:08 +0100 (CET)
The branch, master has been updated
       via  6217bc0d7a98462ec1cdeda4275ed27a95170ef5 (commit)
      from  c5285326555f088e7626dfa67ea7059e094d6e73 (commit)


- Log -----------------------------------------------------------------
commit 6217bc0d7a98462ec1cdeda4275ed27a95170ef5
Author: Mike Frysinger <vapier@xxxxxxxxxx>
Date:   Fri Mar 1 03:13:32 2013 -0500

    make building of static libs optional
    
    Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>

-----------------------------------------------------------------------

Summary of changes:
 CMakeLists.txt        |    2 ++
 ftdipp/CMakeLists.txt |   30 +++++++++++++++++++-----------
 src/CMakeLists.txt    |   28 ++++++++++++++++++----------
 3 files changed, 39 insertions(+), 21 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e7127f7..9c7a6a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,6 +46,8 @@ set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development")
 set(CPACK_COMPONENT_STATICLIBS_GROUP "Development")
 set(CPACK_COMPONENT_HEADERS_GROUP    "Development")
 
+option ( STATICLIBS "Build static libraries" ON )
+
 # guess LIB_SUFFIX, don't take debian multiarch into account 
 if ( NOT DEFINED LIB_SUFFIX )
   if ( CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CROSSCOMPILING AND NOT 
EXISTS "/etc/debian_version" )
diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt
index 16184ee..d3a22ce 100644
--- a/ftdipp/CMakeLists.txt
+++ b/ftdipp/CMakeLists.txt
@@ -30,12 +30,16 @@ if (FTDIPP)
         set_target_properties(ftdipp1 PROPERTIES VERSION 
${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
 
         # Static library
-        add_library(ftdipp1-static STATIC ${cpp_sources})
-        set_target_properties(ftdipp1-static PROPERTIES OUTPUT_NAME "ftdipp1")
+        if (STATICLIBS)
+            add_library(ftdipp1-static STATIC ${cpp_sources})
+            set_target_properties(ftdipp1-static PROPERTIES OUTPUT_NAME 
"ftdipp1")
+        endif (STATICLIBS)
 
         # Prevent clobbering each other during the build
         set_target_properties(ftdipp1 PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-        set_target_properties(ftdipp1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+        if (STATICLIBS)
+            set_target_properties(ftdipp1-static PROPERTIES 
CLEAN_DIRECT_OUTPUT 1)
+        endif (STATICLIBS)
 
         # Dependencies
         target_link_libraries(ftdipp1 ftdi1 ${LIBUSB_LIBRARIES} 
${BOOST_LIBRARIES})
@@ -46,10 +50,12 @@ if (FTDIPP)
                         LIBRARY DESTINATION lib${LIB_SUFFIX}
                         COMPONENT sharedlibs
                         )
-            install( TARGETS ftdipp1-static
-                        ARCHIVE DESTINATION lib${LIB_SUFFIX}
-                        COMPONENT staticlibs
-                        )
+            if (STATICLIBS)
+                install( TARGETS ftdipp1-static
+                            ARCHIVE DESTINATION lib${LIB_SUFFIX}
+                            COMPONENT staticlibs
+                            )
+            endif (STATICLIBS)
             install( FILES ${cpp_headers}
                         DESTINATION include/${PROJECT_NAME}
                         COMPONENT headers
@@ -61,10 +67,12 @@ if (FTDIPP)
                         DESTINATION bin
                         COMPONENT sharedlibs
                         )
-            install( TARGETS ftdipp1-static
-                        DESTINATION bin
-                        COMPONENT staticlibs
-                        )
+            if (STATICLIBS)
+                install( TARGETS ftdipp1-static
+                            DESTINATION bin
+                            COMPONENT staticlibs
+                            )
+            endif (STATICLIBS)
             install( FILES ${cpp_headers}
                         DESTINATION include/${PROJECT_NAME}
                         COMPONENT headers
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1f39ee7..d67caba 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -28,11 +28,15 @@ set_target_properties(ftdi1 PROPERTIES VERSION 
${VERSION_FIXUP}.${MINOR_VERSION}
 
 # Static library
 add_library(ftdi1-static STATIC ${c_sources})
-set_target_properties(ftdi1-static PROPERTIES OUTPUT_NAME "ftdi1")
+if (STATICLIBS)
+    set_target_properties(ftdi1-static PROPERTIES OUTPUT_NAME "ftdi1")
+endif (STATICLIBS)
 
 # Prevent clobbering each other during the build
 set_target_properties(ftdi1 PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-set_target_properties(ftdi1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+if (STATICLIBS)
+    set_target_properties(ftdi1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+endif (STATICLIBS)
 
 # Dependencies
 target_link_libraries(ftdi1 ${LIBUSB_LIBRARIES})
@@ -45,10 +49,12 @@ if(${UNIX})
             COMPONENT sharedlibs
             )
 
-   install( TARGETS ftdi1-static
-            ARCHIVE DESTINATION lib${LIB_SUFFIX}
-            COMPONENT staticlibs
-            )
+   if (STATICLIBS)
+       install( TARGETS ftdi1-static
+                ARCHIVE DESTINATION lib${LIB_SUFFIX}
+                COMPONENT staticlibs
+                )
+   endif (STATICLIBS)
 
    install( FILES ${c_headers}
             DESTINATION include/${PROJECT_NAME}
@@ -64,10 +70,12 @@ if(${WIN32})
             COMPONENT sharedlibs
             )
 
-   install( TARGETS ftdi1-static
-            DESTINATION bin
-            COMPONENT staticlibs
-            )
+   if (STATICLIBS)
+       install( TARGETS ftdi1-static
+                DESTINATION bin
+                COMPONENT staticlibs
+                )
+   endif (STATICLIBS)
 
    install( FILES ${c_headers}
             DESTINATION include/${PROJECT_NAME}


hooks/post-receive
-- 
A library to talk to FTDI chips

--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread
  • A library to talk to FTDI chips branch, master, updated. v1.0-9-g6217bc0, libftdi-git <=