From: Matthew Fernandez Date: Mon, 14 Feb 2022 02:08:50 +0000 (+1100) Subject: CMake: add a 'dot2gxl' symlink for 'gxl2gv', mimicking Autotools X-Git-Tag: 3.0.0~27^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb1677b2d62890a6cfb86bdb9dd84963a002135f;p=graphviz CMake: add a 'dot2gxl' symlink for 'gxl2gv', mimicking Autotools Gitlab: #1753, #1836 --- diff --git a/ci/tests.py b/ci/tests.py index b700ded7c..5a2327a86 100644 --- a/ci/tests.py +++ b/ci/tests.py @@ -97,7 +97,6 @@ def test_existence(binary: str): tools_not_built_with_cmake = [ "cluster", "diffimg", - "dot2gxl", "dot_builtins", "dotty", "edgepaint", diff --git a/cmd/tools/CMakeLists.txt b/cmd/tools/CMakeLists.txt index f8ec075c8..7ab3d7659 100644 --- a/cmd/tools/CMakeLists.txt +++ b/cmd/tools/CMakeLists.txt @@ -305,6 +305,30 @@ if(EXPAT_FOUND) tool_defaults(gxl2gv) + set(DOT2GXL "${CMAKE_CURRENT_BINARY_DIR}/dot2gxl${CMAKE_EXECUTABLE_SUFFIX}") + if(WIN32 OR CYGWIN) + # copy instead of symlink to avoid + # https://gitlab.com/graphviz/graphviz/-/issues/2123 + add_custom_command( + TARGET gxl2gv + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ ${DOT2GXL} + COMMENT "Copying $ to ${DOT2GXL}") + install( + PROGRAMS ${DOT2GXL} + DESTINATION ${BINARY_INSTALL_DIR}) + else() + add_custom_command( + TARGET gxl2gv + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E create_symlink $ + ${DOT2GXL} + COMMENT "Linking $ as ${DOT2GXL}") + install( + FILES ${DOT2GXL} + DESTINATION ${BINARY_INSTALL_DIR}) + endif() + endif() # ==================================== mm2gv ===================================