File: CMakeLists.txt

package info (click to toggle)
graphviz 14.0.5-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 139,388 kB
  • sloc: ansic: 141,938; cpp: 11,957; python: 7,766; makefile: 4,043; yacc: 3,030; xml: 2,972; tcl: 2,495; sh: 1,388; objc: 1,159; java: 560; lex: 423; perl: 243; awk: 156; pascal: 139; php: 58; ruby: 49; cs: 31; sed: 1
file content (52 lines) | stat: -rw-r--r-- 1,464 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# teach libraries how to find plugins and libraries, even if there is another
# copy of Graphviz installed in the system default paths
if(APPLE)
  list(APPEND CMAKE_INSTALL_RPATH
    "@executable_path/../../../${PLUGIN_INSTALL_DIR}")
  list(APPEND CMAKE_INSTALL_RPATH "@executable_path/../..")
else()
  list(APPEND CMAKE_INSTALL_RPATH "\$ORIGIN/../../../${PLUGIN_INSTALL_DIR}")
  list(APPEND CMAKE_INSTALL_RPATH "\$ORIGIN/../..")
endif()

if(ENABLE_TCL)
  add_subdirectory(gdtclft)
  add_subdirectory(tcldot)
  add_subdirectory(tclpathplan)
  add_subdirectory(tclstubs)
endif()

add_subdirectory(gv)

if(ENABLE_TCL)
  if(GD_FOUND)
    set(GD_INDEX "gdtclft/pkgIndex.tcl")
  else()
    set(GD_INDEX "")
  endif()
  if(ENABLE_SWIG)
    set(SWIG_INDEX "gv/pkgIndex.tcl")
  else()
    set(SWIG_INDEX "")
  endif()
  add_custom_target(tcl_pkgindex
    ALL
    COMMAND ${CMAKE_COMMAND} -E cat tcldot/pkgIndex.tcl
      tclpathplan/pkgIndex.tcl ${GD_INDEX} ${SWIG_INDEX} >pkgIndex.tcl
    COMMAND ${CMAKE_COMMAND} -E echo "\"#" "end\"" >>pkgIndex.tcl
    BYPRODUCTS pkgIndex.tcl
    COMMENT "create TCL package index"
  )
  add_dependencies(tcl_pkgindex tcldot_pkgindex tclplan_pkgindex)
  if(GD_FOUND)
    add_dependencies(tcl_pkgindex gdtclft_pkgindex)
  endif()
  if(ENABLE_SWIG)
    add_dependencies(tcl_pkgindex gv_tcl_pkgindex)
  endif()

  install(
    FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgIndex.tcl
    DESTINATION ${LIBRARY_INSTALL_DIR}/graphviz/tcl
  )
endif()