From d03949ee2de8708280f6207ed5a716a54459dc58 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 22 May 2022 18:11:11 +0200 Subject: [PATCH] so now it works?? --- CMakeLists.txt | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bcd3ec..3e92693 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,22 +124,22 @@ add_subdirectory(${COMMON_PATH}) # ############################################################################## # Check whether the user has already installed ETL first -# find_package(etl ${FSFW_ETL_LIB_MAJOR_VERSION} CONFIG QUIET) -# Not installed, so use FetchContent to download and provide etl -# if(NOT etl_FOUND) -message( - STATUS - "No ETL installation was found with find_package. Installing and providing " - "etl with FindPackage") -include(FetchContent) +find_package(etl ${FSFW_ETL_LIB_MAJOR_VERSION} CONFIG QUIET) + # Not installed, so use FetchContent to download and provide etl + if(NOT etl_FOUND) + message( + STATUS + "No ETL installation was found with find_package. Installing and providing " + "etl with FindPackage") + include(FetchContent) -FetchContent_Declare( - etl - GIT_REPOSITORY https://github.com/ETLCPP/etl - GIT_TAG ${FSFW_ETL_LIB_VERSION}) + FetchContent_Declare( + etl + GIT_REPOSITORY https://github.com/ETLCPP/etl + GIT_TAG ${FSFW_ETL_LIB_VERSION}) -list(APPEND FSFW_FETCH_CONTENT_TARGETS etl) -# endif() + list(APPEND FSFW_FETCH_CONTENT_TARGETS etl) +endif() # The documentation for FetchContent recommends declaring all the dependencies # before making them available. We make all declared dependency available here