endif()
find_package(ANN)
-find_package(Cairo)
+find_package(CAIRO)
if(with_expat)
find_package(EXPAT)
--- /dev/null
+include(FindPackageHandleStandardArgs)
+
+if(WIN32)
+ find_path(CAIRO_INCLUDE_DIR cairo/cairo.h)
+
+ find_library(CAIRO_LIBRARY NAMES cairo)
+
+ find_program(CAIRO_RUNTIME_LIBRARY NAMES cairo.dll libcairo-2.dll)
+ find_program(EXPAT_RUNTIME_LIBRARY NAMES expat.dll libexpat-1.dll)
+ find_program(FONTCONFIG_RUNTIME_LIBRARY NAMES fontconfig.dll libfontconfig-1.dll)
+ find_program(PIXMAN_RUNTIME_LIBRARY NAMES pixman-1.dll libpixman-1-0.dll)
+
+ find_package_handle_standard_args(CAIRO DEFAULT_MSG
+ CAIRO_INCLUDE_DIR
+
+ CAIRO_LIBRARY
+
+ CAIRO_RUNTIME_LIBRARY
+ EXPAT_RUNTIME_LIBRARY
+ FONTCONFIG_RUNTIME_LIBRARY
+ PIXMAN_RUNTIME_LIBRARY
+ )
+
+ set(CAIRO_INCLUDE_DIRS ${CAIRO_INCLUDE_DIR})
+
+ set(CAIRO_LIBRARIES ${CAIRO_LIBRARY})
+
+ set(CAIRO_LINK_LIBRARIES ${CAIRO_LIBRARY})
+
+ set(CAIRO_RUNTIME_LIBRARIES
+ ${CAIRO_RUNTIME_LIBRARY}
+ ${EXPAT_RUNTIME_LIBRARY}
+ ${FONTCONFIG_RUNTIME_LIBRARY}
+ ${PIXMAN_RUNTIME_LIBRARY}
+ )
+else()
+ find_package(PkgConfig)
+ pkg_check_modules(CAIRO cairo)
+
+ # prior to CMake 3.12, PkgConfig does not set *_LINK_LIBRARIES, so do it
+ # manually
+ if(${CMAKE_VERSION} VERSION_LESS 3.12)
+ find_library(CAIRO_LINK_LIBRARIES cairo PATHS ENV LIBRARY_PATH)
+ endif()
+
+ find_package_handle_standard_args(CAIRO DEFAULT_MSG
+ CAIRO_INCLUDE_DIRS
+ CAIRO_LIBRARIES
+ CAIRO_LINK_LIBRARIES
+ )
+endif()
+++ /dev/null
-include(FindPackageHandleStandardArgs)
-
-if(WIN32)
- find_path(Cairo_INCLUDE_DIR cairo/cairo.h)
-
- find_library(Cairo_LIBRARY NAMES cairo)
-
- find_program(Cairo_RUNTIME_LIBRARY NAMES cairo.dll libcairo-2.dll)
- find_program(EXPAT_RUNTIME_LIBRARY NAMES expat.dll libexpat-1.dll)
- find_program(FONTCONFIG_RUNTIME_LIBRARY NAMES fontconfig.dll libfontconfig-1.dll)
- find_program(PIXMAN_RUNTIME_LIBRARY NAMES pixman-1.dll libpixman-1-0.dll)
-
- find_package_handle_standard_args(Cairo DEFAULT_MSG
- Cairo_INCLUDE_DIR
-
- Cairo_LIBRARY
-
- Cairo_RUNTIME_LIBRARY
- EXPAT_RUNTIME_LIBRARY
- FONTCONFIG_RUNTIME_LIBRARY
- PIXMAN_RUNTIME_LIBRARY
- )
-
- set(Cairo_INCLUDE_DIRS ${Cairo_INCLUDE_DIR})
-
- set(Cairo_LIBRARIES ${Cairo_LIBRARY})
-
- set(Cairo_LINK_LIBRARIES ${Cairo_LIBRARY})
-
- set(Cairo_RUNTIME_LIBRARIES
- ${Cairo_RUNTIME_LIBRARY}
- ${EXPAT_RUNTIME_LIBRARY}
- ${FONTCONFIG_RUNTIME_LIBRARY}
- ${PIXMAN_RUNTIME_LIBRARY}
- )
-else()
- find_package(PkgConfig)
- pkg_check_modules(Cairo cairo)
-
- # prior to CMake 3.12, PkgConfig does not set *_LINK_LIBRARIES, so do it
- # manually
- if(${CMAKE_VERSION} VERSION_LESS 3.12)
- find_library(Cairo_LINK_LIBRARIES cairo PATHS ENV LIBRARY_PATH)
- endif()
-
- find_package_handle_standard_args(Cairo DEFAULT_MSG
- Cairo_INCLUDE_DIRS
- Cairo_LIBRARIES
- Cairo_LINK_LIBRARIES
- )
-endif()
-if(Cairo_FOUND AND PangoCairo_FOUND)
+if(CAIRO_FOUND AND PangoCairo_FOUND)
add_library(gvplugin_pango SHARED
# Header files
${GRAPHVIZ_LIB_DIR}/common
${GRAPHVIZ_LIB_DIR}/gvc
${GRAPHVIZ_LIB_DIR}/pathplan
- ${Cairo_INCLUDE_DIRS}/cairo
+ ${CAIRO_INCLUDE_DIRS}/cairo
${PangoCairo_INCLUDE_DIRS}
)
target_link_libraries(gvplugin_pango
cgraph
gvc
- ${Cairo_LINK_LIBRARIES}
+ ${CAIRO_LINK_LIBRARIES}
${PangoCairo_LINK_LIBRARIES}
)
if(WIN32 AND install_win_dependency_dlls)
install(
FILES
- ${Cairo_RUNTIME_LIBRARIES}
+ ${CAIRO_RUNTIME_LIBRARIES}
${PangoCairo_RUNTIME_LIBRARIES}
DESTINATION ${BINARY_INSTALL_DIR}
)