vcpkg/ports/libftdi/export-cmake.patch
Sean Yen d1b4e88d3c [libftdi-compat] Add new port (#6843)
* [libftdi-compat] v0.20 port

* Fixed wrong version number in CONTROL file.

* Download source archive file instead.

* restrict to shared library build only.

* Remove dlls from static build.

* [libftdi-compat] Update to 1.4. Replace CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS with a def file. Minimize patching.

* [libftdi] Rename from libftdi-compat

* [libftdi][libftdi1] Restore v0.20 as libftdi, move 1.4 to libftdi1
2019-06-21 22:45:40 -07:00

25 lines
735 B
Diff

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1c326fe..3c1d9ab 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -47,14 +47,19 @@ if(WIN32 OR 1)
if(BUILD_SHARED_LIBS)
install( TARGETS ftdi
+ EXPORT ftdi
COMPONENT sharedlibs
)
+ target_link_libraries(ftdi PUBLIC $<INSTALL_INTERFACE:include>)
else()
install( TARGETS ftdi-static
+ EXPORT ftdi
COMPONENT staticlibs
)
+ target_link_libraries(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