From: Matthew Fernandez Date: Sat, 5 Nov 2022 19:56:09 +0000 (-0700) Subject: CMake: only use 'LTDL_LIBRARY' on non-Windows or MinGW X-Git-Tag: 7.0.1~1^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7d7c509b2855e574e034d11b5a4bbeafee4e9338;p=graphviz CMake: only use 'LTDL_LIBRARY' on non-Windows or MinGW When running CMake with `--warn-uninitialized -Werror=dev`, this prevents the following: CMake Error (dev) at cmake/FindLTDL.cmake:18 (set): uninitialized variable 'LTDL_LIBRARY' Call Stack (most recent call first): CMakeLists.txt:117 (find_package) Gitlab: #2291 --- diff --git a/cmake/FindLTDL.cmake b/cmake/FindLTDL.cmake index a1ee8c2a2..e955b745e 100644 --- a/cmake/FindLTDL.cmake +++ b/cmake/FindLTDL.cmake @@ -15,4 +15,6 @@ endif() mark_as_advanced(LTDL_INCLUDE_DIR LTDL_LIBRARY) set(LTDL_INCLUDE_DIRS ${LTDL_INCLUDE_DIR}) -set(LTDL_LIBRARIES ${LTDL_LIBRARY}) +if(NOT WIN32 OR MINGW) + set(LTDL_LIBRARIES ${LTDL_LIBRARY}) +endif()