The branch, master has been updated
via b80aee72c93847f79295722315e53fb898b46a27 (commit)
from 340152b2343e3ee08dc2b98fee5e0e57b8b22afd (commit)
- Log -----------------------------------------------------------------
commit b80aee72c93847f79295722315e53fb898b46a27
Author: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
Date: Mon Mar 16 21:15:06 2009 +0100
Build and install static versions of the libraries
-----------------------------------------------------------------------
Summary of changes:
ftdipp/CMakeLists.txt | 18 ++++++++++++++++++
src/CMakeLists.txt | 18 ++++++++++++++++++
2 files changed, 36 insertions(+), 0 deletions(-)
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
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7965999..e1ab82d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -9,6 +9,14 @@ set(c_headers ftdi.h)
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})
@@ -20,6 +28,11 @@ if(${UNIX})
COMPONENT sharedlibs
)
+ install( TARGETS ftdi-static
+ ARCHIVE DESTINATION lib
+ COMPONENT staticlibs
+ )
+
install( FILES ${c_headers}
DESTINATION include/${PROJECT_NAME}
COMPONENT headers
@@ -34,6 +47,11 @@ if(${WIN32})
COMPONENT sharedlibs
)
+ install( TARGETS ftdi-static
+ DESTINATION bin
+ COMPONENT staticlibs
+ )
+
install( FILES ${c_headers}
DESTINATION include/${PROJECT_NAME}
COMPONENT headers
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
|