From ae57262712e026c1e01ee601cf427a4429ba8f06 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Tue, 1 Feb 2022 12:27:04 +1100 Subject: [PATCH] CMake: [nfc] standardize on 2-space indentation Upcoming changes to introduce `cmake-format` checks default to this, which suits Graphviz well as it matches the (claimed) `clang-format` C/C++ style. --- CMakeLists.txt | 182 ++++++------- cmake/FindANN.cmake | 8 +- cmake/FindCAIRO.cmake | 74 +++--- cmake/FindGD.cmake | 8 +- cmake/FindGETOPT.cmake | 18 +- cmake/FindLTDL.cmake | 10 +- cmake/FindPANGOCAIRO.cmake | 150 +++++------ cmake/cmake_uninstall.cmake.in | 28 +- cmake/config_checks.cmake | 50 ++-- cmake/package_info.cmake | 52 ++-- cmd/dot/CMakeLists.txt | 102 ++++---- cmd/gvpr/CMakeLists.txt | 32 +-- cmd/tools/CMakeLists.txt | 402 ++++++++++++++--------------- lib/CMakeLists.txt | 4 +- lib/ast/CMakeLists.txt | 42 +-- lib/cdt/CMakeLists.txt | 60 ++--- lib/cgraph++/CMakeLists.txt | 10 +- lib/cgraph/CMakeLists.txt | 94 +++---- lib/circogen/CMakeLists.txt | 56 ++-- lib/common/CMakeLists.txt | 202 +++++++-------- lib/dotgen/CMakeLists.txt | 58 ++--- lib/expr/CMakeLists.txt | 64 ++--- lib/fdpgen/CMakeLists.txt | 52 ++-- lib/gvc++/CMakeLists.txt | 12 +- lib/gvc/CMakeLists.txt | 138 +++++----- lib/gvpr/CMakeLists.txt | 70 ++--- lib/ingraphs/CMakeLists.txt | 16 +- lib/label/CMakeLists.txt | 34 +-- lib/mingle/CMakeLists.txt | 38 +-- lib/neatogen/CMakeLists.txt | 186 ++++++------- lib/ortho/CMakeLists.txt | 50 ++-- lib/osage/CMakeLists.txt | 24 +- lib/pack/CMakeLists.txt | 30 +-- lib/patchwork/CMakeLists.txt | 30 +-- lib/pathplan/CMakeLists.txt | 60 ++--- lib/rbtree/CMakeLists.txt | 16 +- lib/sfdpgen/CMakeLists.txt | 58 ++--- lib/sfio/CMakeLists.txt | 78 +++--- lib/sparse/CMakeLists.txt | 58 ++--- lib/topfish/CMakeLists.txt | 14 +- lib/twopigen/CMakeLists.txt | 26 +- lib/vmalloc/CMakeLists.txt | 18 +- lib/vpsc/CMakeLists.txt | 40 +-- lib/xdot/CMakeLists.txt | 28 +- plugin/core/CMakeLists.txt | 78 +++--- plugin/dot_layout/CMakeLists.txt | 44 ++-- plugin/gd/CMakeLists.txt | 48 ++-- plugin/gdiplus/CMakeLists.txt | 40 +-- plugin/neato_layout/CMakeLists.txt | 62 ++--- plugin/pango/CMakeLists.txt | 48 ++-- tests/CMakeLists.txt | 56 ++-- 51 files changed, 1579 insertions(+), 1579 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71506c616..606391c33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,34 +19,34 @@ option(with_cxx_tests "enables building the C++ tests" OFF) option(use_win_pre_inst_libs "enables building using pre-installed Windows libraries" ON) if(WIN32) - # Build dynamic-link libraries on Windows, including MinGW. The - # CMake build system does not currently support building static - # libraries, so the GVDLL symbol can be unconditionally set until - # such support is introduced. - add_definitions(-DGVDLL) + # Build dynamic-link libraries on Windows, including MinGW. The + # CMake build system does not currently support building static + # libraries, so the GVDLL symbol can be unconditionally set until + # such support is introduced. + add_definitions(-DGVDLL) - option(install_win_dependency_dlls "Install 3rd party dependencies" ON) + option(install_win_dependency_dlls "Install 3rd party dependencies" ON) endif() if(with_digcola) - add_definitions(-DDIGCOLA) + add_definitions(-DDIGCOLA) endif() if(with_ipsepcola) - add_definitions(-DIPSEPCOLA) + add_definitions(-DIPSEPCOLA) endif() if(with_ortho) - add_definitions(-DORTHO) + add_definitions(-DORTHO) endif() if(with_sfdp) - add_definitions(-DSFDP) + add_definitions(-DSFDP) endif() if(with_smyrna) - # TODO include dependency checks - add_definitions(-DSMYRNA) + # TODO include dependency checks + add_definitions(-DSMYRNA) endif() # ===================== Append local CMake module directory ==================== @@ -77,11 +77,11 @@ set(GRAPHVIZ_LIB_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib") set(WINDOWS_DEPENDENCY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/windows/dependencies/libraries") set(WINDOWS_DEPENDENCY_VCPKG_DIR "${CMAKE_CURRENT_SOURCE_DIR}/windows/dependencies/libraries/vcpkg/installed") if(CMAKE_CL_64) - set(WINDOWS_DEPENDENCY_DIR "${WINDOWS_DEPENDENCY_DIR}/x64") - set(WINDOWS_DEPENDENCY_VCPKG_DIR "${WINDOWS_DEPENDENCY_VCPKG_DIR}/x64-windows") + set(WINDOWS_DEPENDENCY_DIR "${WINDOWS_DEPENDENCY_DIR}/x64") + set(WINDOWS_DEPENDENCY_VCPKG_DIR "${WINDOWS_DEPENDENCY_VCPKG_DIR}/x64-windows") else() - set(WINDOWS_DEPENDENCY_DIR "${WINDOWS_DEPENDENCY_DIR}/x86") - set(WINDOWS_DEPENDENCY_VCPKG_DIR "${WINDOWS_DEPENDENCY_VCPKG_DIR}/x86-windows") + set(WINDOWS_DEPENDENCY_DIR "${WINDOWS_DEPENDENCY_DIR}/x86") + set(WINDOWS_DEPENDENCY_VCPKG_DIR "${WINDOWS_DEPENDENCY_VCPKG_DIR}/x86-windows") endif() set(GRAPHVIZ_PLUGIN_VERSION 6) @@ -90,13 +90,13 @@ set(GVPLUGIN_CONFIG_FILE config${GRAPHVIZ_PLUGIN_VERSION}) # ============================ Library dependencies ============================ if(WIN32) - if(use_win_pre_inst_libs) - list(APPEND CMAKE_PREFIX_PATH ${WINDOWS_DEPENDENCY_DIR}) - list(APPEND CMAKE_PREFIX_PATH ${WINDOWS_DEPENDENCY_VCPKG_DIR}) - endif() - if(MINGW) - list(APPEND CMAKE_PREFIX_PATH $ENV{MSYSTEM_PREFIX}) - endif() + if(use_win_pre_inst_libs) + list(APPEND CMAKE_PREFIX_PATH ${WINDOWS_DEPENDENCY_DIR}) + list(APPEND CMAKE_PREFIX_PATH ${WINDOWS_DEPENDENCY_VCPKG_DIR}) + endif() + if(MINGW) + list(APPEND CMAKE_PREFIX_PATH $ENV{MSYSTEM_PREFIX}) + endif() endif() find_package(ANN) @@ -122,17 +122,17 @@ if(with_zlib) endif() if(UNIX) - find_library(MATH_LIB m) + find_library(MATH_LIB m) endif() if(WIN32) - # Find Windows specific dependencies + # Find Windows specific dependencies - # Find DLLs on Windows - find_program(EXPAT_RUNTIME_LIBRARIES NAMES libexpat.dll expat.dll msys-expat-1.dll) - if(CMAKE_CL_64) - find_program(MSYS_RUNTIME_LIBRARIES NAMES msys-2.0.dll) - endif() + # Find DLLs on Windows + find_program(EXPAT_RUNTIME_LIBRARIES NAMES libexpat.dll expat.dll msys-expat-1.dll) + if(CMAKE_CL_64) + find_program(MSYS_RUNTIME_LIBRARIES NAMES msys-2.0.dll) + endif() endif() # ============================ Set Graphviz version ============================ @@ -144,23 +144,23 @@ else() endif() if(DEFINED VERSION) - set(GRAPHVIZ_VERSION_STRING "${VERSION}") + set(GRAPHVIZ_VERSION_STRING "${VERSION}") else() - if(NOT Python3_EXECUTABLE) - message(FATAL_ERROR "Python 3 not found") - endif() - execute_process( - COMMAND ${Python3_EXECUTABLE} gen_version.py - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - RESULT_VARIABLE gen_version_result - OUTPUT_VARIABLE GRAPHVIZ_VERSION_STRING - ERROR_VARIABLE gen_version_error - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_STRIP_TRAILING_WHITESPACE - ) - if(NOT gen_version_result EQUAL 0) - message(FATAL_ERROR "Failed to set version: ${gen_version_error}") - endif() + if(NOT Python3_EXECUTABLE) + message(FATAL_ERROR "Python 3 not found") + endif() + execute_process( + COMMAND ${Python3_EXECUTABLE} gen_version.py + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + RESULT_VARIABLE gen_version_result + OUTPUT_VARIABLE GRAPHVIZ_VERSION_STRING + ERROR_VARIABLE gen_version_error + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + if(NOT gen_version_result EQUAL 0) + message(FATAL_ERROR "Failed to set version: ${gen_version_error}") + endif() endif() if(NOT Python3_EXECUTABLE) @@ -168,27 +168,27 @@ if(NOT Python3_EXECUTABLE) endif() # Set GRAPHVIZ_VERSION_BUILD to time of last commit, or to 0 if that fails. execute_process( - COMMAND ${Python3_EXECUTABLE} gen_version.py --committer-date-graphviz - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - RESULT_VARIABLE gen_date_result - OUTPUT_VARIABLE GRAPHVIZ_VERSION_BUILD - ERROR_VARIABLE gen_date_error - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_STRIP_TRAILING_WHITESPACE - ) + COMMAND ${Python3_EXECUTABLE} gen_version.py --committer-date-graphviz + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + RESULT_VARIABLE gen_date_result + OUTPUT_VARIABLE GRAPHVIZ_VERSION_BUILD + ERROR_VARIABLE gen_date_error + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE +) if(NOT gen_date_result EQUAL 0) - message(FATAL_ERROR "Failed to set date: ${gen_date_error}") + message(FATAL_ERROR "Failed to set date: ${gen_date_error}") endif() string(REGEX REPLACE "\\..*" - "" GRAPHVIZ_VERSION_MAJOR - ${GRAPHVIZ_VERSION_STRING}) + "" GRAPHVIZ_VERSION_MAJOR + ${GRAPHVIZ_VERSION_STRING}) string(REGEX REPLACE "[^.]*\\.([^.]*)\\..*" - "\\1" GRAPHVIZ_VERSION_MINOR - ${GRAPHVIZ_VERSION_STRING}) + "\\1" GRAPHVIZ_VERSION_MINOR + ${GRAPHVIZ_VERSION_STRING}) string(REGEX REPLACE "[^.]*\\.[^.]*\\.(.*)$" - "\\1" GRAPHVIZ_VERSION_PATCH - ${GRAPHVIZ_VERSION_STRING}) + "\\1" GRAPHVIZ_VERSION_PATCH + ${GRAPHVIZ_VERSION_STRING}) set(GRAPHVIZ_VERSION_FULL "${GRAPHVIZ_VERSION_STRING}") file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/builddate.h "#define BUILDDATE \"${GRAPHVIZ_VERSION_BUILD}\"") @@ -200,18 +200,18 @@ message(STATUS "Graphviz version: ${GRAPHVIZ_VERSION_FULL}") include(config_checks) if(NOT HAVE_GETOPT_H) - find_package(GETOPT REQUIRED) + find_package(GETOPT REQUIRED) endif() include_directories(${CMAKE_CURRENT_BINARY_DIR}) # ==================== Custom target for `make uninstall` ====================== configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" - IMMEDIATE @ONLY) + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) add_custom_target(uninstall - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) # =========================== Compiler configuration =========================== @@ -224,37 +224,37 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC) - # MSVC warning C4996 mostly fires on completely valid code. The changes - # proposed in the warning text often seriously compromise the code - # portability, while they never substantially improve the code quality. Thus - # we suppress this warning. - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996") + # MSVC warning C4996 mostly fires on completely valid code. The changes + # proposed in the warning text often seriously compromise the code + # portability, while they never substantially improve the code quality. Thus + # we suppress this warning. + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996") else() - # Enable common warnings flags - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") + # Enable common warnings flags + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") endif() if(use_sanitizers) - add_compile_options("-fsanitize=address,undefined") - add_compile_options("-g") - if(${CMAKE_VERSION} VERSION_LESS "3.13.0") - link_libraries("-fsanitize=address,undefined") - link_libraries("-g") - else() - add_link_options("-fsanitize=address,undefined") - add_link_options("-g") - endif() + add_compile_options("-fsanitize=address,undefined") + add_compile_options("-g") + if(${CMAKE_VERSION} VERSION_LESS "3.13.0") + link_libraries("-fsanitize=address,undefined") + link_libraries("-g") + else() + add_link_options("-fsanitize=address,undefined") + add_link_options("-g") + endif() endif() if(use_coverage) - add_compile_options("-coverage") - if(${CMAKE_VERSION} VERSION_LESS "3.16.0") - link_libraries("-coverage") - else() - add_link_options("-coverage") - endif() + add_compile_options("-coverage") + if(${CMAKE_VERSION} VERSION_LESS "3.16.0") + link_libraries("-coverage") + else() + add_link_options("-coverage") + endif() endif() # ============================ Packaging information =========================== @@ -270,7 +270,7 @@ add_subdirectory(lib) add_subdirectory(plugin) add_subdirectory(cmd) if(with_cxx_tests) - add_subdirectory(tests) + add_subdirectory(tests) endif() MATH(EXPR GRAPHVIZ_PLUGIN_VERSION "${GRAPHVIZ_PLUGIN_VERSION}+1") diff --git a/cmake/FindANN.cmake b/cmake/FindANN.cmake index 51dce6c14..981ba4697 100644 --- a/cmake/FindANN.cmake +++ b/cmake/FindANN.cmake @@ -4,11 +4,11 @@ find_program(ANN_RUNTIME_LIBRARY ANN.dll) include(FindPackageHandleStandardArgs) if(WIN32) - find_package_handle_standard_args(ANN DEFAULT_MSG - ANN_LIBRARY ANN_INCLUDE_DIR ANN_RUNTIME_LIBRARY) + find_package_handle_standard_args(ANN DEFAULT_MSG + ANN_LIBRARY ANN_INCLUDE_DIR ANN_RUNTIME_LIBRARY) else() - find_package_handle_standard_args(ANN DEFAULT_MSG - ANN_LIBRARY ANN_INCLUDE_DIR) + find_package_handle_standard_args(ANN DEFAULT_MSG + ANN_LIBRARY ANN_INCLUDE_DIR) endif() mark_as_advanced(ANN_INCLUDE_DIR ANN_LIBRARY ANN_RUNTIME_LIBRARY) diff --git a/cmake/FindCAIRO.cmake b/cmake/FindCAIRO.cmake index 6c7ba9e99..66006c6e8 100644 --- a/cmake/FindCAIRO.cmake +++ b/cmake/FindCAIRO.cmake @@ -1,51 +1,51 @@ include(FindPackageHandleStandardArgs) if(WIN32) - find_path(CAIRO_INCLUDE_DIR cairo/cairo.h) + find_path(CAIRO_INCLUDE_DIR cairo/cairo.h) - find_library(CAIRO_LIBRARY NAMES cairo) + find_library(CAIRO_LIBRARY NAMES cairo) - find_program(CAIRO_RUNTIME_LIBRARY NAMES cairo.dll libcairo-2.dll) - find_program(EXPAT_RUNTIME_LIBRARY NAMES expat.dll libexpat-1.dll) - find_program(FONTCONFIG_RUNTIME_LIBRARY NAMES fontconfig.dll libfontconfig-1.dll) - find_program(PIXMAN_RUNTIME_LIBRARY NAMES pixman-1.dll libpixman-1-0.dll) + find_program(CAIRO_RUNTIME_LIBRARY NAMES cairo.dll libcairo-2.dll) + find_program(EXPAT_RUNTIME_LIBRARY NAMES expat.dll libexpat-1.dll) + find_program(FONTCONFIG_RUNTIME_LIBRARY NAMES fontconfig.dll libfontconfig-1.dll) + find_program(PIXMAN_RUNTIME_LIBRARY NAMES pixman-1.dll libpixman-1-0.dll) - find_package_handle_standard_args(CAIRO DEFAULT_MSG - CAIRO_INCLUDE_DIR + find_package_handle_standard_args(CAIRO DEFAULT_MSG + CAIRO_INCLUDE_DIR - CAIRO_LIBRARY + CAIRO_LIBRARY - CAIRO_RUNTIME_LIBRARY - EXPAT_RUNTIME_LIBRARY - FONTCONFIG_RUNTIME_LIBRARY - PIXMAN_RUNTIME_LIBRARY - ) + CAIRO_RUNTIME_LIBRARY + EXPAT_RUNTIME_LIBRARY + FONTCONFIG_RUNTIME_LIBRARY + PIXMAN_RUNTIME_LIBRARY + ) - set(CAIRO_INCLUDE_DIRS ${CAIRO_INCLUDE_DIR}) + set(CAIRO_INCLUDE_DIRS ${CAIRO_INCLUDE_DIR}) - set(CAIRO_LIBRARIES ${CAIRO_LIBRARY}) + set(CAIRO_LIBRARIES ${CAIRO_LIBRARY}) - set(CAIRO_LINK_LIBRARIES ${CAIRO_LIBRARY}) + set(CAIRO_LINK_LIBRARIES ${CAIRO_LIBRARY}) - set(CAIRO_RUNTIME_LIBRARIES - ${CAIRO_RUNTIME_LIBRARY} - ${EXPAT_RUNTIME_LIBRARY} - ${FONTCONFIG_RUNTIME_LIBRARY} - ${PIXMAN_RUNTIME_LIBRARY} - ) + set(CAIRO_RUNTIME_LIBRARIES + ${CAIRO_RUNTIME_LIBRARY} + ${EXPAT_RUNTIME_LIBRARY} + ${FONTCONFIG_RUNTIME_LIBRARY} + ${PIXMAN_RUNTIME_LIBRARY} + ) else() - find_package(PkgConfig) - pkg_check_modules(CAIRO cairo) - - # prior to CMake 3.12, PkgConfig does not set *_LINK_LIBRARIES, so do it - # manually - if(${CMAKE_VERSION} VERSION_LESS 3.12) - find_library(CAIRO_LINK_LIBRARIES cairo PATHS ENV LIBRARY_PATH) - endif() - - find_package_handle_standard_args(CAIRO DEFAULT_MSG - CAIRO_INCLUDE_DIRS - CAIRO_LIBRARIES - CAIRO_LINK_LIBRARIES - ) + find_package(PkgConfig) + pkg_check_modules(CAIRO cairo) + + # prior to CMake 3.12, PkgConfig does not set *_LINK_LIBRARIES, so do it + # manually + if(${CMAKE_VERSION} VERSION_LESS 3.12) + find_library(CAIRO_LINK_LIBRARIES cairo PATHS ENV LIBRARY_PATH) + endif() + + find_package_handle_standard_args(CAIRO DEFAULT_MSG + CAIRO_INCLUDE_DIRS + CAIRO_LIBRARIES + CAIRO_LINK_LIBRARIES + ) endif() diff --git a/cmake/FindGD.cmake b/cmake/FindGD.cmake index 464f46f83..e40dc2051 100644 --- a/cmake/FindGD.cmake +++ b/cmake/FindGD.cmake @@ -4,11 +4,11 @@ find_program(GD_RUNTIME_LIBRARY libgd.dll) include(FindPackageHandleStandardArgs) if(WIN32) - find_package_handle_standard_args(GD DEFAULT_MSG - GD_LIBRARY GD_INCLUDE_DIR GD_RUNTIME_LIBRARY) + find_package_handle_standard_args(GD DEFAULT_MSG + GD_LIBRARY GD_INCLUDE_DIR GD_RUNTIME_LIBRARY) else() - find_package_handle_standard_args(GD DEFAULT_MSG - GD_LIBRARY GD_INCLUDE_DIR) + find_package_handle_standard_args(GD DEFAULT_MSG + GD_LIBRARY GD_INCLUDE_DIR) endif() mark_as_advanced(GD_INCLUDE_DIR GD_LIBRARY GD_RUNTIME_LIBRARY) diff --git a/cmake/FindGETOPT.cmake b/cmake/FindGETOPT.cmake index 3a9adb99b..f5db880ff 100644 --- a/cmake/FindGETOPT.cmake +++ b/cmake/FindGETOPT.cmake @@ -5,16 +5,16 @@ find_library(GETOPT_LIBRARY NAMES getopt) find_program(GETOPT_RUNTIME_LIBRARY NAMES getopt.dll) if(WIN32) - find_package_handle_standard_args(GETOPT DEFAULT_MSG - GETOPT_INCLUDE_DIR - GETOPT_LIBRARY - GETOPT_RUNTIME_LIBRARY - ) + find_package_handle_standard_args(GETOPT DEFAULT_MSG + GETOPT_INCLUDE_DIR + GETOPT_LIBRARY + GETOPT_RUNTIME_LIBRARY + ) else() - find_package_handle_standard_args(GETOPT DEFAULT_MSG - GETOPT_INCLUDE_DIR - GETOPT_LIBRARY - ) + find_package_handle_standard_args(GETOPT DEFAULT_MSG + GETOPT_INCLUDE_DIR + GETOPT_LIBRARY + ) endif() set(GETOPT_INCLUDE_DIRS ${GETOPT_INCLUDE_DIR}) diff --git a/cmake/FindLTDL.cmake b/cmake/FindLTDL.cmake index 37848a26f..a1ee8c2a2 100644 --- a/cmake/FindLTDL.cmake +++ b/cmake/FindLTDL.cmake @@ -1,15 +1,15 @@ find_path(LTDL_INCLUDE_DIR ltdl.h) if(NOT WIN32 OR MINGW) - find_library(LTDL_LIBRARY NAMES ltdl) + find_library(LTDL_LIBRARY NAMES ltdl) endif() include(FindPackageHandleStandardArgs) if(NOT WIN32 OR MINGW) - find_package_handle_standard_args(LTDL DEFAULT_MSG - LTDL_LIBRARY LTDL_INCLUDE_DIR) + find_package_handle_standard_args(LTDL DEFAULT_MSG + LTDL_LIBRARY LTDL_INCLUDE_DIR) else() - find_package_handle_standard_args(LTDL DEFAULT_MSG - LTDL_INCLUDE_DIR) + find_package_handle_standard_args(LTDL DEFAULT_MSG + LTDL_INCLUDE_DIR) endif() mark_as_advanced(LTDL_INCLUDE_DIR LTDL_LIBRARY) diff --git a/cmake/FindPANGOCAIRO.cmake b/cmake/FindPANGOCAIRO.cmake index b4576f494..ab70da910 100644 --- a/cmake/FindPANGOCAIRO.cmake +++ b/cmake/FindPANGOCAIRO.cmake @@ -1,91 +1,91 @@ include(FindPackageHandleStandardArgs) if(WIN32) - find_path(PANGOCAIRO_INCLUDE_DIR pango/pangocairo.h PATH_SUFFIXES pango-1.0) - find_path(GLIB_INCLUDE_DIR glib.h PATH_SUFFIXES glib-2.0) - find_path(GLIBCONFIG_INCLUDE_DIR glibconfig.h PATH_SUFFIXES glib-2.0/include lib/glib-2.0/include) - find_path(HARFBUZZ_INCLUDE_DIR hb.h PATH_SUFFIXES harfbuzz) + find_path(PANGOCAIRO_INCLUDE_DIR pango/pangocairo.h PATH_SUFFIXES pango-1.0) + find_path(GLIB_INCLUDE_DIR glib.h PATH_SUFFIXES glib-2.0) + find_path(GLIBCONFIG_INCLUDE_DIR glibconfig.h PATH_SUFFIXES glib-2.0/include lib/glib-2.0/include) + find_path(HARFBUZZ_INCLUDE_DIR hb.h PATH_SUFFIXES harfbuzz) - find_library(GLIB_LIBRARY NAMES glib-2.0) - find_library(GOBJECT_LIBRARY NAMES gobject-2.0) - find_library(PANGO_LIBRARY NAMES pango-1.0) - find_library(PANGOCAIRO_LIBRARY NAMES pangocairo-1.0) - find_library(HARFBUZZ_LIBRARY NAMES harfbuzz) + find_library(GLIB_LIBRARY NAMES glib-2.0) + find_library(GOBJECT_LIBRARY NAMES gobject-2.0) + find_library(PANGO_LIBRARY NAMES pango-1.0) + find_library(PANGOCAIRO_LIBRARY NAMES pangocairo-1.0) + find_library(HARFBUZZ_LIBRARY NAMES harfbuzz) - find_program(GLIB_RUNTIME_LIBRARY NAMES glib-2.dll libglib-2.0-0.dll) - find_program(GOBJECT_RUNTIME_LIBRARY NAMES gobject-2.dll libgobject-2.0-0.dll) - find_program(HARFBUZZ_RUNTIME_LIBRARY NAMES libharfbuzz-0.dll) - find_program(PANGO_RUNTIME_LIBRARY NAMES pango-1.dll libpango-1.0-0.dll) - find_program(PANGOCAIRO_RUNTIME_LIBRARY NAMES pangocairo-1.dll libpangocairo-1.0-0.dll) - find_program(PANGOFT_RUNTIME_LIBRARY NAMES pangoft2-1.dll libpangoft2-1.0-0.dll) - find_program(PANGOWIN_RUNTIME_LIBRARY NAMES pangowin32-1.dll libpangowin32-1.0-0.dll) + find_program(GLIB_RUNTIME_LIBRARY NAMES glib-2.dll libglib-2.0-0.dll) + find_program(GOBJECT_RUNTIME_LIBRARY NAMES gobject-2.dll libgobject-2.0-0.dll) + find_program(HARFBUZZ_RUNTIME_LIBRARY NAMES libharfbuzz-0.dll) + find_program(PANGO_RUNTIME_LIBRARY NAMES pango-1.dll libpango-1.0-0.dll) + find_program(PANGOCAIRO_RUNTIME_LIBRARY NAMES pangocairo-1.dll libpangocairo-1.0-0.dll) + find_program(PANGOFT_RUNTIME_LIBRARY NAMES pangoft2-1.dll libpangoft2-1.0-0.dll) + find_program(PANGOWIN_RUNTIME_LIBRARY NAMES pangowin32-1.dll libpangowin32-1.0-0.dll) - find_package_handle_standard_args(PANGOCAIRO DEFAULT_MSG - GLIB_INCLUDE_DIR - GLIBCONFIG_INCLUDE_DIR - PANGOCAIRO_INCLUDE_DIR - HARFBUZZ_INCLUDE_DIR + find_package_handle_standard_args(PANGOCAIRO DEFAULT_MSG + GLIB_INCLUDE_DIR + GLIBCONFIG_INCLUDE_DIR + PANGOCAIRO_INCLUDE_DIR + HARFBUZZ_INCLUDE_DIR - GLIB_LIBRARY - GOBJECT_LIBRARY - PANGO_LIBRARY - PANGOCAIRO_LIBRARY - HARFBUZZ_LIBRARY + GLIB_LIBRARY + GOBJECT_LIBRARY + PANGO_LIBRARY + PANGOCAIRO_LIBRARY + HARFBUZZ_LIBRARY - GLIB_RUNTIME_LIBRARY - GOBJECT_RUNTIME_LIBRARY - HARFBUZZ_RUNTIME_LIBRARY - PANGO_RUNTIME_LIBRARY - PANGOCAIRO_RUNTIME_LIBRARY - PANGOFT_RUNTIME_LIBRARY - PANGOWIN_RUNTIME_LIBRARY - ) + GLIB_RUNTIME_LIBRARY + GOBJECT_RUNTIME_LIBRARY + HARFBUZZ_RUNTIME_LIBRARY + PANGO_RUNTIME_LIBRARY + PANGOCAIRO_RUNTIME_LIBRARY + PANGOFT_RUNTIME_LIBRARY + PANGOWIN_RUNTIME_LIBRARY + ) - set(PANGOCAIRO_INCLUDE_DIRS - ${GLIB_INCLUDE_DIR} - ${GLIBCONFIG_INCLUDE_DIR} - ${PANGOCAIRO_INCLUDE_DIR} - ${HARFBUZZ_INCLUDE_DIR} - ) + set(PANGOCAIRO_INCLUDE_DIRS + ${GLIB_INCLUDE_DIR} + ${GLIBCONFIG_INCLUDE_DIR} + ${PANGOCAIRO_INCLUDE_DIR} + ${HARFBUZZ_INCLUDE_DIR} + ) - set(PANGOCAIRO_LIBRARIES - glib-2.0 - gobject-2.0 - pango-1.0 - pangocairo-1.0 - ) + set(PANGOCAIRO_LIBRARIES + glib-2.0 + gobject-2.0 + pango-1.0 + pangocairo-1.0 + ) - set(PANGOCAIRO_LINK_LIBRARIES - ${GLIB_LIBRARY} - ${GOBJECT_LIBRARY} - ${PANGO_LIBRARY} - ${PANGOCAIRO_LIBRARY} - ${HARFBUZZ_LIBRARY} - ) + set(PANGOCAIRO_LINK_LIBRARIES + ${GLIB_LIBRARY} + ${GOBJECT_LIBRARY} + ${PANGO_LIBRARY} + ${PANGOCAIRO_LIBRARY} + ${HARFBUZZ_LIBRARY} + ) - set(PANGOCAIRO_RUNTIME_LIBRARIES - ${GLIB_RUNTIME_LIBRARY} - ${GOBJECT_RUNTIME_LIBRARY} - ${HARFBUZZ_RUNTIME_LIBRARY} - ${PANGO_RUNTIME_LIBRARY} - ${PANGOCAIRO_RUNTIME_LIBRARY} - ${PANGOFT_RUNTIME_LIBRARY} - ${PANGOWIN_RUNTIME_LIBRARY} - ) + set(PANGOCAIRO_RUNTIME_LIBRARIES + ${GLIB_RUNTIME_LIBRARY} + ${GOBJECT_RUNTIME_LIBRARY} + ${HARFBUZZ_RUNTIME_LIBRARY} + ${PANGO_RUNTIME_LIBRARY} + ${PANGOCAIRO_RUNTIME_LIBRARY} + ${PANGOFT_RUNTIME_LIBRARY} + ${PANGOWIN_RUNTIME_LIBRARY} + ) else() - find_package(PkgConfig) - pkg_check_modules(PANGOCAIRO pangocairo) + find_package(PkgConfig) + pkg_check_modules(PANGOCAIRO pangocairo) - # prior to CMake 3.12, PkgConfig does not set *_LINK_LIBRARIES, so do it - # manually - if(${CMAKE_VERSION} VERSION_LESS 3.12) - find_library(PANGOCAIRO_LINK_LIBRARIES pangocairo-1.0 - PATHS ENV LIBRARY_PATH) - endif() + # prior to CMake 3.12, PkgConfig does not set *_LINK_LIBRARIES, so do it + # manually + if(${CMAKE_VERSION} VERSION_LESS 3.12) + find_library(PANGOCAIRO_LINK_LIBRARIES pangocairo-1.0 + PATHS ENV LIBRARY_PATH) + endif() - find_package_handle_standard_args(PANGOCAIRO DEFAULT_MSG - PANGOCAIRO_INCLUDE_DIRS - PANGOCAIRO_LIBRARIES - PANGOCAIRO_LINK_LIBRARIES - ) + find_package_handle_standard_args(PANGOCAIRO DEFAULT_MSG + PANGOCAIRO_INCLUDE_DIRS + PANGOCAIRO_LIBRARIES + PANGOCAIRO_LINK_LIBRARIES + ) endif() diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in index 48f2cd1f2..b7563d0a2 100644 --- a/cmake/cmake_uninstall.cmake.in +++ b/cmake/cmake_uninstall.cmake.in @@ -1,21 +1,21 @@ if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") - message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) string(REGEX REPLACE "\n" ";" files "${files}") foreach(file ${files}) - message(STATUS "Uninstalling $ENV{DESTDIR}${file}") - if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") - exec_program( - "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" - OUTPUT_VARIABLE rm_out - RETURN_VALUE rm_retval - ) - if(NOT "${rm_retval}" STREQUAL 0) - message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") - endif(NOT "${rm_retval}" STREQUAL 0) - else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") - message(STATUS "File $ENV{DESTDIR}${file} does not exist.") - endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") + message(STATUS "Uninstalling $ENV{DESTDIR}${file}") + if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") + exec_program( + "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + if(NOT "${rm_retval}" STREQUAL 0) + message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") + endif(NOT "${rm_retval}" STREQUAL 0) + else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") + message(STATUS "File $ENV{DESTDIR}${file} does not exist.") + endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") endforeach(file) diff --git a/cmake/config_checks.cmake b/cmake/config_checks.cmake index 28cb2fc48..fc51a68f7 100644 --- a/cmake/config_checks.cmake +++ b/cmake/config_checks.cmake @@ -45,42 +45,42 @@ set( HAVE_LIBGD ${GD_FOUND} ) set( HAVE_ZLIB ${ZLIB_FOUND} ) if(LTDL_FOUND) - set(ENABLE_LTDL 1) - set(LTDL_H 1) + set(ENABLE_LTDL 1) + set(LTDL_H 1) endif() # Values if(WIN32) - set( BROWSER start ) - set( DEFAULT_FONTPATH "C:/Windows/Fonts" ) + set( BROWSER start ) + set( DEFAULT_FONTPATH "C:/Windows/Fonts" ) elseif(APPLE) - set( BROWSER open ) - set( DEFAULT_FONTPATH "~/Library/Fonts:/Library/Fonts:" - "/Network/Library/Fonts:" - "/System/Library/Fonts" ) - set( DARWIN 1 ) - set( DARWIN_DYLIB 1 ) + set( BROWSER open ) + set( DEFAULT_FONTPATH "~/Library/Fonts:/Library/Fonts:" + "/Network/Library/Fonts:" + "/System/Library/Fonts" ) + set( DARWIN 1 ) + set( DARWIN_DYLIB 1 ) else() - set( BROWSER xdg-open ) - set( DEFAULT_FONTPATH "/usr/share/fonts/sun/TrueType:" - "/usr/share/fonts/TrueType:" - "/usr/X11/lib/X11/fonts/TrueType:" - "/usr/share/fonts/sun/Type1:" - "/usr/openwin/lib/X11/fonts/Type1:" - "/usr/share/fonts/X11/Type1:" - "/usr/share/fonts/default/Type1:" - "/usr/X11R6/lib/X11/fonts/TrueType:" - "/usr/X11R6/lib/X11/fonts/truetype:" - "/usr/X11R6/lib/X11/fonts/TTF:" - "/usr/share/fonts/truetype:" - "/usr/openwin/lib/X11/fonts/TrueType:" - "/usr/X11R6/lib/X11/fonts/Type1:" - "/usr/common/share/fonts/ttf" ) + set( BROWSER xdg-open ) + set( DEFAULT_FONTPATH "/usr/share/fonts/sun/TrueType:" + "/usr/share/fonts/TrueType:" + "/usr/X11/lib/X11/fonts/TrueType:" + "/usr/share/fonts/sun/Type1:" + "/usr/openwin/lib/X11/fonts/Type1:" + "/usr/share/fonts/X11/Type1:" + "/usr/share/fonts/default/Type1:" + "/usr/X11R6/lib/X11/fonts/TrueType:" + "/usr/X11R6/lib/X11/fonts/truetype:" + "/usr/X11R6/lib/X11/fonts/TTF:" + "/usr/share/fonts/truetype:" + "/usr/openwin/lib/X11/fonts/TrueType:" + "/usr/X11R6/lib/X11/fonts/Type1:" + "/usr/common/share/fonts/ttf" ) endif() diff --git a/cmake/package_info.cmake b/cmake/package_info.cmake index d6e39806d..1f36e65f9 100644 --- a/cmake/package_info.cmake +++ b/cmake/package_info.cmake @@ -12,36 +12,36 @@ set(CPACK_RESOURCE_FILE_README "${TOP_SOURCE_DIR}/README.md" ) set(CPACK_GENERATOR ZIP) if(CYGWIN) - LIST(APPEND CPACK_GENERATOR CygwinBinary) - SET(CPACK_CYGWIN_PATCH_NUMBER 1) + LIST(APPEND CPACK_GENERATOR CygwinBinary) + SET(CPACK_CYGWIN_PATCH_NUMBER 1) elseif(UNIX) - if(NOT APPLE) - if(EXISTS "/etc/os-release") - file(READ "/etc/os-release" OS_RELEASE) - if("${OS_RELEASE}" MATCHES "ID_LIKE=debian") - LIST(APPEND CPACK_GENERATOR DEB) - else() - LIST(APPEND CPACK_GENERATOR RPM) - endif() - endif() + if(NOT APPLE) + if(EXISTS "/etc/os-release") + file(READ "/etc/os-release" OS_RELEASE) + if("${OS_RELEASE}" MATCHES "ID_LIKE=debian") + LIST(APPEND CPACK_GENERATOR DEB) + else() + LIST(APPEND CPACK_GENERATOR RPM) + endif() endif() + endif() endif() find_package(NSIS) if(NSIS_FOUND) - set(CPACK_NSIS_MUI_ICON "${TOP_SOURCE_DIR}/windows/build/Graphviz.ico" ) - set(CPACK_NSIS_MUI_UNIICON "${TOP_SOURCE_DIR}/windows/build/Graphviz.ico" ) - set(CPACK_NSIS_INSTALLED_ICON_NAME "Uninstall.exe" ) - set(CPACK_NSIS_HELP_LINK "http://www.graphviz.org" ) - set(CPACK_NSIS_URL_INFO_ABOUT "http://www.graphviz.org" ) - set(CPACK_NSIS_MODIFY_PATH ON ) - if(CMAKE_CL_64) - set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") - else() - set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES") - endif() - set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " - Delete \\\"${CPACK_NSIS_INSTALL_ROOT}\\\\${CPACK_PACKAGE_INSTALL_DIRECTORY}\\\\${BINARY_INSTALL_DIR}\\\\config6\\\" - ") - LIST(APPEND CPACK_GENERATOR NSIS) + set(CPACK_NSIS_MUI_ICON "${TOP_SOURCE_DIR}/windows/build/Graphviz.ico" ) + set(CPACK_NSIS_MUI_UNIICON "${TOP_SOURCE_DIR}/windows/build/Graphviz.ico" ) + set(CPACK_NSIS_INSTALLED_ICON_NAME "Uninstall.exe" ) + set(CPACK_NSIS_HELP_LINK "http://www.graphviz.org" ) + set(CPACK_NSIS_URL_INFO_ABOUT "http://www.graphviz.org" ) + set(CPACK_NSIS_MODIFY_PATH ON ) + if(CMAKE_CL_64) + set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") + else() + set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES") + endif() + set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " + Delete \\\"${CPACK_NSIS_INSTALL_ROOT}\\\\${CPACK_PACKAGE_INSTALL_DIRECTORY}\\\\${BINARY_INSTALL_DIR}\\\\config6\\\" + ") + LIST(APPEND CPACK_GENERATOR NSIS) endif() diff --git a/cmd/dot/CMakeLists.txt b/cmd/dot/CMakeLists.txt index a65ed383c..8d9b4528d 100644 --- a/cmd/dot/CMakeLists.txt +++ b/cmd/dot/CMakeLists.txt @@ -1,32 +1,32 @@ add_definitions(-DDEMAND_LOADING=1) include_directories( - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pathplan ) add_executable(dot - # Source files - dot.c - no_builtins.c + # Source files + dot.c + no_builtins.c ) target_link_libraries(dot - cgraph - gvc + cgraph + gvc ) # Installation location of executables install( - TARGETS dot - RUNTIME DESTINATION ${BINARY_INSTALL_DIR} - LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} - ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} + TARGETS dot + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} ) # Aliases to the dot executable (not including '.exe' suffix) @@ -36,41 +36,41 @@ list(APPEND dot_aliases circo fdp neato osage patchwork sfdp twopi) # https://gitlab.com/graphviz/graphviz/-/issues/2123 if(WIN32 OR CYGWIN) - # Copy dot executable to each alias name then install copies to bindir - foreach(cmd_alias IN LISTS dot_aliases) - set(dotcopy "${CMAKE_CURRENT_BINARY_DIR}/${cmd_alias}${CMAKE_EXECUTABLE_SUFFIX}") - add_custom_command( - TARGET dot - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy $ ${dotcopy} - COMMENT "Copying $ to ${dotcopy}" - ) - install( - PROGRAMS ${dotcopy} - DESTINATION ${BINARY_INSTALL_DIR} - ) - endforeach() + # Copy dot executable to each alias name then install copies to bindir + foreach(cmd_alias IN LISTS dot_aliases) + set(dotcopy "${CMAKE_CURRENT_BINARY_DIR}/${cmd_alias}${CMAKE_EXECUTABLE_SUFFIX}") + add_custom_command( + TARGET dot + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ ${dotcopy} + COMMENT "Copying $ to ${dotcopy}" + ) + install( + PROGRAMS ${dotcopy} + DESTINATION ${BINARY_INSTALL_DIR} + ) + endforeach() else() - # For not-WIN32, install symlinks from dot_aliases -> dot_executable in bindir. - # Note: This may be brittle. This builds a symlink from ./cmd_alias -> ./dot - # in ${CMAKE_CURRENT_BINARY_DIR}, then installs that symlink - # into ${BINARY_INSTALL_DIR}. This presumes ${CMAKE_CURRENT_BINARY_DIR}/dot - # is installed to ${BINARY_INSTALL_DIR}/dot. There is a (small?) risk of - # dangling symlinks - foreach(cmd_alias IN LISTS dot_aliases) - set(dotlink "${CMAKE_CURRENT_BINARY_DIR}/${cmd_alias}") - add_custom_command( - TARGET dot - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E create_symlink $ ${cmd_alias} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Linking $ as ${cmd_alias}" - ) - install( - FILES ${dotlink} - DESTINATION ${BINARY_INSTALL_DIR} - ) - endforeach() + # For not-WIN32, install symlinks from dot_aliases -> dot_executable in bindir. + # Note: This may be brittle. This builds a symlink from ./cmd_alias -> ./dot + # in ${CMAKE_CURRENT_BINARY_DIR}, then installs that symlink + # into ${BINARY_INSTALL_DIR}. This presumes ${CMAKE_CURRENT_BINARY_DIR}/dot + # is installed to ${BINARY_INSTALL_DIR}/dot. There is a (small?) risk of + # dangling symlinks + foreach(cmd_alias IN LISTS dot_aliases) + set(dotlink "${CMAKE_CURRENT_BINARY_DIR}/${cmd_alias}") + add_custom_command( + TARGET dot + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E create_symlink $ ${cmd_alias} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Linking $ as ${cmd_alias}" + ) + install( + FILES ${dotlink} + DESTINATION ${BINARY_INSTALL_DIR} + ) + endforeach() endif() # Specify man pages to be installed @@ -114,6 +114,6 @@ endif() if(NOT CMAKE_CROSSCOMPILING) install( - SCRIPT ../../cmake/configure_plugins.cmake + SCRIPT ../../cmake/configure_plugins.cmake ) endif() diff --git a/cmd/gvpr/CMakeLists.txt b/cmd/gvpr/CMakeLists.txt index 51c88206e..1e3fd9f25 100644 --- a/cmd/gvpr/CMakeLists.txt +++ b/cmd/gvpr/CMakeLists.txt @@ -1,24 +1,24 @@ add_definitions(-DEXPORT_GVPR) add_executable(gvpr-bin - # Source files - gvprmain.c + # 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 + ${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 + ast + cgraph + gvc + gvpr + expr + sfio ) set_target_properties(gvpr-bin @@ -26,10 +26,10 @@ set_target_properties(gvpr-bin # Installation location of executables install( - TARGETS gvpr-bin - RUNTIME DESTINATION ${BINARY_INSTALL_DIR} - LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} - ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} + TARGETS gvpr-bin + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} ) # Specify man pages to be installed diff --git a/cmd/tools/CMakeLists.txt b/cmd/tools/CMakeLists.txt index 88b3f1da5..30cb39fbd 100644 --- a/cmd/tools/CMakeLists.txt +++ b/cmd/tools/CMakeLists.txt @@ -3,32 +3,32 @@ # - installation of executable # - installation of manpage function(tool_defaults name) - if(NOT HAVE_GETOPT_H) - target_link_libraries(${name} ${GETOPT_LINK_LIBRARIES}) - endif() - + if(NOT HAVE_GETOPT_H) + target_link_libraries(${name} ${GETOPT_LINK_LIBRARIES}) + endif() + + install( + TARGETS ${name} + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + ) + + if(GZIP) + add_custom_target(man-${name} ALL DEPENDS ${name}.1.gz) + add_custom_command( + OUTPUT ${name}.1.gz + COMMAND ${GZIP} -9 --no-name --to-stdout ${name}.1 + >"${CMAKE_CURRENT_BINARY_DIR}/${name}.1.gz" + MAIN_DEPENDENCY ${name}.1 + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}.1.gz + DESTINATION ${MAN_INSTALL_DIR}/man1) + else() install( - TARGETS ${name} - RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + FILES ${name}.1 + DESTINATION ${MAN_INSTALL_DIR}/man1 ) - - if(GZIP) - add_custom_target(man-${name} ALL DEPENDS ${name}.1.gz) - add_custom_command( - OUTPUT ${name}.1.gz - COMMAND ${GZIP} -9 --no-name --to-stdout ${name}.1 - >"${CMAKE_CURRENT_BINARY_DIR}/${name}.1.gz" - MAIN_DEPENDENCY ${name}.1 - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}.1.gz - DESTINATION ${MAN_INSTALL_DIR}/man1) - else() - install( - FILES ${name}.1 - DESTINATION ${MAN_INSTALL_DIR}/man1 - ) - endif() + endif() endfunction(tool_defaults) # ================================ simple tools ================================ @@ -36,27 +36,27 @@ endfunction(tool_defaults) # This function adds a simple tool using only it's name function(add_simple_tool name) - add_executable(${name} ${name}.c) - - target_include_directories(${name} PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan - ${GETOPT_INCLUDE_DIRS} - ) + add_executable(${name} ${name}.c) - target_link_libraries(${name} - cgraph - ingraphs - ) + target_include_directories(${name} PRIVATE + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan + ${GETOPT_INCLUDE_DIRS} + ) - tool_defaults(${name}) + target_link_libraries(${name} + cgraph + ingraphs + ) + + tool_defaults(${name}) endfunction(add_simple_tool) add_simple_tool(acyclic) @@ -74,26 +74,26 @@ add_simple_tool(unflatten) # ================================== dijkstra ================================== add_executable(dijkstra - # Source files - dijkstra.c + # Source files + dijkstra.c ) target_include_directories(dijkstra PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan - ${GETOPT_INCLUDE_DIRS} + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan + ${GETOPT_INCLUDE_DIRS} ) target_link_libraries(dijkstra - cgraph - ingraphs + cgraph + ingraphs ) tool_defaults(dijkstra) @@ -104,45 +104,45 @@ FLEX_TARGET(Gmlscan ${CMAKE_CURRENT_SOURCE_DIR}/gmlscan.l ${CMAKE_CURRENT_BINAR ADD_FLEX_BISON_DEPENDENCY(Gmlscan Gmlparse) add_executable(gml2gv - # Source files - gml2gv.c + # Source files + gml2gv.c - # Generated files - ${BISON_Gmlparse_OUTPUTS} - ${FLEX_Gmlscan_OUTPUTS} + # Generated files + ${BISON_Gmlparse_OUTPUTS} + ${FLEX_Gmlscan_OUTPUTS} ) target_include_directories(gml2gv PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan - ${GETOPT_INCLUDE_DIRS} + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan + ${GETOPT_INCLUDE_DIRS} ) target_link_libraries(gml2gv - cgraph + cgraph ) tool_defaults(gml2gv) add_executable(gv2gml gv2gml.c) target_include_directories(gv2gml PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pathplan - ${GETOPT_INCLUDE_DIRS}) + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pathplan + ${GETOPT_INCLUDE_DIRS}) target_link_libraries(gv2gml cgraph gvc ingraphs) if(NOT HAVE_GETOPT_H) - target_link_libraries(gv2gml ${GETOPT_LINK_LIBRARIES}) + target_link_libraries(gv2gml ${GETOPT_LINK_LIBRARIES}) endif() install(TARGETS gv2gml RUNTIME DESTINATION ${BINARY_INSTALL_DIR}) @@ -150,27 +150,27 @@ install(TARGETS gv2gml RUNTIME DESTINATION ${BINARY_INSTALL_DIR}) if(EXPAT_FOUND) add_executable(graphml2gv - # Source files - graphml2gv.c + # Source files + graphml2gv.c ) target_include_directories(graphml2gv PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan - ${EXPAT_INCLUDE_DIRS} - ${GETOPT_INCLUDE_DIRS} + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan + ${EXPAT_INCLUDE_DIRS} + ${GETOPT_INCLUDE_DIRS} ) target_link_libraries(graphml2gv - cgraph - ${EXPAT_LIBRARIES} + cgraph + ${EXPAT_LIBRARIES} ) tool_defaults(graphml2gv) @@ -179,59 +179,59 @@ endif() # ================================== gvcolor =================================== add_executable(gvcolor - # Header files - colortbl.h + # Header files + colortbl.h - # Source files - colxlate.c - gvcolor.c + # Source files + colxlate.c + gvcolor.c ) target_include_directories(gvcolor PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan - ${GETOPT_INCLUDE_DIRS} + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan + ${GETOPT_INCLUDE_DIRS} ) target_link_libraries(gvcolor - cgraph - ingraphs + cgraph + ingraphs ) tool_defaults(gvcolor) # ==================================== gvgen =================================== add_executable(gvgen - # Source files - graph_generator.c - gvgen.c + # Source files + graph_generator.c + gvgen.c ) target_include_directories(gvgen PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan - ${GETOPT_INCLUDE_DIRS} + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan + ${GETOPT_INCLUDE_DIRS} ) target_link_libraries(gvgen cgraph) # Link to math library if(UNIX) - target_link_libraries(gvgen m) + target_link_libraries(gvgen m) endif() tool_defaults(gvgen) @@ -242,28 +242,28 @@ tool_defaults(gvgen) add_definitions(-DDEMAND_LOADING=0) add_executable(gvpack - # Source files - gvpack.c + # Source files + gvpack.c ) target_include_directories(gvpack PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan - ${GETOPT_INCLUDE_DIRS} + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan + ${GETOPT_INCLUDE_DIRS} ) target_link_libraries(gvpack - cgraph - gvc - gvplugin_neato_layout - ingraphs + cgraph + gvc + gvplugin_neato_layout + ingraphs ) tool_defaults(gvpack) @@ -272,31 +272,31 @@ tool_defaults(gvpack) if(EXPAT_FOUND) add_executable(gxl2gv - # Source files - cvtgxl.c - gv2gxl.c - gxl2gv.c + # Source files + cvtgxl.c + gv2gxl.c + gxl2gv.c ) target_include_directories(gxl2gv PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan - ${EXPAT_INCLUDE_DIRS} - ${GETOPT_INCLUDE_DIRS} + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan + ${EXPAT_INCLUDE_DIRS} + ${GETOPT_INCLUDE_DIRS} ) target_link_libraries(gxl2gv - cgraph - gvc - ingraphs - ${EXPAT_LIBRARIES} + cgraph + gvc + ingraphs + ${EXPAT_LIBRARIES} ) tool_defaults(gxl2gv) @@ -305,55 +305,55 @@ endif() # ==================================== mm2gv =================================== add_executable(mm2gv - # Source files - matrix_market.c - mm2gv.c - mmio.c + # Source files + matrix_market.c + mm2gv.c + mmio.c ) target_include_directories(mm2gv PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan - ${GETOPT_INCLUDE_DIRS} + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan + ${GETOPT_INCLUDE_DIRS} ) target_link_libraries(mm2gv - sparse - cgraph - gvc + sparse + cgraph + gvc ) tool_defaults(mm2gv) # =================================== sccmap =================================== add_executable(sccmap - # Source files - sccmap.c + # Source files + sccmap.c ) target_include_directories(sccmap PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan - ${GETOPT_INCLUDE_DIRS} + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan + ${GETOPT_INCLUDE_DIRS} ) target_link_libraries(sccmap - cgraph - ingraphs + cgraph + ingraphs ) tool_defaults(sccmap) @@ -361,15 +361,15 @@ tool_defaults(sccmap) # ===================== Install third party DLLs on Windows ==================== if(WIN32 AND install_win_dependency_dlls AND EXPAT_FOUND) - install( - FILES ${EXPAT_RUNTIME_LIBRARIES} - DESTINATION ${BINARY_INSTALL_DIR} - ) + install( + FILES ${EXPAT_RUNTIME_LIBRARIES} + DESTINATION ${BINARY_INSTALL_DIR} + ) endif() if(WIN32 AND install_win_dependency_dlls) - install( - FILES ${GETOPT_RUNTIME_LIBRARIES} - DESTINATION ${BINARY_INSTALL_DIR} - ) + install( + FILES ${GETOPT_RUNTIME_LIBRARIES} + DESTINATION ${BINARY_INSTALL_DIR} + ) endif() diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 4c05c0583..e258d2260 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -34,6 +34,6 @@ add_subdirectory(gvc) # C++ API libraries if(with_cxx_api) - add_subdirectory(cgraph++) - add_subdirectory(gvc++) + add_subdirectory(cgraph++) + add_subdirectory(gvc++) endif() diff --git a/lib/ast/CMakeLists.txt b/lib/ast/CMakeLists.txt index acc60a00a..1c3a670ac 100644 --- a/lib/ast/CMakeLists.txt +++ b/lib/ast/CMakeLists.txt @@ -1,27 +1,27 @@ add_library(ast STATIC - # Header files - ast.h - error.h - hashkey.h + # Header files + ast.h + error.h + hashkey.h - # Source files - pathpath.c - sfstr.h - chresc.c - chrtoi.c - error.c - fmtbuf.c - fmtesc.c - pathaccess.c - pathcanon.c - pathcat.c - pathfind.c - pathgetlink.c - strcopy.c - stresc.c - strmatch.c + # Source files + pathpath.c + sfstr.h + chresc.c + chrtoi.c + error.c + fmtbuf.c + fmtesc.c + pathaccess.c + pathcanon.c + pathcat.c + pathfind.c + pathgetlink.c + strcopy.c + stresc.c + strmatch.c ) target_include_directories(ast PRIVATE - ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR} ) diff --git a/lib/cdt/CMakeLists.txt b/lib/cdt/CMakeLists.txt index 8c6e67f46..5a85c15df 100644 --- a/lib/cdt/CMakeLists.txt +++ b/lib/cdt/CMakeLists.txt @@ -1,45 +1,45 @@ add_definitions(-DEXPORT_CDT) add_library(cdt SHARED - # Header files - cdt.h - dthdr.h + # Header files + cdt.h + dthdr.h - # Source files - dtclose.c - dtdisc.c - dtextract.c - dtflatten.c - dthash.c - dtlist.c - dtmethod.c - dtopen.c - dtrenew.c - dtrestore.c - dtsize.c - dtstat.c - dtstrhash.c - dttree.c - dtview.c - dtwalk.c + # Source files + dtclose.c + dtdisc.c + dtextract.c + dtflatten.c + dthash.c + dtlist.c + dtmethod.c + dtopen.c + dtrenew.c + dtrestore.c + dtsize.c + dtstat.c + dtstrhash.c + dttree.c + dtview.c + dtwalk.c ) target_include_directories(cdt PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}) + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}) # Installation location of library files install( - TARGETS cdt - RUNTIME DESTINATION ${BINARY_INSTALL_DIR} - LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} - ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} + TARGETS cdt + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} ) # Specify headers to be installed install( - FILES cdt.h - DESTINATION ${HEADER_INSTALL_DIR} + FILES cdt.h + DESTINATION ${HEADER_INSTALL_DIR} ) # Specify man pages to be installed @@ -63,6 +63,6 @@ endif() # Specify library version and soversion set_target_properties(cdt PROPERTIES - VERSION 5.0.0 - SOVERSION 5 + VERSION 5.0.0 + SOVERSION 5 ) diff --git a/lib/cgraph++/CMakeLists.txt b/lib/cgraph++/CMakeLists.txt index 35ef55c94..1f0b72525 100644 --- a/lib/cgraph++/CMakeLists.txt +++ b/lib/cgraph++/CMakeLists.txt @@ -1,7 +1,7 @@ add_library(cgraph++ SHARED AGraph.h AGraph.cpp - ) +) set_property(TARGET cgraph++ PROPERTY CXX_STANDARD 20) set_property(TARGET cgraph++ PROPERTY CXX_STANDARD_REQUIRED ON) @@ -9,7 +9,7 @@ target_include_directories(cgraph++ PRIVATE ${GRAPHVIZ_LIB_DIR} ${GRAPHVIZ_LIB_DIR}/cdt ${CMAKE_CURRENT_SOURCE_DIR} - ) +) target_link_libraries(cgraph++ cgraph) @@ -18,14 +18,14 @@ install( RUNTIME DESTINATION ${BINARY_INSTALL_DIR} LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} - ) +) install( FILES AGraph.h DESTINATION ${HEADER_INSTALL_DIR} - ) +) set_target_properties(cgraph++ PROPERTIES VERSION 0.0.1 SOVERSION 0 - ) +) diff --git a/lib/cgraph/CMakeLists.txt b/lib/cgraph/CMakeLists.txt index ab411429a..1ec804fe0 100644 --- a/lib/cgraph/CMakeLists.txt +++ b/lib/cgraph/CMakeLists.txt @@ -8,66 +8,66 @@ if(NOT HAVE_UNISTD_H) endif() add_library(cgraph SHARED - # Header files - agxbuf.h - bitarray.h - cghdr.h - cgraph.h - exit.h - itos.h - likely.h - prisize_t.h - sprint.h - strcasecmp.h - unreachable.h + # Header files + agxbuf.h + bitarray.h + cghdr.h + cgraph.h + exit.h + itos.h + likely.h + prisize_t.h + sprint.h + strcasecmp.h + unreachable.h - # Source files - agerror.c - agxbuf.c - apply.c - attr.c - edge.c - flatten.c - graph.c - id.c - imap.c - io.c - mem.c - node.c - obj.c - pend.c - rec.c - refstr.c - subg.c - utils.c - write.c + # Source files + agerror.c + agxbuf.c + apply.c + attr.c + edge.c + flatten.c + graph.c + id.c + imap.c + io.c + mem.c + node.c + obj.c + pend.c + rec.c + refstr.c + subg.c + utils.c + write.c - # Generated files - ${BISON_Grammar_OUTPUTS} - ${FLEX_Scan_OUTPUTS} + # Generated files + ${BISON_Grammar_OUTPUTS} + ${FLEX_Scan_OUTPUTS} ) target_include_directories(cgraph PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} ) target_link_libraries(cgraph cdt) # Installation location of library files install( - TARGETS cgraph - RUNTIME DESTINATION ${BINARY_INSTALL_DIR} - LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} - ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} + TARGETS cgraph + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} ) # Specify headers to be installed install( - FILES cgraph.h - DESTINATION ${HEADER_INSTALL_DIR} + FILES cgraph.h + DESTINATION ${HEADER_INSTALL_DIR} ) # Specify man pages to be installed @@ -91,6 +91,6 @@ endif() # Specify library version and soversion set_target_properties(cgraph PROPERTIES - VERSION 6.0.0 - SOVERSION 6 + VERSION 6.0.0 + SOVERSION 6 ) diff --git a/lib/circogen/CMakeLists.txt b/lib/circogen/CMakeLists.txt index 1ba68fb75..6590d5bb6 100644 --- a/lib/circogen/CMakeLists.txt +++ b/lib/circogen/CMakeLists.txt @@ -1,38 +1,38 @@ add_definitions(-DNEATOGEN_EXPORTS=1) add_library(circogen STATIC - # Header files - block.h - blockpath.h - blocktree.h - circo.h - circpos.h - circular.h - deglist.h - edgelist.h - nodelist.h + # Header files + block.h + blockpath.h + blocktree.h + circo.h + circpos.h + circular.h + deglist.h + edgelist.h + nodelist.h - # Source files - block.c - blockpath.c - blocktree.c - circpos.c - circular.c - circularinit.c - deglist.c - edgelist.c - nodelist.c + # Source files + block.c + blockpath.c + blocktree.c + circpos.c + circular.c + circularinit.c + deglist.c + edgelist.c + nodelist.c ) target_include_directories(circogen PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan) + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan) target_link_libraries(circogen PRIVATE - cgraph + cgraph ) diff --git a/lib/common/CMakeLists.txt b/lib/common/CMakeLists.txt index e209b63b3..18faeb256 100644 --- a/lib/common/CMakeLists.txt +++ b/lib/common/CMakeLists.txt @@ -8,141 +8,141 @@ endif() # Generate colortbl.h from sources add_custom_command( - OUTPUT svgcolor_lib - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/svgcolor_names ${TOP_SOURCE_DIR}/awk/svgcolor.awk - COMMAND ${AWK_EXECUTABLE} ${AWK_OPTIONS} -f ${TOP_SOURCE_DIR}/awk/svgcolor.awk - ${CMAKE_CURRENT_SOURCE_DIR}/svgcolor_names > ${CMAKE_CURRENT_BINARY_DIR}/svgcolor_lib + OUTPUT svgcolor_lib + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/svgcolor_names ${TOP_SOURCE_DIR}/awk/svgcolor.awk + COMMAND ${AWK_EXECUTABLE} ${AWK_OPTIONS} -f ${TOP_SOURCE_DIR}/awk/svgcolor.awk + ${CMAKE_CURRENT_SOURCE_DIR}/svgcolor_names > ${CMAKE_CURRENT_BINARY_DIR}/svgcolor_lib ) add_custom_command( - OUTPUT brewer_lib - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/brewer_colors ${TOP_SOURCE_DIR}/awk/brewer.awk - COMMAND ${AWK_EXECUTABLE} -f ${TOP_SOURCE_DIR}/awk/brewer.awk - ${CMAKE_CURRENT_SOURCE_DIR}/brewer_colors > ${CMAKE_CURRENT_BINARY_DIR}/brewer_lib + OUTPUT brewer_lib + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/brewer_colors ${TOP_SOURCE_DIR}/awk/brewer.awk + COMMAND ${AWK_EXECUTABLE} -f ${TOP_SOURCE_DIR}/awk/brewer.awk + ${CMAKE_CURRENT_SOURCE_DIR}/brewer_colors > ${CMAKE_CURRENT_BINARY_DIR}/brewer_lib ) configure_file( - "${TOP_SOURCE_DIR}/cmake/generate_color_lib.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/generate_color_lib.cmake" - @ONLY + "${TOP_SOURCE_DIR}/cmake/generate_color_lib.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/generate_color_lib.cmake" + @ONLY ) add_custom_command( - OUTPUT color_lib - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/svgcolor_lib ${CMAKE_CURRENT_BINARY_DIR}/brewer_lib ${CMAKE_CURRENT_SOURCE_DIR}/color_names - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/generate_color_lib.cmake + OUTPUT color_lib + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/svgcolor_lib ${CMAKE_CURRENT_BINARY_DIR}/brewer_lib ${CMAKE_CURRENT_SOURCE_DIR}/color_names + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/generate_color_lib.cmake ) add_custom_command( - OUTPUT common/colortbl.h - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/color_lib - COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/common" - COMMAND ${AWK_EXECUTABLE} -f ${TOP_SOURCE_DIR}/awk/colortbl.awk - ${CMAKE_CURRENT_BINARY_DIR}/color_lib > ${CMAKE_CURRENT_BINARY_DIR}/common/colortbl.h + OUTPUT common/colortbl.h + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/color_lib + COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/common" + COMMAND ${AWK_EXECUTABLE} -f ${TOP_SOURCE_DIR}/awk/colortbl.awk + ${CMAKE_CURRENT_BINARY_DIR}/color_lib > ${CMAKE_CURRENT_BINARY_DIR}/common/colortbl.h ) add_library(common_obj OBJECT - # Header files - arith.h - color.h - colorprocs.h - ${CMAKE_CURRENT_BINARY_DIR}/common/colortbl.h - const.h - entities.h - geom.h - geomprocs.h - globals.h - intset.h - htmllex.h - htmltable.h - logic.h - macros.h - memory.h - pointset.h - ps_font_equiv.h - render.h - textspan.h - textspan_lut.h - types.h - usershape.h - utils.h + # Header files + arith.h + color.h + colorprocs.h + ${CMAKE_CURRENT_BINARY_DIR}/common/colortbl.h + const.h + entities.h + geom.h + geomprocs.h + globals.h + intset.h + htmllex.h + htmltable.h + logic.h + macros.h + memory.h + pointset.h + ps_font_equiv.h + render.h + textspan.h + textspan_lut.h + types.h + usershape.h + utils.h - # Source files - args.c - arrows.c - colxlate.c - ellipse.c - emit.c - geom.c - globals.c - htmllex.c - htmltable.c - input.c - intset.c - labels.c - ns.c - memory.c - output.c - pointset.c - postproc.c - psusershape.c - routespl.c - shapes.c - splines.c - taper.c - textspan.c - textspan_lut.c - timing.c - utils.c - xml.c + # Source files + args.c + arrows.c + colxlate.c + ellipse.c + emit.c + geom.c + globals.c + htmllex.c + htmltable.c + input.c + intset.c + labels.c + ns.c + memory.c + output.c + pointset.c + postproc.c + psusershape.c + routespl.c + shapes.c + splines.c + taper.c + textspan.c + textspan_lut.c + timing.c + utils.c + xml.c - # Generated files - ${BISON_HTMLparse_OUTPUTS} + # Generated files + ${BISON_HTMLparse_OUTPUTS} ) target_include_directories(common_obj PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan - ${GRAPHVIZ_LIB_DIR}/xdot - ${EXPAT_INCLUDE_DIRS} + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR}/xdot + ${EXPAT_INCLUDE_DIRS} ) if(WIN32) - target_include_directories(common_obj PRIVATE ${WINDOWS_DEPENDENCY_DIR}/include) + target_include_directories(common_obj PRIVATE ${WINDOWS_DEPENDENCY_DIR}/include) endif() # From https://gitlab.com/graphviz/graphviz/-/issues/1613 @mdwies 20093010 if(APPLE) - target_compile_options(common_obj PRIVATE "-fno-common") + target_compile_options(common_obj PRIVATE "-fno-common") endif() add_library(common STATIC - $ + $ ) target_link_libraries(common PRIVATE - cgraph - pathplan - label - xdot + cgraph + pathplan + label + xdot ) if(EXPAT_FOUND) - target_link_libraries(common PRIVATE - ${EXPAT_LIBRARIES} - ) + target_link_libraries(common PRIVATE + ${EXPAT_LIBRARIES} + ) endif() # Specify headers to be installed install( - FILES - arith.h - color.h - geom.h - textspan.h - types.h - usershape.h - DESTINATION ${HEADER_INSTALL_DIR} + FILES + arith.h + color.h + geom.h + textspan.h + types.h + usershape.h + DESTINATION ${HEADER_INSTALL_DIR} ) diff --git a/lib/dotgen/CMakeLists.txt b/lib/dotgen/CMakeLists.txt index 1fdd69e67..0722dc08d 100644 --- a/lib/dotgen/CMakeLists.txt +++ b/lib/dotgen/CMakeLists.txt @@ -1,38 +1,38 @@ add_library(dotgen STATIC - # Header files - aspect.h - dot.h - dotprocs.h + # Header files + aspect.h + dot.h + dotprocs.h - # Source files - aspect.c - acyclic.c - class1.c - class2.c - cluster.c - compound.c - conc.c - decomp.c - dotinit.c - dotsplines.c - fastgr.c - flat.c - mincross.c - position.c - rank.c - sameport.c + # Source files + aspect.c + acyclic.c + class1.c + class2.c + cluster.c + compound.c + conc.c + decomp.c + dotinit.c + dotsplines.c + fastgr.c + flat.c + mincross.c + position.c + rank.c + sameport.c ) target_include_directories(dotgen PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan ) target_link_libraries(dotgen PRIVATE - cgraph + cgraph ) diff --git a/lib/expr/CMakeLists.txt b/lib/expr/CMakeLists.txt index 364234aa7..0516025b1 100644 --- a/lib/expr/CMakeLists.txt +++ b/lib/expr/CMakeLists.txt @@ -6,44 +6,44 @@ BISON_TARGET( ) add_custom_command( - OUTPUT exparse.c - MAIN_DEPENDENCY y.tab.c - COMMAND ${CMAKE_COMMAND} - ARGS -P ${CMAKE_CURRENT_SOURCE_DIR}/exparse-replacements.cmake + OUTPUT exparse.c + MAIN_DEPENDENCY y.tab.c + COMMAND ${CMAKE_COMMAND} + ARGS -P ${CMAKE_CURRENT_SOURCE_DIR}/exparse-replacements.cmake ) add_library(expr STATIC - # Header files - exgram.h - exlib.h - exop.h - exparse.h - expr.h + # Header files + exgram.h + exlib.h + exop.h + exparse.h + expr.h - # Source files - excc.c - excontext.c - exdata.c - exerror.c - exeval.c - exexpr.c - exopen.c - extoken.c - extype.c - exzero.c - exnospace.c - exstash.c + # Source files + excc.c + excontext.c + exdata.c + exerror.c + exeval.c + exexpr.c + exopen.c + extoken.c + extype.c + exzero.c + exnospace.c + exstash.c - # Generated files - ${CMAKE_CURRENT_BINARY_DIR}/exparse.c + # Generated files + ${CMAKE_CURRENT_BINARY_DIR}/exparse.c ) target_include_directories(expr PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/.. # needed to find generated expr/y.tab.h - ${GRAPHVIZ_LIB_DIR}/ast - ${GRAPHVIZ_LIB_DIR}/vmalloc - ${GRAPHVIZ_LIB_DIR}/sfio - ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/.. # needed to find generated expr/y.tab.h + ${GRAPHVIZ_LIB_DIR}/ast + ${GRAPHVIZ_LIB_DIR}/vmalloc + ${GRAPHVIZ_LIB_DIR}/sfio + ${GRAPHVIZ_LIB_DIR}/cdt ) diff --git a/lib/fdpgen/CMakeLists.txt b/lib/fdpgen/CMakeLists.txt index b29f26cc5..a30ae557d 100644 --- a/lib/fdpgen/CMakeLists.txt +++ b/lib/fdpgen/CMakeLists.txt @@ -1,37 +1,37 @@ add_definitions(-DNEATOGEN_EXPORTS=1) add_library(fdpgen STATIC - # Header files - clusteredges.h - comp.h - dbg.h - fdp.h - grid.h - tlayout.h - xlayout.h + # Header files + clusteredges.h + comp.h + dbg.h + fdp.h + grid.h + tlayout.h + xlayout.h - # Source files - clusteredges.c - comp.c - dbg.c - fdpinit.c - grid.c - layout.c - tlayout.c - xlayout.c + # Source files + clusteredges.c + comp.c + dbg.c + fdpinit.c + grid.c + layout.c + tlayout.c + xlayout.c ) target_include_directories(fdpgen PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan ) target_link_libraries(fdpgen PRIVATE - cgraph - pathplan + cgraph + pathplan ) diff --git a/lib/gvc++/CMakeLists.txt b/lib/gvc++/CMakeLists.txt index a00951049..4e84ab19e 100644 --- a/lib/gvc++/CMakeLists.txt +++ b/lib/gvc++/CMakeLists.txt @@ -5,7 +5,7 @@ add_library(gvc++ SHARED GVLayout.cpp GVRenderData.h GVRenderData.cpp - ) +) set_target_properties(gvc++ PROPERTIES CXX_STANDARD 20) set_target_properties(gvc++ PROPERTIES CXX_STANDARD_REQUIRED ON) @@ -18,19 +18,19 @@ target_include_directories(gvc++ PRIVATE ${GRAPHVIZ_LIB_DIR}/common ${GRAPHVIZ_LIB_DIR}/gvc ${GRAPHVIZ_LIB_DIR}/pathplan - ) +) target_link_libraries(gvc++ PUBLIC cgraph++ gvc - ) +) install( TARGETS gvc++ RUNTIME DESTINATION ${BINARY_INSTALL_DIR} LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} - ) +) install( FILES @@ -38,9 +38,9 @@ install( GVLayout.h GVRenderData.h DESTINATION ${HEADER_INSTALL_DIR} - ) +) set_target_properties(gvc++ PROPERTIES VERSION 0.0.1 SOVERSION 0 - ) +) diff --git a/lib/gvc/CMakeLists.txt b/lib/gvc/CMakeLists.txt index 85c4e46a1..2e86364e7 100644 --- a/lib/gvc/CMakeLists.txt +++ b/lib/gvc/CMakeLists.txt @@ -1,36 +1,36 @@ add_definitions(-DGVC_EXPORTS -DGVLIBDIR="${LIBRARY_INSTALL_DIR}/graphviz") add_library(gvc SHARED - # Header files - gvc.h - gvcext.h - gvcint.h - gvcjob.h - gvconfig.h - gvcommon.h - gvcproc.h - gvio.h - gvplugin.h - gvplugin_device.h - gvplugin_layout.h - gvplugin_loadimage.h - gvplugin_render.h - gvplugin_textlayout.h + # Header files + gvc.h + gvcext.h + gvcint.h + gvcjob.h + gvconfig.h + gvcommon.h + gvcproc.h + gvio.h + gvplugin.h + gvplugin_device.h + gvplugin_layout.h + gvplugin_loadimage.h + gvplugin_render.h + gvplugin_textlayout.h - # Source files - gvc.c - gvconfig.c - gvcontext.c - gvdevice.c - gvevent.c - gvjobs.c - gvlayout.c - gvloadimage.c - gvplugin.c - gvrender.c - gvtextlayout.c - gvtool_tred.c - gvusershape.c + # Source files + gvc.c + gvconfig.c + gvcontext.c + gvdevice.c + gvevent.c + gvjobs.c + gvlayout.c + gvloadimage.c + gvplugin.c + gvrender.c + gvtextlayout.c + gvtool_tred.c + gvusershape.c ) target_include_directories(gvc @@ -47,62 +47,62 @@ target_include_directories(gvc ) target_link_libraries(gvc PRIVATE - $ - $ + $ + $ ) target_link_libraries(gvc PRIVATE - cdt - cgraph - common - pack + cdt + cgraph + common + pack ) target_link_libraries(gvc PUBLIC - ${MATH_LIB} + ${MATH_LIB} ) if(LTDL_FOUND) - target_include_directories(gvc PRIVATE ${LTDL_INCLUDE_DIRS}) - if(NOT WIN32 OR MINGW) - target_link_libraries(gvc PUBLIC ${LTDL_LIBRARIES}) - endif() + target_include_directories(gvc PRIVATE ${LTDL_INCLUDE_DIRS}) + if(NOT WIN32 OR MINGW) + target_link_libraries(gvc PUBLIC ${LTDL_LIBRARIES}) + endif() endif() if(ZLIB_FOUND) - target_link_libraries(gvc PUBLIC ${ZLIB_LIBRARIES}) + target_link_libraries(gvc PUBLIC ${ZLIB_LIBRARIES}) endif() if(${with_ortho}) - target_link_libraries(gvc PRIVATE - $ - ) - target_link_libraries(gvc PRIVATE ortho) + target_link_libraries(gvc PRIVATE + $ + ) + target_link_libraries(gvc PRIVATE ortho) endif() # Installation location of library files install( - TARGETS gvc - RUNTIME DESTINATION ${BINARY_INSTALL_DIR} - LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} - ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} + TARGETS gvc + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} ) # Specify headers to be installed install( - FILES - gvc.h - gvcext.h - gvcjob.h - gvconfig.h - gvcommon.h - gvplugin.h - gvplugin_device.h - gvplugin_layout.h - gvplugin_loadimage.h - gvplugin_render.h - gvplugin_textlayout.h - DESTINATION ${HEADER_INSTALL_DIR} + FILES + gvc.h + gvcext.h + gvcjob.h + gvconfig.h + gvcommon.h + gvplugin.h + gvplugin_device.h + gvplugin_layout.h + gvplugin_loadimage.h + gvplugin_render.h + gvplugin_textlayout.h + DESTINATION ${HEADER_INSTALL_DIR} ) # Specify man pages to be installed @@ -126,15 +126,15 @@ endif() # Specify library version and soversion set_target_properties(gvc PROPERTIES - VERSION 6.0.0 - SOVERSION 6 + VERSION 6.0.0 + SOVERSION 6 ) # Include DLLs with this library on Windows if(WIN32 AND EXPAT_FOUND AND install_win_dependency_dlls) - install( - FILES - ${EXPAT_RUNTIME_LIBRARIES} - DESTINATION ${BINARY_INSTALL_DIR} - ) + install( + FILES + ${EXPAT_RUNTIME_LIBRARIES} + DESTINATION ${BINARY_INSTALL_DIR} + ) endif() diff --git a/lib/gvpr/CMakeLists.txt b/lib/gvpr/CMakeLists.txt index 5fe0c835e..c474ad977 100644 --- a/lib/gvpr/CMakeLists.txt +++ b/lib/gvpr/CMakeLists.txt @@ -1,49 +1,49 @@ add_definitions(-DEXPORT_GVPR) add_library(gvpr STATIC - # Header files - actions.h - compile.h - gdefs.h - gprdata.inc - gprstate.h - gvpr.h - parse.h - queue.h - trieFA.h + # Header files + actions.h + compile.h + gdefs.h + gprdata.inc + gprstate.h + gvpr.h + parse.h + queue.h + trieFA.h - # Source files - actions.c - compile.c - gvpr.c - gprstate.c - parse.c - queue.c + # Source files + actions.c + compile.c + gvpr.c + gprstate.c + parse.c + queue.c ) target_include_directories(gvpr PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/.. # needed to find generated expr/exparse.h - ${CMAKE_CURRENT_BINARY_DIR}/../common # needed to find generated common/colortbl.h - ${GRAPHVIZ_LIB_DIR}/ast - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/expr - ${GETOPT_INCLUDE_DIRS} + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/.. # needed to find generated expr/exparse.h + ${CMAKE_CURRENT_BINARY_DIR}/../common # needed to find generated common/colortbl.h + ${GRAPHVIZ_LIB_DIR}/ast + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/expr + ${GETOPT_INCLUDE_DIRS} ) target_link_libraries(gvpr - ast - cgraph - ingraphs - gvc - expr - sfio - vmalloc + ast + cgraph + ingraphs + gvc + expr + sfio + vmalloc ) if(NOT HAVE_GETOPT_H) - target_link_libraries(gvpr ${GETOPT_LINK_LIBRARIES}) + target_link_libraries(gvpr ${GETOPT_LINK_LIBRARIES}) endif() diff --git a/lib/ingraphs/CMakeLists.txt b/lib/ingraphs/CMakeLists.txt index 527f94665..091fc7840 100644 --- a/lib/ingraphs/CMakeLists.txt +++ b/lib/ingraphs/CMakeLists.txt @@ -1,17 +1,17 @@ add_library(ingraphs STATIC - # Header files - ingraphs.h + # Header files + ingraphs.h - # Source files - ingraphs.c + # Source files + ingraphs.c ) target_include_directories(ingraphs PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph ) target_link_libraries(ingraphs PRIVATE - cgraph + cgraph ) diff --git a/lib/label/CMakeLists.txt b/lib/label/CMakeLists.txt index 5cf937bf8..7e421d573 100644 --- a/lib/label/CMakeLists.txt +++ b/lib/label/CMakeLists.txt @@ -1,28 +1,28 @@ add_definitions(-DGVC_EXPORTS) add_library(label STATIC - # Header files - index.h - node.h - rectangle.h - split.q.h - xlabels.h + # Header files + index.h + node.h + rectangle.h + split.q.h + xlabels.h - # Source files - index.c - node.c - rectangle.c - split.q.c - xlabels.c + # Source files + index.c + node.c + rectangle.c + split.q.c + xlabels.c ) target_include_directories(label PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common ) target_link_libraries(label PRIVATE - cdt + cdt ) diff --git a/lib/mingle/CMakeLists.txt b/lib/mingle/CMakeLists.txt index e5eba2543..ce3e7b2b9 100644 --- a/lib/mingle/CMakeLists.txt +++ b/lib/mingle/CMakeLists.txt @@ -1,29 +1,29 @@ if(ANN_FOUND) add_library(libmingle STATIC - # Header files - agglomerative_bundling.h - edge_bundling.h - ink.h - nearest_neighbor_graph.h - nearest_neighbor_graph_ann.h + # Header files + agglomerative_bundling.h + edge_bundling.h + ink.h + nearest_neighbor_graph.h + nearest_neighbor_graph_ann.h - # Source files - agglomerative_bundling.cpp - edge_bundling.cpp - ink.cpp - nearest_neighbor_graph.cpp - nearest_neighbor_graph_ann.cpp + # Source files + agglomerative_bundling.cpp + edge_bundling.cpp + ink.cpp + nearest_neighbor_graph.cpp + nearest_neighbor_graph_ann.cpp ) target_include_directories(libmingle PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pathplan - ${ANN_INCLUDE_DIR} + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pathplan + ${ANN_INCLUDE_DIR} ) endif() diff --git a/lib/neatogen/CMakeLists.txt b/lib/neatogen/CMakeLists.txt index 305db564c..320245b5e 100644 --- a/lib/neatogen/CMakeLists.txt +++ b/lib/neatogen/CMakeLists.txt @@ -1,111 +1,111 @@ add_definitions(-DNEATOGEN_EXPORTS) set(sources - # Header files - adjust.h - bfs.h - call_tri.h - closest.h - conjgrad.h - defs.h - delaunay.h - digcola.h - dijkstra.h - edges.h - embed_graph.h - fPQ.h - geometry.h - heap.h - hedges.h - info.h - kkutils.h - matrix_ops.h - mem.h - multispline.h - neato.h - neatoprocs.h - overlap.h - pca.h - poly.h - quad_prog_solver.h - quad_prog_vpsc.h - site.h - sparsegraph.h - stress.h - voronoi.h - sgd.h - randomkit.h + # Header files + adjust.h + bfs.h + call_tri.h + closest.h + conjgrad.h + defs.h + delaunay.h + digcola.h + dijkstra.h + edges.h + embed_graph.h + fPQ.h + geometry.h + heap.h + hedges.h + info.h + kkutils.h + matrix_ops.h + mem.h + multispline.h + neato.h + neatoprocs.h + overlap.h + pca.h + poly.h + quad_prog_solver.h + quad_prog_vpsc.h + site.h + sparsegraph.h + stress.h + voronoi.h + sgd.h + randomkit.h - # Source files - adjust.c - bfs.c - call_tri.c - circuit.c - closest.c - compute_hierarchy.c - conjgrad.c - constrained_majorization.c - constraint.c - delaunay.c - dijkstra.c - edges.c - embed_graph.c - geometry.c - heap.c - hedges.c - info.c - kkutils.c - legal.c - lu.c - matinv.c - matrix_ops.c - memory.c - multispline.c - neatoinit.c - neatosplines.c - opt_arrangement.c - overlap.c - pca.c - poly.c - printvis.c - quad_prog_solve.c - site.c - smart_ini_x.c - solve.c - stuff.c - stress.c - voronoi.c - sgd.c - randomkit.c + # Source files + adjust.c + bfs.c + call_tri.c + circuit.c + closest.c + compute_hierarchy.c + conjgrad.c + constrained_majorization.c + constraint.c + delaunay.c + dijkstra.c + edges.c + embed_graph.c + geometry.c + heap.c + hedges.c + info.c + kkutils.c + legal.c + lu.c + matinv.c + matrix_ops.c + memory.c + multispline.c + neatoinit.c + neatosplines.c + opt_arrangement.c + overlap.c + pca.c + poly.c + printvis.c + quad_prog_solve.c + site.c + smart_ini_x.c + solve.c + stuff.c + stress.c + voronoi.c + sgd.c + randomkit.c ) if(with_ipsepcola) - list(APPEND ${sources} - constrained_majorization_ipsep.c - mosek_quad_solve.c - mosek_quad_solve.h - quad_prog_vpsc.c - ) + list(APPEND ${sources} + constrained_majorization_ipsep.c + mosek_quad_solve.c + mosek_quad_solve.h + quad_prog_vpsc.c + ) endif() add_library(neatogen STATIC - ${sources} + ${sources} ) target_include_directories(neatogen PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan ) target_link_libraries(neatogen PRIVATE - cgraph - gvc - pathplan - sparse + cgraph + gvc + pathplan + sparse ) diff --git a/lib/ortho/CMakeLists.txt b/lib/ortho/CMakeLists.txt index 22c02ef90..336a27e75 100644 --- a/lib/ortho/CMakeLists.txt +++ b/lib/ortho/CMakeLists.txt @@ -3,38 +3,38 @@ if(with_ortho) add_definitions(-DGVC_EXPORTS) add_library(ortho_obj OBJECT - # Header files - fPQ.h - maze.h - ortho.h - partition.h - rawgraph.h - sgraph.h - structures.h - trap.h + # Header files + fPQ.h + maze.h + ortho.h + partition.h + rawgraph.h + sgraph.h + structures.h + trap.h - # Source files - fPQ.c - maze.c - ortho.c - partition.c - rawgraph.c - sgraph.c - trapezoid.c + # Source files + fPQ.c + maze.c + ortho.c + partition.c + rawgraph.c + sgraph.c + trapezoid.c ) target_include_directories(ortho_obj PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan ) add_library(ortho STATIC - $ + $ ) endif() diff --git a/lib/osage/CMakeLists.txt b/lib/osage/CMakeLists.txt index 4a1224c4f..6b48b989c 100644 --- a/lib/osage/CMakeLists.txt +++ b/lib/osage/CMakeLists.txt @@ -1,23 +1,23 @@ add_definitions(-DNEATOGEN_EXPORTS) add_library(osage STATIC - # Header files - osage.h + # Header files + osage.h - # Source files - osageinit.c + # Source files + osageinit.c ) target_include_directories(osage PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan ) target_link_libraries(osage PRIVATE - cgraph + cgraph ) diff --git a/lib/pack/CMakeLists.txt b/lib/pack/CMakeLists.txt index 384d231d7..28fb47866 100644 --- a/lib/pack/CMakeLists.txt +++ b/lib/pack/CMakeLists.txt @@ -1,32 +1,32 @@ add_definitions(-DGVC_EXPORTS) add_library(pack_obj OBJECT - # Header files - pack.h + # Header files + pack.h - # Source files - ccomps.c - pack.c + # Source files + ccomps.c + pack.c ) target_include_directories(pack_obj PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pathplan ) add_library(pack STATIC - $ + $ ) # Specify headers to be installed install( - FILES pack.h - DESTINATION ${HEADER_INSTALL_DIR} + FILES pack.h + DESTINATION ${HEADER_INSTALL_DIR} ) # Specify man pages to be installed diff --git a/lib/patchwork/CMakeLists.txt b/lib/patchwork/CMakeLists.txt index 0ee7d954e..1d43c5975 100644 --- a/lib/patchwork/CMakeLists.txt +++ b/lib/patchwork/CMakeLists.txt @@ -1,24 +1,24 @@ add_library(patchwork STATIC - # Header files - patchwork.h - tree_map.h + # Header files + patchwork.h + tree_map.h - # Source files - patchwork.c - patchworkinit.c - tree_map.c + # Source files + patchwork.c + patchworkinit.c + tree_map.c ) target_include_directories(patchwork PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan ) target_link_libraries(patchwork PRIVATE - cgraph + cgraph ) diff --git a/lib/pathplan/CMakeLists.txt b/lib/pathplan/CMakeLists.txt index 955bbf714..b26f9533a 100644 --- a/lib/pathplan/CMakeLists.txt +++ b/lib/pathplan/CMakeLists.txt @@ -1,44 +1,44 @@ add_definitions(-DPATHPLAN_EXPORTS) add_library(pathplan SHARED - # Header files - pathgeom.h - pathplan.h - pathutil.h - solvers.h - tri.h - vis.h - vispath.h + # Header files + pathgeom.h + pathplan.h + pathutil.h + solvers.h + tri.h + vis.h + vispath.h - # Source files - cvt.c - inpoly.c - route.c - shortest.c - shortestpth.c - solvers.c - triang.c - util.c - visibility.c + # Source files + cvt.c + inpoly.c + route.c + shortest.c + shortestpth.c + solvers.c + triang.c + util.c + visibility.c ) target_include_directories(pathplan PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} ) # Installation location of library files install( - TARGETS pathplan - RUNTIME DESTINATION ${BINARY_INSTALL_DIR} - LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} - ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} + TARGETS pathplan + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} ) # Specify headers to be installed install( - FILES pathgeom.h pathplan.h - DESTINATION ${HEADER_INSTALL_DIR} + FILES pathgeom.h pathplan.h + DESTINATION ${HEADER_INSTALL_DIR} ) # Specify man pages to be installed @@ -62,10 +62,10 @@ endif() # Specify library version and soversion set_target_properties(pathplan PROPERTIES - VERSION 4.0.0 - SOVERSION 4 + VERSION 4.0.0 + SOVERSION 4 ) target_link_libraries( - pathplan - ${MATH_LIB} + pathplan + ${MATH_LIB} ) diff --git a/lib/rbtree/CMakeLists.txt b/lib/rbtree/CMakeLists.txt index 44d20883f..84511e252 100644 --- a/lib/rbtree/CMakeLists.txt +++ b/lib/rbtree/CMakeLists.txt @@ -1,14 +1,14 @@ add_library(rbtree STATIC - # Header files - red_black_tree.h - stack.h + # Header files + red_black_tree.h + stack.h - # Source files - misc.c - red_black_tree.c - stack.c + # Source files + misc.c + red_black_tree.c + stack.c ) include_directories(rbtree PRIVATE - ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR} ) diff --git a/lib/sfdpgen/CMakeLists.txt b/lib/sfdpgen/CMakeLists.txt index d58536d43..b87e9cd7c 100644 --- a/lib/sfdpgen/CMakeLists.txt +++ b/lib/sfdpgen/CMakeLists.txt @@ -3,42 +3,42 @@ if(with_sfdp) add_definitions(-DNEATOGEN_EXPORTS) add_library(sfdpgen STATIC - # Header files - Multilevel.h - post_process.h - PriorityQueue.h - sfdp.h - sfdpinternal.h - sparse_solve.h - spring_electrical.h - stress_model.h - uniform_stress.h + # Header files + Multilevel.h + post_process.h + PriorityQueue.h + sfdp.h + sfdpinternal.h + sparse_solve.h + spring_electrical.h + stress_model.h + uniform_stress.h - # Source files - Multilevel.c - post_process.c - PriorityQueue.c - sfdpinit.c - sparse_solve.c - spring_electrical.c - stress_model.c - uniform_stress.c + # Source files + Multilevel.c + post_process.c + PriorityQueue.c + sfdpinit.c + sparse_solve.c + spring_electrical.c + stress_model.c + uniform_stress.c ) target_include_directories(sfdpgen PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan ) target_link_libraries(sfdpgen PRIVATE - gvc - neatogen - sparse + gvc + neatogen + sparse ) endif() diff --git a/lib/sfio/CMakeLists.txt b/lib/sfio/CMakeLists.txt index b91647f7f..2a770bfcb 100644 --- a/lib/sfio/CMakeLists.txt +++ b/lib/sfio/CMakeLists.txt @@ -1,46 +1,46 @@ add_library(sfio STATIC - # Header files - sfhdr.h - sfio.h - sfio_t.h + # Header files + sfhdr.h + sfio.h + sfio_t.h - # Source files - sfclose.c - sfcvt.c - sfdisc.c - sfexcept.c - sfextern.c - sffilbuf.c - sfflsbuf.c - sfmode.c - sfnew.c - sfnputc.c - sfopen.c - sfpkrd.c - sfprintf.c - sfputr.c - sfraise.c - sfrd.c - sfread.c - sfresize.c - sfscanf.c - sfseek.c - sfsetbuf.c - sfsetfd.c - sfsk.c - sfstack.c - sfswap.c - sfsync.c - sftable.c - sftmp.c - sfungetc.c - sfvprintf.c - sfvscanf.c - sfwr.c - sfwrite.c + # Source files + sfclose.c + sfcvt.c + sfdisc.c + sfexcept.c + sfextern.c + sffilbuf.c + sfflsbuf.c + sfmode.c + sfnew.c + sfnputc.c + sfopen.c + sfpkrd.c + sfprintf.c + sfputr.c + sfraise.c + sfrd.c + sfread.c + sfresize.c + sfscanf.c + sfseek.c + sfsetbuf.c + sfsetfd.c + sfsk.c + sfstack.c + sfswap.c + sfsync.c + sftable.c + sftmp.c + sfungetc.c + sfvprintf.c + sfvscanf.c + sfwr.c + sfwrite.c ) target_include_directories(sfio PRIVATE - ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR} ) diff --git a/lib/sparse/CMakeLists.txt b/lib/sparse/CMakeLists.txt index 40e116b3d..7cd11c142 100644 --- a/lib/sparse/CMakeLists.txt +++ b/lib/sparse/CMakeLists.txt @@ -1,38 +1,38 @@ add_library(sparse STATIC - # Header files - BinaryHeap.h - clustering.h - color_palette.h - colorutil.h - DotIO.h - general.h - IntStack.h - LinkedList.h - mq.h - QuadTree.h - SparseMatrix.h + # Header files + BinaryHeap.h + clustering.h + color_palette.h + colorutil.h + DotIO.h + general.h + IntStack.h + LinkedList.h + mq.h + QuadTree.h + SparseMatrix.h - # Source files - BinaryHeap.c - clustering.c - color_palette.c - colorutil.c - DotIO.c - general.c - IntStack.c - LinkedList.c - mq.c - QuadTree.c - SparseMatrix.c + # Source files + BinaryHeap.c + clustering.c + color_palette.c + colorutil.c + DotIO.c + general.c + IntStack.c + LinkedList.c + mq.c + QuadTree.c + SparseMatrix.c ) target_include_directories(sparse PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common ) target_link_libraries(sparse - ${MATH_LIB} + ${MATH_LIB} ) diff --git a/lib/topfish/CMakeLists.txt b/lib/topfish/CMakeLists.txt index dea9884ec..82cdcc613 100644 --- a/lib/topfish/CMakeLists.txt +++ b/lib/topfish/CMakeLists.txt @@ -1,17 +1,17 @@ if(with_smyrna) add_library(topfish STATIC - # Header files - hierarchy.h + # Header files + hierarchy.h - # Source files - hierarchy.c - rescale_layout.c + # Source files + hierarchy.c + rescale_layout.c ) target_include_directories(topfish PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/common ) endif() diff --git a/lib/twopigen/CMakeLists.txt b/lib/twopigen/CMakeLists.txt index e7400a22b..a9b135ca5 100644 --- a/lib/twopigen/CMakeLists.txt +++ b/lib/twopigen/CMakeLists.txt @@ -1,24 +1,24 @@ add_definitions(-DNEATOGEN_EXPORTS) add_library(twopigen STATIC - # Header files - circle.h + # Header files + circle.h - # Source files - circle.c - twopiinit.c + # Source files + circle.c + twopiinit.c ) target_include_directories(twopigen PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pack - ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan ) target_link_libraries(twopigen PRIVATE - cgraph + cgraph ) diff --git a/lib/vmalloc/CMakeLists.txt b/lib/vmalloc/CMakeLists.txt index 5032ff4fc..cd5a687c4 100644 --- a/lib/vmalloc/CMakeLists.txt +++ b/lib/vmalloc/CMakeLists.txt @@ -1,15 +1,15 @@ add_library(vmalloc STATIC - # Header files - vmalloc.h + # Header files + vmalloc.h - # Source files - vmalloc.c - vmclear.c - vmclose.c - vmopen.c - vmstrdup.c + # Source files + vmalloc.c + vmclear.c + vmclose.c + vmopen.c + vmstrdup.c ) target_include_directories(vmalloc PRIVATE - ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR} ) diff --git a/lib/vpsc/CMakeLists.txt b/lib/vpsc/CMakeLists.txt index 5ceb92f6a..077f1d976 100644 --- a/lib/vpsc/CMakeLists.txt +++ b/lib/vpsc/CMakeLists.txt @@ -1,30 +1,30 @@ if(with_ipsepcola) add_library(vpsc STATIC - # Header files - block.h - blocks.h - constraint.h - csolve_VPSC.h - generate-constraints.h - pairingheap/PairingHeap.h - pairingheap/dsexceptions.h - solve_VPSC.h - variable.h + # Header files + block.h + blocks.h + constraint.h + csolve_VPSC.h + generate-constraints.h + pairingheap/PairingHeap.h + pairingheap/dsexceptions.h + solve_VPSC.h + variable.h - # Source files - block.cpp - blocks.cpp - constraint.cpp - csolve_VPSC.cpp - generate-constraints.cpp - pairingheap/PairingHeap.cpp - solve_VPSC.cpp - variable.cpp + # Source files + block.cpp + blocks.cpp + constraint.cpp + csolve_VPSC.cpp + generate-constraints.cpp + pairingheap/PairingHeap.cpp + solve_VPSC.cpp + variable.cpp ) target_include_directories(vpsc PRIVATE - ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR} ) endif() diff --git a/lib/xdot/CMakeLists.txt b/lib/xdot/CMakeLists.txt index 9bb066102..37f8ce9c2 100644 --- a/lib/xdot/CMakeLists.txt +++ b/lib/xdot/CMakeLists.txt @@ -1,30 +1,30 @@ add_definitions(-DEXPORT_XDOT) add_library(xdot SHARED - # Header files - xdot.h + # Header files + xdot.h - # Source files - xdot.c + # Source files + xdot.c ) target_include_directories(xdot PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} ) # Installation location of library files install( - TARGETS xdot - RUNTIME DESTINATION ${BINARY_INSTALL_DIR} - LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} - ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} + TARGETS xdot + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} ) # Specify headers to be installed install( - FILES xdot.h - DESTINATION ${HEADER_INSTALL_DIR} + FILES xdot.h + DESTINATION ${HEADER_INSTALL_DIR} ) # Specify man pages to be installed @@ -48,6 +48,6 @@ endif() # Specify library version and soversion set_target_properties(xdot PROPERTIES - VERSION 4.0.0 - SOVERSION 4 + VERSION 4.0.0 + SOVERSION 4 ) diff --git a/plugin/core/CMakeLists.txt b/plugin/core/CMakeLists.txt index 6857cb025..01e84ac93 100644 --- a/plugin/core/CMakeLists.txt +++ b/plugin/core/CMakeLists.txt @@ -1,59 +1,59 @@ add_library(gvplugin_core SHARED - # Header files - ps.h + # Header files + ps.h - # Source files - gvloadimage_core.c - gvplugin_core.c - gvrender_core_dot.c - gvrender_core_json.c - gvrender_core_fig.c - gvrender_core_map.c - gvrender_core_mp.c - gvrender_core_pic.c - gvrender_core_pov.c - gvrender_core_ps.c - gvrender_core_svg.c - gvrender_core_tk.c - gvrender_core_vml.c + # Source files + gvloadimage_core.c + gvplugin_core.c + gvrender_core_dot.c + gvrender_core_json.c + gvrender_core_fig.c + gvrender_core_map.c + gvrender_core_mp.c + gvrender_core_pic.c + gvrender_core_pov.c + gvrender_core_ps.c + gvrender_core_svg.c + gvrender_core_tk.c + gvrender_core_vml.c ) target_include_directories(gvplugin_core PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/gvpr - ${GRAPHVIZ_LIB_DIR}/pathplan - ${GRAPHVIZ_LIB_DIR}/xdot + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/gvpr + ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR}/xdot ) target_link_libraries(gvplugin_core - cgraph - gvc - xdot + cgraph + gvc + xdot ) # Installation location of library files install( - TARGETS gvplugin_core - RUNTIME DESTINATION ${BINARY_INSTALL_DIR} - LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} - ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} + TARGETS gvplugin_core + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} + ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} ) # Specify library version and soversion set_target_properties(gvplugin_core PROPERTIES - VERSION ${GRAPHVIZ_PLUGIN_VERSION}.0.0 - SOVERSION ${GRAPHVIZ_PLUGIN_VERSION} + VERSION ${GRAPHVIZ_PLUGIN_VERSION}.0.0 + SOVERSION ${GRAPHVIZ_PLUGIN_VERSION} ) if(MINGW) - # work around https://gitlab.kitware.com/cmake/cmake/-/issues/21716 - set_target_properties(gvplugin_core PROPERTIES - RUNTIME_OUTPUT_NAME gvplugin_core-${GRAPHVIZ_PLUGIN_VERSION} - ) + # work around https://gitlab.kitware.com/cmake/cmake/-/issues/21716 + set_target_properties(gvplugin_core PROPERTIES + RUNTIME_OUTPUT_NAME gvplugin_core-${GRAPHVIZ_PLUGIN_VERSION} + ) endif() diff --git a/plugin/dot_layout/CMakeLists.txt b/plugin/dot_layout/CMakeLists.txt index 563fd93d1..399529413 100644 --- a/plugin/dot_layout/CMakeLists.txt +++ b/plugin/dot_layout/CMakeLists.txt @@ -1,41 +1,41 @@ add_library(gvplugin_dot_layout SHARED - # Source files - gvplugin_dot_layout.c - gvlayout_dot_layout.c + # Source files + gvplugin_dot_layout.c + gvlayout_dot_layout.c ) target_include_directories(gvplugin_dot_layout PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pathplan ) target_link_libraries(gvplugin_dot_layout - dotgen - gvc + dotgen + gvc ) # Installation location of library files install( - TARGETS gvplugin_dot_layout - RUNTIME DESTINATION ${BINARY_INSTALL_DIR} - LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} - ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} + TARGETS gvplugin_dot_layout + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} + ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} ) # Specify library version and soversion set_target_properties(gvplugin_dot_layout PROPERTIES - VERSION ${GRAPHVIZ_PLUGIN_VERSION}.0.0 - SOVERSION ${GRAPHVIZ_PLUGIN_VERSION} + VERSION ${GRAPHVIZ_PLUGIN_VERSION}.0.0 + SOVERSION ${GRAPHVIZ_PLUGIN_VERSION} ) if(MINGW) - # work around https://gitlab.kitware.com/cmake/cmake/-/issues/21716 - set_target_properties(gvplugin_dot_layout PROPERTIES - RUNTIME_OUTPUT_NAME gvplugin_dot_layout-${GRAPHVIZ_PLUGIN_VERSION} - ) + # work around https://gitlab.kitware.com/cmake/cmake/-/issues/21716 + set_target_properties(gvplugin_dot_layout PROPERTIES + RUNTIME_OUTPUT_NAME gvplugin_dot_layout-${GRAPHVIZ_PLUGIN_VERSION} + ) endif() diff --git a/plugin/gd/CMakeLists.txt b/plugin/gd/CMakeLists.txt index 161ba61f5..5d4f633a7 100644 --- a/plugin/gd/CMakeLists.txt +++ b/plugin/gd/CMakeLists.txt @@ -1,16 +1,16 @@ if(GD_FOUND) -add_library(gvplugin_gd SHARED + add_library(gvplugin_gd SHARED # Source files gvdevice_gd.c gvloadimage_gd.c gvplugin_gd.c - gvrender_gd.c - gvrender_gd_vrml.c - gvtextlayout_gd.c -) + gvrender_gd.c + gvrender_gd_vrml.c + gvtextlayout_gd.c + ) -target_include_directories(gvplugin_gd PRIVATE + target_include_directories(gvplugin_gd PRIVATE ${GRAPHVIZ_LIB_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${GRAPHVIZ_LIB_DIR}/cdt @@ -19,43 +19,43 @@ target_include_directories(gvplugin_gd PRIVATE ${GRAPHVIZ_LIB_DIR}/gvc ${GRAPHVIZ_LIB_DIR}/pathplan ${GD_INCLUDE_DIRS} -) + ) -target_link_libraries(gvplugin_gd + target_link_libraries(gvplugin_gd cgraph gvc ${GD_LIBRARIES} -) + ) -# Installation location of library files -install( + # Installation location of library files + install( TARGETS gvplugin_gd RUNTIME DESTINATION ${BINARY_INSTALL_DIR} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} -) + ) -# Include DLLs with this library on Windows -if(WIN32 AND install_win_dependency_dlls) + # Include DLLs with this library on Windows + if(WIN32 AND install_win_dependency_dlls) install( - FILES - ${GD_RUNTIME_LIBRARIES} - DESTINATION ${BINARY_INSTALL_DIR} + FILES + ${GD_RUNTIME_LIBRARIES} + DESTINATION ${BINARY_INSTALL_DIR} ) -endif() + endif() -# Specify library version and soversion -set_target_properties(gvplugin_gd PROPERTIES + # Specify library version and soversion + set_target_properties(gvplugin_gd PROPERTIES VERSION ${GRAPHVIZ_PLUGIN_VERSION}.0.0 SOVERSION ${GRAPHVIZ_PLUGIN_VERSION} -) + ) -if(MINGW) + if(MINGW) # work around https://gitlab.kitware.com/cmake/cmake/-/issues/21716 set_target_properties(gvplugin_gd PROPERTIES - RUNTIME_OUTPUT_NAME gvplugin_gd-${GRAPHVIZ_PLUGIN_VERSION} + RUNTIME_OUTPUT_NAME gvplugin_gd-${GRAPHVIZ_PLUGIN_VERSION} ) -endif() + endif() endif() diff --git a/plugin/gdiplus/CMakeLists.txt b/plugin/gdiplus/CMakeLists.txt index cae0ff643..a99dd7198 100644 --- a/plugin/gdiplus/CMakeLists.txt +++ b/plugin/gdiplus/CMakeLists.txt @@ -1,20 +1,20 @@ if(WIN32) -add_library(gvplugin_gdiplus SHARED + add_library(gvplugin_gdiplus SHARED # Header files FileStream.h gvplugin_gdiplus.h # Source files FileStream.cpp - gvdevice_gdiplus.cpp - gvloadimage_gdiplus.cpp - gvplugin_gdiplus.cpp - gvrender_gdiplus.cpp - gvtextlayout_gdiplus.cpp -) - -target_include_directories(gvplugin_gdiplus PRIVATE + gvdevice_gdiplus.cpp + gvloadimage_gdiplus.cpp + gvplugin_gdiplus.cpp + gvrender_gdiplus.cpp + gvtextlayout_gdiplus.cpp + ) + + target_include_directories(gvplugin_gdiplus PRIVATE ${GRAPHVIZ_LIB_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${GRAPHVIZ_LIB_DIR}/cdt @@ -22,32 +22,32 @@ target_include_directories(gvplugin_gdiplus PRIVATE ${GRAPHVIZ_LIB_DIR}/common ${GRAPHVIZ_LIB_DIR}/gvc ${GRAPHVIZ_LIB_DIR}/pathplan -) + ) -target_link_libraries(gvplugin_gdiplus + target_link_libraries(gvplugin_gdiplus gvc gdiplus -) + ) -# Installation location of library files -install( + # Installation location of library files + install( TARGETS gvplugin_gdiplus RUNTIME DESTINATION ${BINARY_INSTALL_DIR} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} -) + ) -# Specify library version and soversion -set_target_properties(gvplugin_gdiplus PROPERTIES + # Specify library version and soversion + set_target_properties(gvplugin_gdiplus PROPERTIES VERSION ${GRAPHVIZ_PLUGIN_VERSION}.0.0 SOVERSION ${GRAPHVIZ_PLUGIN_VERSION} -) + ) -if(MINGW) + if(MINGW) # work around https://gitlab.kitware.com/cmake/cmake/-/issues/21716 set_target_properties(gvplugin_gdiplus PROPERTIES RUNTIME_OUTPUT_NAME gvplugin_gdiplus-${GRAPHVIZ_PLUGIN_VERSION} ) -endif() + endif() endif() diff --git a/plugin/neato_layout/CMakeLists.txt b/plugin/neato_layout/CMakeLists.txt index 830cb2734..3d5642315 100644 --- a/plugin/neato_layout/CMakeLists.txt +++ b/plugin/neato_layout/CMakeLists.txt @@ -1,56 +1,56 @@ add_library(gvplugin_neato_layout SHARED - # Source files - gvplugin_neato_layout.c - gvlayout_neato_layout.c + # Source files + gvplugin_neato_layout.c + gvlayout_neato_layout.c ) target_include_directories(gvplugin_neato_layout PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pathplan ) target_link_libraries(gvplugin_neato_layout - circogen - fdpgen - gvc - neatogen - osage - patchwork - rbtree - sparse - twopigen + circogen + fdpgen + gvc + neatogen + osage + patchwork + rbtree + sparse + twopigen ) if(with_ipsepcola) - target_link_libraries(gvplugin_neato_layout vpsc) + target_link_libraries(gvplugin_neato_layout vpsc) endif() if(with_sfdp) - target_link_libraries(gvplugin_neato_layout sfdpgen) + target_link_libraries(gvplugin_neato_layout sfdpgen) endif() # Installation location of library files install( - TARGETS gvplugin_neato_layout - RUNTIME DESTINATION ${BINARY_INSTALL_DIR} - LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} - ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} + TARGETS gvplugin_neato_layout + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} + ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} ) # Specify library version and soversion set_target_properties(gvplugin_neato_layout PROPERTIES - VERSION ${GRAPHVIZ_PLUGIN_VERSION}.0.0 - SOVERSION ${GRAPHVIZ_PLUGIN_VERSION} + VERSION ${GRAPHVIZ_PLUGIN_VERSION}.0.0 + SOVERSION ${GRAPHVIZ_PLUGIN_VERSION} ) if(MINGW) - # work around https://gitlab.kitware.com/cmake/cmake/-/issues/21716 - set_target_properties(gvplugin_neato_layout PROPERTIES - RUNTIME_OUTPUT_NAME gvplugin_neato_layout-${GRAPHVIZ_PLUGIN_VERSION} - ) + # work around https://gitlab.kitware.com/cmake/cmake/-/issues/21716 + set_target_properties(gvplugin_neato_layout PROPERTIES + RUNTIME_OUTPUT_NAME gvplugin_neato_layout-${GRAPHVIZ_PLUGIN_VERSION} + ) endif() diff --git a/plugin/pango/CMakeLists.txt b/plugin/pango/CMakeLists.txt index 6ca95a710..5f47ace14 100644 --- a/plugin/pango/CMakeLists.txt +++ b/plugin/pango/CMakeLists.txt @@ -1,6 +1,6 @@ if(CAIRO_FOUND AND PANGOCAIRO_FOUND) -add_library(gvplugin_pango SHARED + add_library(gvplugin_pango SHARED # Header files gvgetfontlist.h gvplugin_pango.h @@ -9,11 +9,11 @@ add_library(gvplugin_pango SHARED gvgetfontlist_pango.c gvloadimage_pango.c gvplugin_pango.c - gvrender_pango.c - gvtextlayout_pango.c -) + gvrender_pango.c + gvtextlayout_pango.c + ) -target_include_directories(gvplugin_pango PRIVATE + target_include_directories(gvplugin_pango PRIVATE ${GRAPHVIZ_LIB_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${TOP_BINARY_DIR}/lib/common @@ -24,44 +24,44 @@ target_include_directories(gvplugin_pango PRIVATE ${GRAPHVIZ_LIB_DIR}/pathplan ${CAIRO_INCLUDE_DIRS}/cairo ${PANGOCAIRO_INCLUDE_DIRS} -) + ) -target_link_libraries(gvplugin_pango + target_link_libraries(gvplugin_pango cgraph gvc ${CAIRO_LINK_LIBRARIES} ${PANGOCAIRO_LINK_LIBRARIES} -) + ) -# Installation location of library files -install( + # Installation location of library files + install( TARGETS gvplugin_pango RUNTIME DESTINATION ${BINARY_INSTALL_DIR} LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} -) + ) -# Include DLLs with this library on Windows -if(WIN32 AND install_win_dependency_dlls) + # Include DLLs with this library on Windows + if(WIN32 AND install_win_dependency_dlls) install( - FILES - ${CAIRO_RUNTIME_LIBRARIES} - ${PANGOCAIRO_RUNTIME_LIBRARIES} - DESTINATION ${BINARY_INSTALL_DIR} + FILES + ${CAIRO_RUNTIME_LIBRARIES} + ${PANGOCAIRO_RUNTIME_LIBRARIES} + DESTINATION ${BINARY_INSTALL_DIR} ) -endif() + endif() -# Specify library version and soversion -set_target_properties(gvplugin_pango PROPERTIES + # Specify library version and soversion + set_target_properties(gvplugin_pango PROPERTIES VERSION ${GRAPHVIZ_PLUGIN_VERSION}.0.0 SOVERSION ${GRAPHVIZ_PLUGIN_VERSION} -) + ) -if(MINGW) + if(MINGW) # work around https://gitlab.kitware.com/cmake/cmake/-/issues/21716 set_target_properties(gvplugin_pango PROPERTIES - RUNTIME_OUTPUT_NAME gvplugin_pango-${GRAPHVIZ_PLUGIN_VERSION} + RUNTIME_OUTPUT_NAME gvplugin_pango-${GRAPHVIZ_PLUGIN_VERSION} ) -endif() + endif() endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cf4113954..5ee6c676e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -19,43 +19,43 @@ add_library(test_common STATIC svg_analyzer.h svg_analyzer_interface.h ../cmd/dot/dot_builtins.c - ) +) set_target_properties(test_common PROPERTIES CXX_STANDARD 20) set_target_properties(test_common PROPERTIES CXX_STANDARD_REQUIRED ON) target_include_directories(test_common PRIVATE - ${Boost_INCLUDE_DIRS} - ${GRAPHVIZ_LIB_DIR} - ${RAPIDXML_INCLUDE_DIRS} - ${SVGPP_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} + ${GRAPHVIZ_LIB_DIR} + ${RAPIDXML_INCLUDE_DIRS} + ${SVGPP_INCLUDE_DIRS} ) target_link_libraries(test_common PUBLIC Catch2::Catch2) target_link_libraries(test_common PUBLIC - gvplugin_core - gvplugin_dot_layout - gvplugin_gd - gvplugin_neato_layout - cgraph - cgraph++ - gvc - gvc++ + gvplugin_core + gvplugin_dot_layout + gvplugin_gd + gvplugin_neato_layout + cgraph + cgraph++ + gvc + gvc++ ) macro(create_test testname) - add_executable(test_${testname} test_${testname}.cpp) - set_target_properties(test_${testname} PROPERTIES CXX_STANDARD 20) - set_target_properties(test_${testname} PROPERTIES CXX_STANDARD_REQUIRED ON) - add_test(NAME test_${testname} COMMAND test_${testname} --reporter junit --out test_${testname}.xml) - target_include_directories(test_${testname} PRIVATE - ${GRAPHVIZ_LIB_DIR} - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/gvc - ${GRAPHVIZ_LIB_DIR}/pathplan - ) - target_link_libraries(test_${testname} PRIVATE - test_common - ) + add_executable(test_${testname} test_${testname}.cpp) + set_target_properties(test_${testname} PROPERTIES CXX_STANDARD 20) + set_target_properties(test_${testname} PROPERTIES CXX_STANDARD_REQUIRED ON) + add_test(NAME test_${testname} COMMAND test_${testname} --reporter junit --out test_${testname}.xml) + target_include_directories(test_${testname} PRIVATE + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/pathplan + ) + target_link_libraries(test_${testname} PRIVATE + test_common + ) endmacro() create_test(simple) -- 2.40.0