From ca3a1c491af42508d369df2ee37c04081355a72e Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Fri, 13 Aug 2021 15:32:22 +0200 Subject: [PATCH] CMake: fix: find the LTDL package only if the enable_ltdl option is ON Fixes this error when we don't have ltdl: CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: C:/Users/magja/graphviz/lib/gvc/LTDL_INCLUDE_DIR used as include directory in directory C:/Users/magja/graphviz/lib/gvc There is another problem when the LTDL library is not available that will be fixed in an upcoming commit, hence no changelog entry yet. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d3a27af3..c7c393221 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,11 @@ find_package(ANN) find_package(Cairo) find_package(EXPAT) find_package(GD) -find_package(LTDL) + +if(enable_ltdl) + find_package(LTDL) +endif (enable_ltdl) + find_package(PangoCairo) find_package(ZLIB) -- 2.40.0