This file is part of MXE. See LICENSE.md for licensing information. diff --git a/CMakeLists.txt b/CMakeLists.txt index e8688d4..66c1ba2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,7 @@ set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development") set(CPACK_COMPONENT_STATICLIBS_GROUP "Development") set(CPACK_COMPONENT_HEADERS_GROUP "Development") +option ( SHAREDLIBS "Build shared libraries" ON ) option ( STATICLIBS "Build static libraries" ON ) # guess LIB_SUFFIX, don't take debian multiarch into account diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9fd86a6..5d0e52a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -32,11 +32,13 @@ set_target_properties ( ftdi1 PROPERTIES CLEAN_DIRECT_OUTPUT 1 ) # Dependencies target_link_libraries(ftdi1 ${LIBUSB_LIBRARIES}) +if ( SHAREDLIBS ) install ( TARGETS ftdi1 RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX} ) +endif () if ( STATICLIBS ) add_library(ftdi1-static STATIC ${c_sources})