### Added
-- The `cluster`, `dot_builtins`, `dot2gxl`, `gv2gxl`, and `prune` utilities are
- now included in the CMake build system. #1836
+- The `cluster`, `dot_builtins`, `dot2gxl`, `gv2gxl`, `gvedit`, and `prune`
+ utilities are now included in the CMake build system. #1753, #1836
### Changed
option(enable_ltdl "Support on-demand plugin loading" ON)
option(with_expat "Support HTML-like labels through expat" ON )
option(with_digcola "DIGCOLA features in neato layout engine" ON )
+option(with_gvedit "GVEdit interactive graph editor" ON)
option(with_ipsepcola "IPSEPCOLA features in neato layout engine (disabled by default - C++ portability issues)." OFF )
option(with_ortho "ORTHO features in neato layout engine." ON )
option(with_sfdp "sfdp layout engine." ON )
export CXX="ccache ${CXX:-c++}"
export CCACHE_DIR=ccache-cache
-# use the libs installed with cygwinsetup instead of those in
-# https://gitlab.com/graphviz/graphviz-windows-dependencies
-export CMAKE_OPTIONS=-Duse_win_pre_inst_libs=OFF
+# Use the libs installed with cygwinsetup instead of those in
+# https://gitlab.com/graphviz/graphviz-windows-dependencies. Also disable GVEdit
+# because we do not have Qt installed.
+export CMAKE_OPTIONS="-Duse_win_pre_inst_libs=OFF -Dwith_gvedit=OFF"
ci/build.sh
export PATH=$PATH:/c/Git/cmd
if [ "${build_system}" = "cmake" ]; then
- # use the libs installed with pacman instead of those in
- # https://gitlab.com/graphviz/graphviz-windows-dependencies
- export CMAKE_OPTIONS=-Duse_win_pre_inst_libs=OFF
+ # Use the libs installed with pacman instead of those in
+ # https://gitlab.com/graphviz/graphviz-windows-dependencies. Also disable
+ # GVEdit because we do not have Qt installed.
+ export CMAKE_OPTIONS="-Duse_win_pre_inst_libs=OFF -Dwith_gvedit=OFF"
fi
ci/build.sh
check that a given binary was built and is on $PATH
"""
- tools_not_built_with_cmake = [
- "gvedit",
- ]
-
tools_not_built_with_msbuild = [
"cluster",
"dot2gxl",
check_that_tool_does_not_exist(binary, os_id)
pytest.skip("smyrna is not built for Centos (#1834)")
- # FIXME: Remove skip when
- # https://gitlab.com/graphviz/graphviz/-/issues/1753 and
- # https://gitlab.com/graphviz/graphviz/-/issues/1836 is fixed
- if os.getenv("build_system") == "cmake":
- if binary in tools_not_built_with_cmake:
- check_that_tool_does_not_exist(binary, os_id)
- pytest.skip(f"{binary} is not built with CMake (#1753 & #1836)")
-
# FIXME: Remove skip when
# https://gitlab.com/graphviz/graphviz/-/issues/1837 is fixed
if os.getenv("build_system") == "msbuild":
check_that_tool_does_not_exist(binary, os_id)
pytest.skip(f"{binary} is not built on 64-bit Windows due to lacking libgd")
+ if binary == "gvedit" and platform.system() == "Windows":
+ check_that_tool_does_not_exist(binary, os_id)
+ pytest.skip(f"{binary} is not built on Windows due to lacking Qt")
+
# FIXME: Smyrna dependencies are not avaiable in other jobs
if binary == "smyrna" and is_cmake() and platform.system() != "Linux":
check_that_tool_does_not_exist(binary, os_id)
os.makedirs(build)
run(["cmake", "--version"], build)
run(["cmake", "--log-level=VERBOSE", "-G", "Visual Studio 16 2019", "-A",
- options.platform, "-Dwith_cxx_api=ON", "--warn-uninitialized",
- "-Werror=dev", ".."],
+ options.platform, "-Dwith_cxx_api=ON", "-Dwith_gvedit=OFF",
+ "--warn-uninitialized", "-Werror=dev", ".."],
build)
run(["cmake", "--build", ".", "--config", options.configuration], build)
run(["cpack", "-C", options.configuration], build)
add_subdirectory(dot)
add_subdirectory(edgepaint)
+add_subdirectory(gvedit)
add_subdirectory(gvmap)
add_subdirectory(gvpr)
add_subdirectory(mingle)
--- /dev/null
+if(with_gvedit)
+ find_package(Qt5 COMPONENTS Core PrintSupport Widgets REQUIRED)
+
+ add_executable(gvedit
+ csettings.cpp
+ imageviewer.cpp
+ main.cpp
+ mainwindow.cpp
+ mdi.qrc
+ mdichild.cpp
+ )
+
+ set_target_properties(gvedit PROPERTIES
+ AUTOMOC ON
+ AUTORCC ON
+ AUTOUIC ON
+ AUTOUIC_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/ui"
+ )
+
+ target_compile_definitions(gvedit PRIVATE DEMAND_LOADING=1)
+
+ target_include_directories(gvedit PRIVATE
+ ../../lib
+ ../../lib/cdt
+ ../../lib/cgraph
+ ../../lib/common
+ ../../lib/gvc
+ ../../lib/pathplan
+ )
+
+ target_link_libraries(gvedit PRIVATE
+ cdt
+ cgraph
+ gvc
+ )
+
+ target_link_libraries(gvedit PRIVATE Qt5::Core Qt5::PrintSupport Qt5::Widgets)
+
+ if(EXPAT_FOUND)
+ target_include_directories(gvedit SYSTEM PRIVATE ${EXPAT_INCLUDE_DIRS})
+ target_link_libraries(gvedit PRIVATE ${EXPAT_LIBRARIES})
+ endif()
+
+ install(
+ TARGETS gvedit
+ RUNTIME DESTINATION ${BINARY_INSTALL_DIR}
+ LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}
+ )
+
+ install(
+ FILES ../../doc/infosrc/attrs
+ DESTINATION ${DATA_INSTALL_DIR}/graphviz/gvedit
+ RENAME attrs.txt
+ )
+
+ if(GZIP)
+ add_custom_target(man-gvedit ALL DEPENDS gvedit.1.gz
+ COMMENT "gvedit man page")
+ add_custom_command(
+ OUTPUT gvedit.1.gz
+ COMMAND ${GZIP} -9 --no-name --to-stdout gvedit.1
+ >"${CMAKE_CURRENT_BINARY_DIR}/gvedit.1.gz"
+ MAIN_DEPENDENCY gvedit.1
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMENT "compress gvedit man page")
+ install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gvedit.1.gz
+ DESTINATION ${MAN_INSTALL_DIR}/man1)
+ else()
+ install(
+ FILES gvedit.1
+ DESTINATION ${MAN_INSTALL_DIR}/man1
+ )
+ endif()
+endif()