From 2e920a5f85a4cb69271a2ad403d7c2246758e1ea Mon Sep 17 00:00:00 2001 From: burgholzer Date: Wed, 3 Jul 2024 19:44:47 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20fine=20tune=20FindFLINT.cmake?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: burgholzer --- cmake/FindFLINT.cmake | 6 ++++++ include/Utils.hpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/FindFLINT.cmake b/cmake/FindFLINT.cmake index 1fd7a0a4..2243bebe 100644 --- a/cmake/FindFLINT.cmake +++ b/cmake/FindFLINT.cmake @@ -35,6 +35,12 @@ find_package_handle_standard_args(FLINT DEFAULT_MSG FLINT_LIBRARY FLINT_INCLUDE_ if(FLINT_FOUND) add_library(flint UNKNOWN IMPORTED) set_target_properties(flint PROPERTIES IMPORTED_LOCATION ${FLINT_LIBRARY}) + + # Strip the trailing "flint" from the include directory + if("${FLINT_INCLUDE_DIR}" MATCHES "flint$") + get_filename_component(FLINT_INCLUDE_DIR ${FLINT_INCLUDE_DIR} DIRECTORY) + endif() + target_include_directories(flint INTERFACE ${FLINT_INCLUDE_DIR}) target_link_libraries(flint INTERFACE GMP::gmp GMP::gmpxx MPFR::mpfr) endif() diff --git a/include/Utils.hpp b/include/Utils.hpp index 06405ad1..fe5b0d25 100644 --- a/include/Utils.hpp +++ b/include/Utils.hpp @@ -6,9 +6,9 @@ #include #include #include +#include #include #include -#include #include #include #include