From 45cee099e0d2cd45843ba2d31b6ab9bf08916fcc Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Tue, 23 Nov 2021 19:35:27 -0800 Subject: [PATCH] CMake: [nfc] standardize 'if' style The if-style used in CMake files had no consistency. Meanwhile, the expression in a CMake `endif` is ignored. We learned in the process of constructing the prior commit that this is supported right back to CMake 3.1. So this commit standardizes on no-space, no-expression if-style. --- CMakeLists.txt | 58 +++++++++++++++--------------- cmake/FindANN.cmake | 2 +- cmake/FindCairo.cmake | 4 +-- cmake/FindGD.cmake | 2 +- cmake/FindGetopt.cmake | 2 +- cmake/FindLTDL.cmake | 4 +-- cmake/FindPangoCairo.cmake | 4 +-- cmake/config_checks.cmake | 10 +++--- cmake/configure_plugins.cmake | 4 +-- cmake/package_info.cmake | 8 ++--- cmd/tools/CMakeLists.txt | 16 ++++----- lib/CMakeLists.txt | 2 +- lib/common/CMakeLists.txt | 6 ++-- lib/gvc/CMakeLists.txt | 10 +++--- lib/gvpr/CMakeLists.txt | 2 +- lib/mingle/CMakeLists.txt | 4 +-- lib/neatogen/CMakeLists.txt | 4 +-- lib/ortho/CMakeLists.txt | 4 +-- lib/sfdpgen/CMakeLists.txt | 4 +-- lib/topfish/CMakeLists.txt | 4 +-- lib/vpsc/CMakeLists.txt | 4 +-- plugin/gd/CMakeLists.txt | 6 ++-- plugin/gdiplus/CMakeLists.txt | 4 +-- plugin/neato_layout/CMakeLists.txt | 8 ++--- plugin/pango/CMakeLists.txt | 2 +- 25 files changed, 89 insertions(+), 89 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8090ff420..bc599bc46 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ option(with_cxx_api "enables building the C++ API" OFF) 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) +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 @@ -28,26 +28,26 @@ if (WIN32) option(install_win_dependency_dlls "Install 3rd party dependencies" ON) endif() -if (with_digcola) +if(with_digcola) add_definitions(-DDIGCOLA) -endif (with_digcola) +endif() -if (with_ipsepcola) +if(with_ipsepcola) add_definitions(-DIPSEPCOLA) -endif (with_ipsepcola) +endif() -if (with_ortho) +if(with_ortho) add_definitions(-DORTHO) -endif (with_ortho) +endif() -if (with_sfdp) +if(with_sfdp) add_definitions(-DSFDP) -endif (with_sfdp) +endif() -if (with_smyrna) +if(with_smyrna) # TODO include dependency checks add_definitions(-DSMYRNA) -endif (with_smyrna) +endif() # ===================== Append local CMake module directory ==================== list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") @@ -59,7 +59,7 @@ find_package(FLEX REQUIRED) find_program(GIT git) if(NOT GIT) message(FATAL_ERROR "git not found") -endif(NOT GIT) +endif() find_program(GZIP gzip) # ================== Convenient values for CMake configuration ================= @@ -76,7 +76,7 @@ set(TOP_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}") 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) +if(CMAKE_CL_64) set(WINDOWS_DEPENDENCY_DIR "${WINDOWS_DEPENDENCY_DIR}/x64") set(WINDOWS_DEPENDENCY_VCPKG_DIR "${WINDOWS_DEPENDENCY_VCPKG_DIR}/x64-windows") else() @@ -89,8 +89,8 @@ set(GRAPHVIZ_PLUGIN_VERSION 6) set(GVPLUGIN_CONFIG_FILE config${GRAPHVIZ_PLUGIN_VERSION}) # ============================ Library dependencies ============================ -if (WIN32) - if (use_win_pre_inst_libs) +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() @@ -112,7 +112,7 @@ if(enable_ltdl) if(LTDL_FOUND) add_definitions(-DENABLE_LTDL) endif() -endif () +endif() find_package(PangoCairo) @@ -120,16 +120,16 @@ if(with_zlib) find_package(ZLIB) endif() -if (UNIX) +if(UNIX) find_library(MATH_LIB m) -endif () +endif() -if (WIN32) +if(WIN32) # 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) + if(CMAKE_CL_64) find_program(MSYS_RUNTIME_LIBRARIES NAMES msys-2.0.dll) endif() endif() @@ -142,7 +142,7 @@ else() find_package(Python3 COMPONENTS Interpreter) endif() -if (DEFINED VERSION) +if(DEFINED VERSION) set(GRAPHVIZ_VERSION_STRING "${VERSION}") else() if(NOT Python3_EXECUTABLE) @@ -157,7 +157,7 @@ else() OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE ) - if (NOT gen_version_result EQUAL 0) + if(NOT gen_version_result EQUAL 0) message(FATAL_ERROR "Failed to set version: ${gen_version_error}") endif() endif() @@ -175,7 +175,7 @@ execute_process( OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE ) -if (NOT gen_date_result EQUAL 0) +if(NOT gen_date_result EQUAL 0) message(FATAL_ERROR "Failed to set date: ${gen_date_error}") endif() @@ -198,7 +198,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphviz_version.h DESTINATION ${HEADE message(STATUS "Graphviz version: ${GRAPHVIZ_VERSION_FULL}") include(config_checks) -if (NOT HAVE_GETOPT_H) +if(NOT HAVE_GETOPT_H) find_package(Getopt REQUIRED) endif() include_directories(${CMAKE_CURRENT_BINARY_DIR}) @@ -235,10 +235,10 @@ else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") endif() -if (use_sanitizers) +if(use_sanitizers) add_compile_options("-fsanitize=address,undefined") add_compile_options("-g") - if (${CMAKE_VERSION} VERSION_LESS "3.13.0") + if(${CMAKE_VERSION} VERSION_LESS "3.13.0") link_libraries("-fsanitize=address,undefined") link_libraries("-g") else() @@ -247,9 +247,9 @@ if (use_sanitizers) endif() endif() -if (use_coverage) +if(use_coverage) add_compile_options("-coverage") - if (${CMAKE_VERSION} VERSION_LESS "3.16.0") + if(${CMAKE_VERSION} VERSION_LESS "3.16.0") link_libraries("-coverage") else() add_link_options("-coverage") @@ -268,7 +268,7 @@ Include(CTest) add_subdirectory(lib) add_subdirectory(plugin) add_subdirectory(cmd) -if (with_cxx_tests) +if(with_cxx_tests) add_subdirectory(tests) endif() diff --git a/cmake/FindANN.cmake b/cmake/FindANN.cmake index 9c20ef97a..51dce6c14 100644 --- a/cmake/FindANN.cmake +++ b/cmake/FindANN.cmake @@ -3,7 +3,7 @@ find_library(ANN_LIBRARY NAMES ANN ann libann) find_program(ANN_RUNTIME_LIBRARY ANN.dll) include(FindPackageHandleStandardArgs) -if (WIN32) +if(WIN32) find_package_handle_standard_args(ANN DEFAULT_MSG ANN_LIBRARY ANN_INCLUDE_DIR ANN_RUNTIME_LIBRARY) else() diff --git a/cmake/FindCairo.cmake b/cmake/FindCairo.cmake index dce05ea96..a44f8682f 100644 --- a/cmake/FindCairo.cmake +++ b/cmake/FindCairo.cmake @@ -1,6 +1,6 @@ include(FindPackageHandleStandardArgs) -if (WIN32) +if(WIN32) find_path(Cairo_INCLUDE_DIR cairo/cairo.h) find_library(Cairo_LIBRARY NAMES cairo) @@ -39,7 +39,7 @@ else() # prior to CMake 3.12, PkgConfig does not set *_LINK_LIBRARIES, so do it # manually - if (${CMAKE_VERSION} VERSION_LESS 3.12) + if(${CMAKE_VERSION} VERSION_LESS 3.12) find_library(Cairo_LINK_LIBRARIES cairo PATHS ENV LIBRARY_PATH) endif() diff --git a/cmake/FindGD.cmake b/cmake/FindGD.cmake index 67325ce2f..464f46f83 100644 --- a/cmake/FindGD.cmake +++ b/cmake/FindGD.cmake @@ -3,7 +3,7 @@ find_library(GD_LIBRARY NAMES gd libgd) find_program(GD_RUNTIME_LIBRARY libgd.dll) include(FindPackageHandleStandardArgs) -if (WIN32) +if(WIN32) find_package_handle_standard_args(GD DEFAULT_MSG GD_LIBRARY GD_INCLUDE_DIR GD_RUNTIME_LIBRARY) else() diff --git a/cmake/FindGetopt.cmake b/cmake/FindGetopt.cmake index 17428912d..6e5b80dd6 100644 --- a/cmake/FindGetopt.cmake +++ b/cmake/FindGetopt.cmake @@ -4,7 +4,7 @@ find_path(Getopt_INCLUDE_DIR getopt.h) find_library(Getopt_LIBRARY NAMES getopt) find_program(Getopt_RUNTIME_LIBRARY NAMES getopt.dll) -if (WIN32) +if(WIN32) find_package_handle_standard_args(Getopt DEFAULT_MSG Getopt_INCLUDE_DIR Getopt_LIBRARY diff --git a/cmake/FindLTDL.cmake b/cmake/FindLTDL.cmake index 0623f89ab..37848a26f 100644 --- a/cmake/FindLTDL.cmake +++ b/cmake/FindLTDL.cmake @@ -1,10 +1,10 @@ find_path(LTDL_INCLUDE_DIR ltdl.h) -if (NOT WIN32 OR MINGW) +if(NOT WIN32 OR MINGW) find_library(LTDL_LIBRARY NAMES ltdl) endif() include(FindPackageHandleStandardArgs) -if (NOT WIN32 OR MINGW) +if(NOT WIN32 OR MINGW) find_package_handle_standard_args(LTDL DEFAULT_MSG LTDL_LIBRARY LTDL_INCLUDE_DIR) else() diff --git a/cmake/FindPangoCairo.cmake b/cmake/FindPangoCairo.cmake index 0937e41ef..96e692c8b 100644 --- a/cmake/FindPangoCairo.cmake +++ b/cmake/FindPangoCairo.cmake @@ -1,6 +1,6 @@ include(FindPackageHandleStandardArgs) -if (WIN32) +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) @@ -72,7 +72,7 @@ else() # prior to CMake 3.12, PkgConfig does not set *_LINK_LIBRARIES, so do it # manually - if (${CMAKE_VERSION} VERSION_LESS 3.12) + if(${CMAKE_VERSION} VERSION_LESS 3.12) find_library(PangoCairo_LINK_LIBRARIES pangocairo-1.0 PATHS ENV LIBRARY_PATH) endif() diff --git a/cmake/config_checks.cmake b/cmake/config_checks.cmake index 4c5fe07b7..c53963a13 100644 --- a/cmake/config_checks.cmake +++ b/cmake/config_checks.cmake @@ -45,18 +45,18 @@ set( HAVE_EXPAT ${EXPAT_FOUND} ) set( HAVE_LIBGD ${GD_FOUND} ) set( HAVE_ZLIB ${ZLIB_FOUND} ) -if (LTDL_FOUND) +if(LTDL_FOUND) set(ENABLE_LTDL 1) set(LTDL_H 1) endif() # Values -if (WIN32) +if(WIN32) set( BROWSER start ) set( DEFAULT_FONTPATH "C:/Windows/Fonts" ) -elseif (APPLE) +elseif(APPLE) set( BROWSER open ) set( DEFAULT_FONTPATH "~/Library/Fonts:/Library/Fonts:" @@ -65,7 +65,7 @@ elseif (APPLE) set( DARWIN 1 ) set( DARWIN_DYLIB 1 ) -else () +else() set( BROWSER xdg-open ) set( DEFAULT_FONTPATH "/usr/share/fonts/sun/TrueType:" @@ -83,7 +83,7 @@ else () "/usr/X11R6/lib/X11/fonts/Type1:" "/usr/common/share/fonts/ttf" ) -endif () +endif() set(DEFAULT_DPI 96) diff --git a/cmake/configure_plugins.cmake b/cmake/configure_plugins.cmake index 0aea1581b..4427665cf 100644 --- a/cmake/configure_plugins.cmake +++ b/cmake/configure_plugins.cmake @@ -27,9 +27,9 @@ set(ROOT $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}) -if (APPLE) +if(APPLE) set(ENV{DYLD_LIBRARY_PATH} "${ROOT}/lib") -elseif (UNIX) +elseif(UNIX) set(ENV{LD_LIBRARY_PATH} "${ROOT}/lib") endif() diff --git a/cmake/package_info.cmake b/cmake/package_info.cmake index 974d91cc0..d6e39806d 100644 --- a/cmake/package_info.cmake +++ b/cmake/package_info.cmake @@ -14,11 +14,11 @@ set(CPACK_GENERATOR ZIP) if(CYGWIN) LIST(APPEND CPACK_GENERATOR CygwinBinary) SET(CPACK_CYGWIN_PATCH_NUMBER 1) -elseif (UNIX) - if (NOT APPLE) - if (EXISTS "/etc/os-release") +elseif(UNIX) + if(NOT APPLE) + if(EXISTS "/etc/os-release") file(READ "/etc/os-release" OS_RELEASE) - if ("${OS_RELEASE}" MATCHES "ID_LIKE=debian") + if("${OS_RELEASE}" MATCHES "ID_LIKE=debian") LIST(APPEND CPACK_GENERATOR DEB) else() LIST(APPEND CPACK_GENERATOR RPM) diff --git a/cmd/tools/CMakeLists.txt b/cmd/tools/CMakeLists.txt index 4b37bc4d1..95128229b 100644 --- a/cmd/tools/CMakeLists.txt +++ b/cmd/tools/CMakeLists.txt @@ -5,7 +5,7 @@ function(tool_defaults name) if(NOT HAVE_GETOPT_H) target_link_libraries(${name} ${Getopt_LINK_LIBRARIES}) - endif(NOT HAVE_GETOPT_H) + endif() install( TARGETS ${name} @@ -143,7 +143,7 @@ target_include_directories(gv2gml PRIVATE target_link_libraries(gv2gml cgraph gvc ingraphs) if(NOT HAVE_GETOPT_H) target_link_libraries(gv2gml ${Getopt_LINK_LIBRARIES}) -endif(NOT HAVE_GETOPT_H) +endif() install(TARGETS gv2gml RUNTIME DESTINATION ${BINARY_INSTALL_DIR}) # ================================= graphml2gv ================================= @@ -175,7 +175,7 @@ target_link_libraries(graphml2gv tool_defaults(graphml2gv) -endif(EXPAT_FOUND) +endif() # ================================== gvcolor =================================== add_executable(gvcolor @@ -230,9 +230,9 @@ target_include_directories(gvgen PRIVATE target_link_libraries(gvgen cgraph) # Link to math library -if (UNIX) +if(UNIX) target_link_libraries(gvgen m) -endif (UNIX) +endif() tool_defaults(gvgen) @@ -301,7 +301,7 @@ target_link_libraries(gxl2gv tool_defaults(gxl2gv) -endif(EXPAT_FOUND) +endif() # ==================================== mm2gv =================================== add_executable(mm2gv @@ -360,14 +360,14 @@ tool_defaults(sccmap) # ===================== Install third party DLLs on Windows ==================== -if (WIN32 AND install_win_dependency_dlls AND EXPAT_FOUND) +if(WIN32 AND install_win_dependency_dlls AND EXPAT_FOUND) install( FILES ${EXPAT_RUNTIME_LIBRARIES} DESTINATION ${BINARY_INSTALL_DIR} ) endif() -if (WIN32 AND install_win_dependency_dlls) +if(WIN32 AND install_win_dependency_dlls) install( FILES ${Getopt_RUNTIME_LIBRARIES} DESTINATION ${BINARY_INSTALL_DIR} diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 7a56fadbc..4c05c0583 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -33,7 +33,7 @@ add_subdirectory(cgraph) add_subdirectory(gvc) # C++ API libraries -if (with_cxx_api) +if(with_cxx_api) add_subdirectory(cgraph++) add_subdirectory(gvc++) endif() diff --git a/lib/common/CMakeLists.txt b/lib/common/CMakeLists.txt index f39a32157..eca0f9ac2 100644 --- a/lib/common/CMakeLists.txt +++ b/lib/common/CMakeLists.txt @@ -3,7 +3,7 @@ BISON_TARGET(HTMLparse ${CMAKE_CURRENT_SOURCE_DIR}/htmlparse.y ${CMAKE_CURRENT_B add_definitions(-DGVC_EXPORTS -D_BLD_gvc=1) if(CYGWIN) -set(AWK_OPTIONS, -v RS="\\r*\\n") + set(AWK_OPTIONS, -v RS="\\r*\\n") endif() # Generate colortbl.h from sources @@ -109,14 +109,14 @@ target_include_directories(common_obj PRIVATE ${EXPAT_INCLUDE_DIRS} ) -if (WIN32) +if(WIN32) 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") -endif(APPLE) +endif() add_library(common STATIC $ diff --git a/lib/gvc/CMakeLists.txt b/lib/gvc/CMakeLists.txt index 0329de559..decab25ee 100644 --- a/lib/gvc/CMakeLists.txt +++ b/lib/gvc/CMakeLists.txt @@ -65,18 +65,18 @@ target_link_libraries(gvc PUBLIC ${MATH_LIB} ) -if (LTDL_FOUND) +if(LTDL_FOUND) target_include_directories(gvc PRIVATE ${LTDL_INCLUDE_DIRS}) - if (NOT WIN32 OR MINGW) + if(NOT WIN32 OR MINGW) target_link_libraries(gvc PUBLIC ${LTDL_LIBRARIES}) endif() endif() -if (ZLIB_FOUND) +if(ZLIB_FOUND) target_link_libraries(gvc PUBLIC ${ZLIB_LIBRARIES}) endif() -if (${with_ortho}) +if(${with_ortho}) target_link_libraries(gvc PRIVATE $ ) @@ -134,7 +134,7 @@ set_target_properties(gvc PROPERTIES ) # Include DLLs with this library on Windows -if (WIN32 AND EXPAT_FOUND AND install_win_dependency_dlls) +if(WIN32 AND EXPAT_FOUND AND install_win_dependency_dlls) install( FILES ${EXPAT_RUNTIME_LIBRARIES} diff --git a/lib/gvpr/CMakeLists.txt b/lib/gvpr/CMakeLists.txt index e812381a8..3972918e4 100644 --- a/lib/gvpr/CMakeLists.txt +++ b/lib/gvpr/CMakeLists.txt @@ -46,4 +46,4 @@ target_link_libraries(gvpr if(NOT HAVE_GETOPT_H) target_link_libraries(gvpr ${Getopt_LINK_LIBRARIES}) -endif(NOT HAVE_GETOPT_H) +endif() diff --git a/lib/mingle/CMakeLists.txt b/lib/mingle/CMakeLists.txt index dee71d609..f475dc973 100644 --- a/lib/mingle/CMakeLists.txt +++ b/lib/mingle/CMakeLists.txt @@ -1,4 +1,4 @@ -if (ANN_FOUND) +if(ANN_FOUND) add_library(libmingle STATIC # Header files @@ -26,4 +26,4 @@ target_include_directories(libmingle PRIVATE ${ANN_INCLUDE_DIR} ) -endif (ANN_FOUND) +endif() diff --git a/lib/neatogen/CMakeLists.txt b/lib/neatogen/CMakeLists.txt index a02e9f8b0..bfbb861e6 100644 --- a/lib/neatogen/CMakeLists.txt +++ b/lib/neatogen/CMakeLists.txt @@ -77,14 +77,14 @@ set(sources randomkit.c ) -if (with_ipsepcola) +if(with_ipsepcola) list(APPEND ${sources} constrained_majorization_ipsep.c mosek_quad_solve.c mosek_quad_solve.h quad_prog_vpsc.c ) -endif (with_ipsepcola) +endif() add_library(neatogen STATIC diff --git a/lib/ortho/CMakeLists.txt b/lib/ortho/CMakeLists.txt index 8a538ebc1..8115ad8f8 100644 --- a/lib/ortho/CMakeLists.txt +++ b/lib/ortho/CMakeLists.txt @@ -1,4 +1,4 @@ -if (with_ortho) +if(with_ortho) add_definitions(-D_BLD_gvc=1 -DGVC_EXPORTS) @@ -37,4 +37,4 @@ add_library(ortho STATIC $ ) -endif (with_ortho) +endif() diff --git a/lib/sfdpgen/CMakeLists.txt b/lib/sfdpgen/CMakeLists.txt index 0a5aa1c71..f09612211 100644 --- a/lib/sfdpgen/CMakeLists.txt +++ b/lib/sfdpgen/CMakeLists.txt @@ -1,4 +1,4 @@ -if (with_sfdp) +if(with_sfdp) add_library(sfdpgen STATIC # Header files @@ -39,4 +39,4 @@ target_link_libraries(sfdpgen PRIVATE sparse ) -endif (with_sfdp) +endif() diff --git a/lib/topfish/CMakeLists.txt b/lib/topfish/CMakeLists.txt index 8cd0fc9d2..dea9884ec 100644 --- a/lib/topfish/CMakeLists.txt +++ b/lib/topfish/CMakeLists.txt @@ -1,4 +1,4 @@ -if (with_smyrna) +if(with_smyrna) add_library(topfish STATIC # Header files @@ -14,4 +14,4 @@ target_include_directories(topfish PRIVATE ${GRAPHVIZ_LIB_DIR}/common ) -endif (with_smyrna) +endif() diff --git a/lib/vpsc/CMakeLists.txt b/lib/vpsc/CMakeLists.txt index 5fb917bca..5ceb92f6a 100644 --- a/lib/vpsc/CMakeLists.txt +++ b/lib/vpsc/CMakeLists.txt @@ -1,4 +1,4 @@ -if (with_ipsepcola) +if(with_ipsepcola) add_library(vpsc STATIC # Header files @@ -27,4 +27,4 @@ target_include_directories(vpsc PRIVATE ${GRAPHVIZ_LIB_DIR} ) -endif (with_ipsepcola) +endif() diff --git a/plugin/gd/CMakeLists.txt b/plugin/gd/CMakeLists.txt index 9f3c6c413..f5d11ece5 100644 --- a/plugin/gd/CMakeLists.txt +++ b/plugin/gd/CMakeLists.txt @@ -1,4 +1,4 @@ -if (GD_FOUND) +if(GD_FOUND) add_library(gvplugin_gd SHARED # Source files @@ -36,7 +36,7 @@ install( ) # Include DLLs with this library on Windows -if (WIN32 AND install_win_dependency_dlls) +if(WIN32 AND install_win_dependency_dlls) install( FILES ${GD_RUNTIME_LIBRARIES} @@ -50,4 +50,4 @@ set_target_properties(gvplugin_gd PROPERTIES SOVERSION ${GRAPHVIZ_PLUGIN_VERSION} ) -endif (GD_FOUND) +endif() diff --git a/plugin/gdiplus/CMakeLists.txt b/plugin/gdiplus/CMakeLists.txt index 58388d63b..d9dff7e92 100644 --- a/plugin/gdiplus/CMakeLists.txt +++ b/plugin/gdiplus/CMakeLists.txt @@ -1,4 +1,4 @@ -if (WIN32) +if(WIN32) add_library(gvplugin_gdiplus SHARED # Header files @@ -43,4 +43,4 @@ set_target_properties(gvplugin_gdiplus PROPERTIES SOVERSION ${GRAPHVIZ_PLUGIN_VERSION} ) -endif (WIN32) +endif() diff --git a/plugin/neato_layout/CMakeLists.txt b/plugin/neato_layout/CMakeLists.txt index d6b702da3..7c34db1a1 100644 --- a/plugin/neato_layout/CMakeLists.txt +++ b/plugin/neato_layout/CMakeLists.txt @@ -26,13 +26,13 @@ target_link_libraries(gvplugin_neato_layout twopigen ) -if (with_ipsepcola) +if(with_ipsepcola) target_link_libraries(gvplugin_neato_layout vpsc) -endif (with_ipsepcola) +endif() -if (with_sfdp) +if(with_sfdp) target_link_libraries(gvplugin_neato_layout sfdpgen) -endif (with_sfdp) +endif() # Installation location of library files install( diff --git a/plugin/pango/CMakeLists.txt b/plugin/pango/CMakeLists.txt index 92fc10f73..dfad1d032 100644 --- a/plugin/pango/CMakeLists.txt +++ b/plugin/pango/CMakeLists.txt @@ -42,7 +42,7 @@ install( ) # Include DLLs with this library on Windows -if (WIN32 AND install_win_dependency_dlls) +if(WIN32 AND install_win_dependency_dlls) install( FILES ${Cairo_RUNTIME_LIBRARIES} -- 2.40.0