]> granicus.if.org Git - graphviz/commitdiff
Add pkg-config files
authorNathan Owens <ndowens04@gmail.com>
Mon, 13 Jan 2020 05:32:18 +0000 (23:32 -0600)
committerNathan Owens <ndowens04@gmail.com>
Mon, 13 Jan 2020 05:32:18 +0000 (23:32 -0600)
CMakeLists.txt
lib/gvc/CMakeLists.txt
lib/pathplan/CMakeLists.txt

index 35f47f64929bf8dd5f3376279192493f195fdc91..b20f80314550c0d1fe86f53fb9591a032d93efe0 100644 (file)
@@ -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)
index 1e83671e77f4ce2e46215c5d48f4c126fea2c584..5622eefe6235f8505f1eb91e3dd2269eed5cb7ba 100644 (file)
@@ -59,6 +59,7 @@ target_link_libraries(gvc
     ${EXPAT_LIBRARIES}
     ${RXSPENCER_LIBRARIES}
     ${ZLIB_LIBRARIES}
+    ${MATH_LIB}
 )
 
 if (NOT WIN32)
index 6c0e8b5524896257f359003060a3a98357a4043b..4f382a947277991ddc664fb000b9fd6c170dd60f 100644 (file)
@@ -52,3 +52,4 @@ set_target_properties(pathplan PROPERTIES
     VERSION 4.0.0
     SOVERSION 4
 )
+target_link_libraries(pathplan m)