Cleaned static-lib cmake doc.
authorxantares <xantares09@hotmail.com>
Thu, 15 Aug 2013 07:45:22 +0000 (09:45 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Sep 2013 12:46:52 +0000 (14:46 +0200)
ftdipp/CMakeLists.txt

index 8f581ef..7500211 100644 (file)
@@ -29,17 +29,8 @@ if (FTDIPP)
     math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1")    # Compatiblity with previous releases
     set_target_properties(ftdipp1 PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
 
-    # Static library
-    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)
-    if (STATICLIBS)
-        set_target_properties(ftdipp1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-    endif (STATICLIBS)
 
     # Dependencies
     target_link_libraries(ftdipp1 ftdi1 ${LIBUSB_LIBRARIES} ${BOOST_LIBRARIES})
@@ -50,8 +41,13 @@ if (FTDIPP)
               LIBRARY DESTINATION lib${LIB_SUFFIX}
               ARCHIVE DESTINATION lib${LIB_SUFFIX}
             )
-    
+            
+    # Static library
     if ( STATICLIBS )
+      add_library(ftdipp1-static STATIC ${cpp_sources})
+      set_target_properties(ftdipp1-static PROPERTIES OUTPUT_NAME "ftdipp1")
+      set_target_properties(ftdipp1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+
       install ( TARGETS ftdipp1-static
                 ARCHIVE DESTINATION lib${LIB_SUFFIX}
                 COMPONENT staticlibs