Debian Codegraph @

lib/pathplan/CMakeLists.txt

raw
1 add_definitions(-DPATHPLAN_EXPORTS)
2
3 add_library(pathplan
4 # Header files
5 pathgeom.h
6 pathplan.h
7 pathutil.h
8 solvers.h
9 tri.h
10 vis.h
11 vispath.h
12
13 # Source files
14 cvt.c
15 inpoly.c
16 route.c
17 shortest.c
18 shortestpth.c
19 solvers.c
20 triang.c
21 util.c
22 visibility.c
23 )
24
25 target_include_directories(pathplan
26 PUBLIC
27 $<INSTALL_INTERFACE:include>
28 $<INSTALL_INTERFACE:include/graphviz>
29 PRIVATE
30 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
31 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
32 )
33
34 target_link_libraries(pathplan PRIVATE util)
35
36 # Installation location of library files
37 install(
38 TARGETS pathplan
39 EXPORT graphvizTargets
40 RUNTIME DESTINATION ${BINARY_INSTALL_DIR}
41 LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR}
42 ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}
43 )
44
45 # Specify headers to be installed
46 install(
47 FILES pathgeom.h pathplan.h
48 DESTINATION ${HEADER_INSTALL_DIR}
49 )
50
51 # Specify man pages to be installed
52 if(GZIP)
53 add_custom_target(man-pathplan ALL DEPENDS pathplan.3.gz
54 COMMENT "pathplan man page")
55 add_custom_command(
56 OUTPUT pathplan.3.gz
57 COMMAND ${GZIP} -9 --no-name --to-stdout pathplan.3
58 >"${CMAKE_CURRENT_BINARY_DIR}/pathplan.3.gz"
59 MAIN_DEPENDENCY pathplan.3
60 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
61 COMMENT "compress pathplan man page")
62 install(
63 FILES ${CMAKE_CURRENT_BINARY_DIR}/pathplan.3.gz
64 DESTINATION ${MAN_INSTALL_DIR}/man3)
65 else()
66 install(
67 FILES pathplan.3
68 DESTINATION ${MAN_INSTALL_DIR}/man3
69 )
70 endif()
71
72 # Specify library version and soversion
73 set_target_properties(pathplan PROPERTIES
74 VERSION 4.0.4
75 SOVERSION 4
76 )