Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libftdi] resolve ninja error (-w dupbuild=err) #7055

Merged
merged 1 commit into from
Jun 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/libftdi/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: libftdi
Version: 0.20
Version: 0.20-1
Build-Depends: libusb-win32
Description: FTDI USB driver with bitbang mode (v0.20)
24 changes: 0 additions & 24 deletions ports/libftdi/export-cmake.patch

This file was deleted.

1 change: 0 additions & 1 deletion ports/libftdi/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ vcpkg_extract_source_archive_ex(
PATCHES
libusb-win32.patch
shared-static.patch
export-cmake.patch
)

file(COPY ${CMAKE_CURRENT_LIST_DIR}/exports.def DESTINATION ${SOURCE_PATH}/src)
Expand Down
18 changes: 16 additions & 2 deletions ports/libftdi/shared-static.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 071ae90..b42bbcd 100644
index 071ae90..f91f6f7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -4,7 +4,7 @@ include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}
Expand All @@ -11,6 +11,15 @@ index 071ae90..b42bbcd 100644
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})

Expand All @@ -20,7 +29,7 @@ index 071ae90..b42bbcd 100644

install( TARGETS ftdi
LIBRARY DESTINATION lib${LIB_SUFFIX}
@@ -41,23 +41,24 @@ if(${UNIX})
@@ -41,23 +41,29 @@ if(${UNIX})
COMPONENT headers
)

Expand All @@ -33,15 +42,20 @@ index 071ae90..b42bbcd 100644
+ if(BUILD_SHARED_LIBS)
install( TARGETS ftdi
- DESTINATION bin
+ EXPORT ftdi
COMPONENT sharedlibs
)

+ target_link_libraries(ftdi PUBLIC $<INSTALL_INTERFACE:include>)
+ else()
install( TARGETS ftdi-static
- DESTINATION bin
+ 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
Expand Down