blob: 8a292e6e4c62d5f8ec84cd13e6dcd7c9c7eb55c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
This file is part of MXE.
See index.html for further 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})
|