set(PLUGIN_INSTALL_DIR ${LIBRARY_INSTALL_DIR}/graphviz)
set(HEADER_INSTALL_DIR include/graphviz)
set(MAN_INSTALL_DIR share/man/man3)
+set(PKGCONFIG_DIR lib/pkgconfig)
# TODO: Find a way to check for groff and ps2pdf for manpage pdf generation
# set(MAN_PDF_INSTALL_DIR share/graphviz/doc/pdf)
set(TOP_SOURCE_DIR "${CMAKE_SOURCE_DIR}")
# ============================ Set Graphviz version ============================
set(GRAPHVIZ_VERSION_MAJOR 2)
-set(GRAPHVIZ_VERSION_MINOR 41)
-set(GRAPHVIZ_VERSION_PATCH 0)
+set(GRAPHVIZ_VERSION_MINOR 42)
+set(GRAPHVIZ_VERSION_PATCH 2)
set(GRAPHVIZ_VERSION_STRING "${GRAPHVIZ_VERSION_MAJOR}.${GRAPHVIZ_VERSION_MINOR}.${GRAPHVIZ_VERSION_PATCH}")
configure_file(graphviz_version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/graphviz_version.h @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphviz_version.h DESTINATION ${HEADER_INSTALL_DIR})
enable_testing()
add_subdirectory(tests)
+MATH(EXPR GRAPHVIZ_PLUGIN_VERSION "${GRAPHVIZ_PLUGIN_VERSION}+1")
+set(GVPLUGIN_VERSION "${GRAPHVIZ_PLUGIN_VERSION}")
+set(VERSION "${GRAPHVIZ_VERSION_STRING}")
+set(prefix "${CMAKE_INSTALL_PREFIX}")
+set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
+set(libdir "${CMAKE_INSTALL_PREFIX}/lib")
+set(includedir "${CMAKE_INSTALL_PREFIX}/include")
+set(PACKAGE "graphviz")
+configure_file(${CMAKE_SOURCE_DIR}/lib/cdt/libcdt.pc.in ${CMAKE_SOURCE_DIR}/libcdt.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/lib/cgraph/libcgraph.pc.in ${CMAKE_SOURCE_DIR}/libcgraph.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/lib/gvc/libgvc.pc.in ${CMAKE_SOURCE_DIR}/libgvc.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/lib/gvpr/libgvpr.pc.in ${CMAKE_SOURCE_DIR}/libgvpr.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/lib/edgepaint/liblab_gamut.pc.in ${CMAKE_SOURCE_DIR}/liblab_gamut.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/lib/pathplan/libpathplan.pc.in ${CMAKE_SOURCE_DIR}/libpathplan.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/lib/xdot/libxdot.pc.in ${CMAKE_SOURCE_DIR}/libxdot.pc @ONLY)
+file(GLOB pcfiles "${CMAKE_SOURCE_DIR}/*.pc")
+foreach(file "${pcfiles}")
+ install(FILES ${file} DESTINATION "${PKGCONFIG_DIR}")
+endforeach(file)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)