From: Nathan Owens Date: Mon, 13 Jan 2020 05:32:18 +0000 (-0600) Subject: Add pkg-config files X-Git-Tag: stable_release_2.44.0~9^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1677db46200d18fda641426c08c6dec1fa0e43f6;p=graphviz Add pkg-config files --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 35f47f649..b20f80314 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,7 @@ set(LIBRARY_INSTALL_DIR lib) 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}") @@ -97,8 +98,8 @@ endif() # ============================ 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}) @@ -166,5 +167,24 @@ add_subdirectory(cmd) 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) diff --git a/lib/gvc/CMakeLists.txt b/lib/gvc/CMakeLists.txt index 1e83671e7..5622eefe6 100644 --- a/lib/gvc/CMakeLists.txt +++ b/lib/gvc/CMakeLists.txt @@ -59,6 +59,7 @@ target_link_libraries(gvc ${EXPAT_LIBRARIES} ${RXSPENCER_LIBRARIES} ${ZLIB_LIBRARIES} + ${MATH_LIB} ) if (NOT WIN32) diff --git a/lib/pathplan/CMakeLists.txt b/lib/pathplan/CMakeLists.txt index 6c0e8b552..4f382a947 100644 --- a/lib/pathplan/CMakeLists.txt +++ b/lib/pathplan/CMakeLists.txt @@ -52,3 +52,4 @@ set_target_properties(pathplan PROPERTIES VERSION 4.0.0 SOVERSION 4 ) +target_link_libraries(pathplan m)