# Targets
add_library(ftdipp SHARED ${cpp_sources})
+# Static library
+add_library(ftdipp-static STATIC ${cpp_sources})
+set_target_properties(ftdipp-static PROPERTIES OUTPUT_NAME "ftdipp")
+
+# Prevent clobbering each other during the build
+set_target_properties(ftdipp PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+set_target_properties(ftdipp-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+
# Dependencies
target_link_libraries(ftdipp ftdi ${LIBUSB_LIBRARIES} ${BOOST_LIBRARIES})
COMPONENT sharedlibs
)
+ install( TARGETS ftdipp-static
+ ARCHIVE DESTINATION lib
+ COMPONENT staticlibs
+ )
+
install( FILES ${cpp_headers}
DESTINATION include/${PROJECT_NAME}
COMPONENT headers
COMPONENT sharedlibs
)
+ install( TARGETS ftdipp-static
+ DESTINATION bin
+ COMPONENT staticlibs
+ )
+
install( FILES ${cpp_headers}
DESTINATION include/${PROJECT_NAME}
COMPONENT headers
add_library(ftdi SHARED ${c_sources})
+# Static library
+add_library(ftdi-static STATIC ${c_sources})
+set_target_properties(ftdi-static PROPERTIES OUTPUT_NAME "ftdi")
+
+# Prevent clobbering each other during the build
+set_target_properties(ftdi PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+set_target_properties(ftdi-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+
# Dependencies
target_link_libraries(ftdi ${LIBUSB_LIBRARIES})
COMPONENT sharedlibs
)
+ install( TARGETS ftdi-static
+ ARCHIVE DESTINATION lib
+ COMPONENT staticlibs
+ )
+
install( FILES ${c_headers}
DESTINATION include/${PROJECT_NAME}
COMPONENT headers
COMPONENT sharedlibs
)
+ install( TARGETS ftdi-static
+ DESTINATION bin
+ COMPONENT staticlibs
+ )
+
install( FILES ${c_headers}
DESTINATION include/${PROJECT_NAME}
COMPONENT headers