X-Git-Url: http://developer.intra2net.com/git/?a=blobdiff_plain;f=ftdipp%2FCMakeLists.txt;fp=ftdipp%2FCMakeLists.txt;h=66efc32b595750d7ad460e85a85030820bd09c46;hb=b80aee72c93847f79295722315e53fb898b46a27;hp=63729de7138f763d9a1e2ed6a9ebf50c0e9fda37;hpb=340152b2343e3ee08dc2b98fee5e0e57b8b22afd;p=libftdi diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt index 63729de..66efc32 100644 --- a/ftdipp/CMakeLists.txt +++ b/ftdipp/CMakeLists.txt @@ -20,6 +20,14 @@ message(STATUS "Building libftdi++") # 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}) @@ -31,6 +39,11 @@ if(${UNIX}) COMPONENT sharedlibs ) + install( TARGETS ftdipp-static + ARCHIVE DESTINATION lib + COMPONENT staticlibs + ) + install( FILES ${cpp_headers} DESTINATION include/${PROJECT_NAME} COMPONENT headers @@ -45,6 +58,11 @@ if(${WIN32}) COMPONENT sharedlibs ) + install( TARGETS ftdipp-static + DESTINATION bin + COMPONENT staticlibs + ) + install( FILES ${cpp_headers} DESTINATION include/${PROJECT_NAME} COMPONENT headers