From 50f18e3adad6fb69f17d7cbbf6b24332fd14d0bf Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sat, 21 Nov 2020 20:46:17 +0100 Subject: [PATCH] Add build of cmd/gvpr using CMake Resolves https://gitlab.com/graphviz/graphviz/-/issues/1878. --- CHANGELOG.md | 1 + cmd/CMakeLists.txt | 1 + cmd/gvpr/CMakeLists.txt | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 cmd/gvpr/CMakeLists.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 0559b26d7..7c24a4a95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The edges in JSON output are ordered now !1728 ### Fixed +- gvpr is not built by CMake #1878 - typos in gpcanvas.c #1927 - memory leak in libmingle - private inheritance in IncVPSC #1874 diff --git a/cmd/CMakeLists.txt b/cmd/CMakeLists.txt index 6bc0d7c40..60f84ff63 100644 --- a/cmd/CMakeLists.txt +++ b/cmd/CMakeLists.txt @@ -1,2 +1,3 @@ add_subdirectory(dot) +add_subdirectory(gvpr) add_subdirectory(tools) diff --git a/cmd/gvpr/CMakeLists.txt b/cmd/gvpr/CMakeLists.txt new file mode 100644 index 000000000..2b6d3fd83 --- /dev/null +++ b/cmd/gvpr/CMakeLists.txt @@ -0,0 +1,39 @@ +add_definitions(-DEXPORT_GVPR) + +add_executable(gvpr-bin + # Source files + gvprmain.c +) + +target_include_directories(gvpr-bin PRIVATE + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/gvpr +) + +target_link_libraries(gvpr-bin + ast + cgraph + gvc + gvpr + expr + sfio +) + +set_target_properties(gvpr-bin + PROPERTIES OUTPUT_NAME gvpr) + +# Installation location of executables +install( + TARGETS gvpr-bin + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} +) + +# Specify man pages to be installed +install( + FILES gvpr.1 + DESTINATION ${MAN_INSTALL_DIR} +) -- 2.40.0