CMakeLists.txt: revert fad4a28103 -> uses pkg_check_modules all the time
This commit is contained in:
parent
0818a404c9
commit
c6ca4e571b
|
|
@ -188,24 +188,17 @@ add_definitions(-DVIVADO_DIR=\"${VIVADO_PATH}\")
|
||||||
# Dependencies check/search
|
# Dependencies check/search
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
|
|
||||||
if (USE_LIBFTDI)
|
|
||||||
# Try to find the LibFTDI1 with cmake
|
|
||||||
find_package(LibFTDI1 QUIET)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (USE_PKGCONFIG)
|
if (USE_PKGCONFIG)
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
|
|
||||||
# Backward compat when the libftdi is not found
|
# Backward compat when the libftdi is not found
|
||||||
# by using cmake
|
# by using cmake
|
||||||
if (USE_LIBFTDI)
|
if (USE_LIBFTDI)
|
||||||
if (NOT LIBFTDI_FOUND)
|
pkg_check_modules(LIBFTDI REQUIRED libftdi1)
|
||||||
pkg_check_modules(LIBFTDI REQUIRED libftdi1)
|
string(REPLACE "." ";" VERSION_LIST ${LIBFTDI_VERSION})
|
||||||
string(REPLACE "." ";" VERSION_LIST ${LIBFTDI_VERSION})
|
list(GET VERSION_LIST 0 LIBFTDI_VERSION_MAJOR)
|
||||||
list(GET VERSION_LIST 0 LIBFTDI_VERSION_MAJOR)
|
list(GET VERSION_LIST 1 LIBFTDI_VERSION_MINOR)
|
||||||
list(GET VERSION_LIST 1 LIBFTDI_VERSION_MINOR)
|
string(REGEX REPLACE "[^0-9].*" "" LIBFTDI_VERSION_MINOR "${LIBFTDI_VERSION_MINOR}")
|
||||||
string(REGEX REPLACE "[^0-9].*" "" LIBFTDI_VERSION_MINOR "${LIBFTDI_VERSION_MINOR}")
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
set(LIBFTDI_LIBRARY_DIRS "")
|
set(LIBFTDI_LIBRARY_DIRS "")
|
||||||
set(LIBFTDI_INCLUDE_DIRS "")
|
set(LIBFTDI_INCLUDE_DIRS "")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue