From 6aac1d93f99c2470960458314e12e4d9cedc0d95 Mon Sep 17 00:00:00 2001 From: AlQuemist <alquemist@Lyriks> Date: Mon, 17 Jul 2023 11:11:40 +0200 Subject: [PATCH] Collect a list of external dependencies to be installed --- cmake/BornAgain/Dependences.cmake | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cmake/BornAgain/Dependences.cmake b/cmake/BornAgain/Dependences.cmake index 5a7939b0d4a..cc7fb6cc991 100644 --- a/cmake/BornAgain/Dependences.cmake +++ b/cmake/BornAgain/Dependences.cmake @@ -1,5 +1,8 @@ # Search for installed software required by BornAgain +# list of extra dependencies (needed for a self-contained package) +set(BA_Dependencies "") + if(WIN32) set(CMAKE_FIND_LIBRARY_SUFFIXES .dll.a .lib) endif() @@ -19,12 +22,18 @@ endif() message(STATUS "formfactor: version=${formfactor_VERSION}, incl=${formfactor_INCLUDE_DIR}, " "lib=${formfactor_LIBRARIES}") +list(APPEND BA_Dependencies "${formfactor_LIBRARIES}") + find_package(Threads REQUIRED) find_package(FFTW3 REQUIRED) +list(APPEND BA_Dependencies "${FFTW3_LIBRARIES}") + find_package(GSL REQUIRED) message(STATUS "GSL: version=${GSL_VERSION}, incl=${GSL_INCLUDE_DIR}, libs=${GSL_LIBRARIES}") +list(APPEND BA_Dependencies "${GSL_LIBRARIES}") + if(WIN32) find_package(cerf CONFIG REQUIRED COMPONENTS shared CXX) add_compile_definitions(CERF_AS_CPP=ON) @@ -39,6 +48,8 @@ else() set(cerf_target cerf::cerf) endif() +list(APPEND BA_Dependencies "${Cerf_LIBRARIES}") + # --- Boost --- set(Boost_NO_BOOST_CMAKE ON) # prevent shortcut set(Boost_USE_STATIC_LIBS OFF) @@ -71,10 +82,14 @@ if(NOT Boost_FOUND) message(FATAL_ERROR "Not all required Boost component libraries were found") endif() +list(APPEND BA_Dependencies "${Boost_LIBRARIES}") + # === optional packages === # --- Tiff --- if(BA_TIFF_SUPPORT) message(STATUS "Looking for libtiff (use -DBA_TIFF_SUPPORT=OFF to disable)") find_package(TIFF 4.0.2 REQUIRED COMPONENTS CXX) + + list(APPEND BA_Dependencies "${TIFF_LIBRARIES}") endif() -- GitLab