mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-25 05:57:55 +08:00
d9f832bc05
* [libftdi1] update to 1.5 (#15917) * [libftdi1] fixed outdated version file (#15917) * [libftdi1] Switched to using option instead of patch to disable ftdi_eeprom (#15917) * [libftdi1] updated version file (#15917) * [libftdi1] Change version scheme Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
index 17b3617..f9a8e59 100755
|
|
--- a/src/CMakeLists.txt
|
|
+++ b/src/CMakeLists.txt
|
|
@@ -18,9 +18,14 @@ message(STATUS "Detected git snapshot version: ${SNAPSHOT_VERSION}")
|
|
configure_file(ftdi_version_i.h.in "${CMAKE_CURRENT_BINARY_DIR}/ftdi_version_i.h" @ONLY)
|
|
|
|
# Targets
|
|
+if(WIN32)
|
|
+set(c_sources ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.c ${CMAKE_CURRENT_SOURCE_DIR}/exports.def CACHE INTERNAL "List of c sources" )
|
|
+else()
|
|
set(c_sources ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.c ${CMAKE_CURRENT_SOURCE_DIR}/ftdi_stream.c CACHE INTERNAL "List of c sources" )
|
|
+endif()
|
|
set(c_headers ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.h CACHE INTERNAL "List of c headers" )
|
|
|
|
+if(BUILD_SHARED_LIBS)
|
|
add_library(ftdi1 SHARED ${c_sources})
|
|
|
|
math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatibility with previous releases
|
|
@@ -38,7 +43,7 @@ install ( TARGETS ftdi1
|
|
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
|
)
|
|
|
|
-if ( STATICLIBS )
|
|
+else()
|
|
add_library(ftdi1-static STATIC ${c_sources})
|
|
target_link_libraries(ftdi1-static ${LIBUSB_LIBRARIES})
|
|
set_target_properties(ftdi1-static PROPERTIES OUTPUT_NAME "ftdi1")
|