aboutsummaryrefslogtreecommitdiff
path: root/ports/libftdi/shared-static.patch
diff options
context:
space:
mode:
authorgrdowns <grdowns@microsoft.com>2019-06-28 17:32:12 -0700
committergrdowns <grdowns@microsoft.com>2019-06-28 17:32:12 -0700
commite27fe911982284788e63f4a92339386554706a4b (patch)
treee695af1d6733cea93a29adab73ff819430ff872e /ports/libftdi/shared-static.patch
parent1586330395db0bfa14c40c4b1a8d4da6c8f7c5f7 (diff)
parent62ed7c17318b4f46109c2de73b7584fb04e85720 (diff)
downloadvcpkg-e27fe911982284788e63f4a92339386554706a4b.tar.gz
vcpkg-e27fe911982284788e63f4a92339386554706a4b.zip
Merge branch 'master' of https://github.com/Microsoft/vcpkg into openssl-version-bump
Diffstat (limited to 'ports/libftdi/shared-static.patch')
-rw-r--r--ports/libftdi/shared-static.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/ports/libftdi/shared-static.patch b/ports/libftdi/shared-static.patch
new file mode 100644
index 000000000..3197fb823
--- /dev/null
+++ b/ports/libftdi/shared-static.patch
@@ -0,0 +1,66 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 071ae90..f91f6f7 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})
+@@ -14,7 +14,7 @@ set_target_properties(ftdi PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.
+
+ # Static library
+ add_library(ftdi-static STATIC ${c_sources})
+-set_target_properties(ftdi-static PROPERTIES OUTPUT_NAME "ftdi")
++set_target_properties(ftdi-static PROPERTIES OUTPUT_NAME "ftdi-static")
+
+ # Prevent clobbering each other during the build
+ set_target_properties(ftdi PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+@@ -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,29 @@ if(${UNIX})
+ COMPONENT headers
+ )
+
+-endif(${UNIX})
++endif()
+
+-if(${WIN32})
++if(WIN32 OR 1)
+
++ if(BUILD_SHARED_LIBS)
+ install( TARGETS ftdi
+- DESTINATION bin
++ EXPORT ftdi
+ COMPONENT sharedlibs
+ )
+
++ target_include_directories(ftdi PUBLIC $<INSTALL_INTERFACE:include>)
++ else()
+ install( TARGETS ftdi-static
+- DESTINATION bin
++ EXPORT ftdi
+ COMPONENT staticlibs
+ )
++ target_include_directories(ftdi-static PUBLIC $<INSTALL_INTERFACE:include>)
++ endif()
++ install(EXPORT ftdi FILE libftdi-config.cmake NAMESPACE libftdi:: DESTINATION share/libftdi)
+
+ install( FILES ${c_headers}
+ DESTINATION include
+ COMPONENT headers
+ )
+
+-endif(${WIN32})
++endif()