aboutsummaryrefslogtreecommitdiff
path: root/ports/libftdi/shared-static.patch
blob: dad7aa0c52e9c72d791a4868db14974b8ef11f8a (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 071ae90..b42bbcd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -4,7 +4,7 @@ include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}
                      )
 
 # Targets
-set(c_sources     ftdi.c)
+set(c_sources     ftdi.c exports.def)
 set(c_headers     ftdi.h)
 
 add_library(ftdi SHARED ${c_sources})
@@ -24,7 +24,7 @@ set_target_properties(ftdi-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
 target_link_libraries(ftdi ${LIBUSB_LIBRARIES})
 
 # Install
-if(${UNIX})
+if(UNIX AND 0)
 
    install( TARGETS ftdi
             LIBRARY DESTINATION lib${LIB_SUFFIX}
@@ -41,23 +41,24 @@ if(${UNIX})
             COMPONENT headers
             )
 
-endif(${UNIX})
+endif()
 
-if(${WIN32})
+if(WIN32 OR 1)
 
+   if(BUILD_SHARED_LIBS)
    install( TARGETS ftdi
-            DESTINATION bin
             COMPONENT sharedlibs
             )
 
+   else()
    install( TARGETS ftdi-static
-            DESTINATION bin
             COMPONENT staticlibs
             )
+   endif()
 
    install( FILES ${c_headers}
             DESTINATION include
             COMPONENT headers
             )
 
-endif(${WIN32})
+endif()