]> granicus.if.org Git - graphviz/commitdiff
Refactor to use CMAKE_PREFIX_PATH
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sun, 4 Oct 2020 08:51:02 +0000 (10:51 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Thu, 8 Oct 2020 19:10:23 +0000 (21:10 +0200)
CMakeLists.txt
cmake/FindANN.cmake
cmake/FindCairo.cmake
cmake/FindGD.cmake
cmake/FindPangoCairo.cmake

index 0a2e87e23104507d77ffb5d8626dd94b93406859..49476553ac8c3007df5a5368830fb1c48077a0ea 100644 (file)
@@ -71,8 +71,7 @@ set(GVPLUGIN_CONFIG_FILE config${GRAPHVIZ_PLUGIN_VERSION})
 
 # ============================ Library dependencies ============================
 if (WIN32)
-    list(APPEND CMAKE_LIBRARY_PATH ${WINDOWS_DEPENDENCY_DIR}/lib)
-    list(APPEND CMAKE_INCLUDE_PATH ${WINDOWS_DEPENDENCY_DIR}/include ${WINDOWS_DEPENDENCY_DIR}/bin)
+    list(APPEND CMAKE_PREFIX_PATH ${WINDOWS_DEPENDENCY_DIR})
 else()
     list(APPEND CMAKE_INCLUDE_PATH /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu)
 endif()
@@ -94,9 +93,9 @@ if (WIN32)
     find_package(RxSpencer REQUIRED)
 
     # Find DLLs on Windows
-    find_file(EXPAT_RUNTIME_LIBRARIES NAMES libexpat.dll expat.dll)
+    find_program(EXPAT_RUNTIME_LIBRARIES NAMES libexpat.dll expat.dll)
     if (CMAKE_CL_64)
-        find_file(MSYS_RUNTIME_LIBRARIES NAMES msys-2.0.dll)
+        find_program(MSYS_RUNTIME_LIBRARIES NAMES msys-2.0.dll)
     endif()
 endif()
 
index fa9dcf294c8f8864df65b4930caadcd8cf15e894..9c20ef97a84a3d3d6e351e658f7432b3f42d4cdf 100644 (file)
@@ -1,6 +1,6 @@
 find_path(ANN_INCLUDE_DIR ANN/ANN.h)
 find_library(ANN_LIBRARY NAMES ANN ann libann)
-find_file(ANN_RUNTIME_LIBRARY ANN.dll)
+find_program(ANN_RUNTIME_LIBRARY ANN.dll)
 
 include(FindPackageHandleStandardArgs)
 if (WIN32)
index 0cc48eff228c176dfe463008c911fcaf5d0b64e1..dce05ea96c73c140eb1bac33553eb6f1a5b88db9 100644 (file)
@@ -5,10 +5,10 @@ if (WIN32)
 
     find_library(Cairo_LIBRARY NAMES cairo)
 
-    find_file(Cairo_RUNTIME_LIBRARY NAMES cairo.dll)
-    find_file(EXPAT_RUNTIME_LIBRARY NAMES expat.dll)
-    find_file(FONTCONFIG_RUNTIME_LIBRARY NAMES fontconfig.dll)
-    find_file(PIXMAN_RUNTIME_LIBRARY NAMES pixman-1.dll)
+    find_program(Cairo_RUNTIME_LIBRARY NAMES cairo.dll)
+    find_program(EXPAT_RUNTIME_LIBRARY NAMES expat.dll)
+    find_program(FONTCONFIG_RUNTIME_LIBRARY NAMES fontconfig.dll)
+    find_program(PIXMAN_RUNTIME_LIBRARY NAMES pixman-1.dll)
 
     find_package_handle_standard_args(Cairo DEFAULT_MSG
         Cairo_INCLUDE_DIR
index efdf66ff14d7ad6e9b38fe622ed96cb70063c2f7..67325ce2f5548f1245c60a7e6d2d2d33bd335ec8 100644 (file)
@@ -1,6 +1,6 @@
 find_path(GD_INCLUDE_DIR gd.h)
 find_library(GD_LIBRARY NAMES gd libgd)
-find_file(GD_RUNTIME_LIBRARY libgd.dll)
+find_program(GD_RUNTIME_LIBRARY libgd.dll)
 
 include(FindPackageHandleStandardArgs)
 if (WIN32)
index 7e9d3b362f8cc01192ef28eb53f4779c4285fe79..0937e41ef25a9db14d7da52e12eda82590072d11 100644 (file)
@@ -10,13 +10,13 @@ if (WIN32)
     find_library(PANGO_LIBRARY NAMES pango-1.0)
     find_library(PangoCairo_LIBRARY NAMES pangocairo-1.0)
 
-    find_file(GLIB_RUNTIME_LIBRARY NAMES glib-2.dll)
-    find_file(GOBJECT_RUNTIME_LIBRARY NAMES gobject-2.dll)
-    find_file(HARFBUZZ_RUNTIME_LIBRARY NAMES libharfbuzz-0.dll)
-    find_file(PANGO_RUNTIME_LIBRARY NAMES pango-1.dll)
-    find_file(PangoCairo_RUNTIME_LIBRARY NAMES pangocairo-1.dll)
-    find_file(PANGOFT_RUNTIME_LIBRARY NAMES pangoft2-1.dll)
-    find_file(PANGOWIN_RUNTIME_LIBRARY NAMES pangowin32-1.dll)
+    find_program(GLIB_RUNTIME_LIBRARY NAMES glib-2.dll)
+    find_program(GOBJECT_RUNTIME_LIBRARY NAMES gobject-2.dll)
+    find_program(HARFBUZZ_RUNTIME_LIBRARY NAMES libharfbuzz-0.dll)
+    find_program(PANGO_RUNTIME_LIBRARY NAMES pango-1.dll)
+    find_program(PangoCairo_RUNTIME_LIBRARY NAMES pangocairo-1.dll)
+    find_program(PANGOFT_RUNTIME_LIBRARY NAMES pangoft2-1.dll)
+    find_program(PANGOWIN_RUNTIME_LIBRARY NAMES pangowin32-1.dll)
 
     find_package_handle_standard_args(PangoCairo DEFAULT_MSG
         GLIB_INCLUDE_DIR