From c6ca4e571b0bb96a310b9ea8a7da38bedc29a882 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Thu, 28 May 2026 17:12:24 +0200 Subject: [PATCH] CMakeLists.txt: revert fad4a28103d53a30f1946be2ea66664d89c75e6a -> uses pkg_check_modules all the time --- CMakeLists.txt | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 40a4ebd..45b3d56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,24 +188,17 @@ add_definitions(-DVIVADO_DIR=\"${VIVADO_PATH}\") # Dependencies check/search #################################################################################################### -if (USE_LIBFTDI) - # Try to find the LibFTDI1 with cmake - find_package(LibFTDI1 QUIET) -endif() - if (USE_PKGCONFIG) find_package(PkgConfig REQUIRED) # Backward compat when the libftdi is not found # by using cmake if (USE_LIBFTDI) - if (NOT LIBFTDI_FOUND) - pkg_check_modules(LIBFTDI REQUIRED libftdi1) - string(REPLACE "." ";" VERSION_LIST ${LIBFTDI_VERSION}) - list(GET VERSION_LIST 0 LIBFTDI_VERSION_MAJOR) - list(GET VERSION_LIST 1 LIBFTDI_VERSION_MINOR) - string(REGEX REPLACE "[^0-9].*" "" LIBFTDI_VERSION_MINOR "${LIBFTDI_VERSION_MINOR}") - endif() + pkg_check_modules(LIBFTDI REQUIRED libftdi1) + string(REPLACE "." ";" VERSION_LIST ${LIBFTDI_VERSION}) + list(GET VERSION_LIST 0 LIBFTDI_VERSION_MAJOR) + list(GET VERSION_LIST 1 LIBFTDI_VERSION_MINOR) + string(REGEX REPLACE "[^0-9].*" "" LIBFTDI_VERSION_MINOR "${LIBFTDI_VERSION_MINOR}") else() set(LIBFTDI_LIBRARY_DIRS "") set(LIBFTDI_INCLUDE_DIRS "")