From: Yegor Yefremov Date: Fri, 13 Jun 2025 07:59:39 +0000 (+0200) Subject: ftdi_eeprom: fix static build X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=eaf42c00bfab5d6bbd8106b11a697ff4f2d7659f;p=libftdi ftdi_eeprom: fix static build Link to ftdi1-static if only STATICLIBS is enabled. --- diff --git a/ftdi_eeprom/CMakeLists.txt b/ftdi_eeprom/CMakeLists.txt index 3958b66..38147b5 100644 --- a/ftdi_eeprom/CMakeLists.txt +++ b/ftdi_eeprom/CMakeLists.txt @@ -36,7 +36,12 @@ configure_file( ) add_executable(ftdi_eeprom main.c) -target_link_libraries(ftdi_eeprom ftdi1 ${CONFUSE_LIBRARIES}) +if (NOT SHAREDLIBS AND STATICLIBS) + target_link_libraries(ftdi_eeprom ftdi1-static) +else() + target_link_libraries(ftdi_eeprom ftdi1) +endif () +target_link_libraries(ftdi_eeprom ${CONFUSE_LIBRARIES}) if (LIBINTL_FOUND) target_link_libraries(ftdi_eeprom ${LIBINTL_LIBRARIES}) endif ()