File: CMakeLists.txt

package info (click to toggle)
rdma-core 33.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,844 kB
  • sloc: ansic: 145,804; python: 5,688; sh: 2,761; perl: 1,465; makefile: 73
file content (76 lines) | stat: -rw-r--r-- 2,107 bytes parent folder | download | duplicates (2)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
publish_headers(infiniband
  include/infiniband/acm_prov.h
  )

# FIXME: Fixup the include scheme to not require all these -Is
include_directories("include")
include_directories("src")
include_directories("linux")
include_directories(${NL_INCLUDE_DIRS})

# NOTE: ibacm exports symbols from its own binary for use by ibacm
rdma_sbin_executable(ibacm
  src/acm.c
  src/acm_util.c
  )
target_link_libraries(ibacm LINK_PRIVATE
  ibverbs
  ibumad
  ${NL_LIBRARIES}
  ${SYSTEMD_LIBRARIES}
  ${CMAKE_THREAD_LIBS_INIT}
  ${CMAKE_DL_LIBS}
  )
# FIXME: We should probably list the symbols we want to export..
set_target_properties(ibacm PROPERTIES ENABLE_EXPORTS TRUE)

# This is a plugin module that dynamically links to ibacm
add_library(ibacmp MODULE
  prov/acmp/src/acmp.c
  )
rdma_set_library_map(ibacmp "prov/acmp/src/libibacmp.map")
target_link_libraries(ibacmp LINK_PRIVATE
  ibacm
  ibverbs
  ibumad
  ${CMAKE_THREAD_LIBS_INIT}
  )
set_target_properties(ibacmp PROPERTIES
  LIBRARY_OUTPUT_DIRECTORY "${BUILD_LIB}")
install(TARGETS ibacmp DESTINATION "${ACM_PROVIDER_DIR}")
# ACM providers are linked into a subdir so that IN_PLACE can work.
file(MAKE_DIRECTORY "${BUILD_LIB}/ibacm/")
rdma_create_symlink("../libibacmp.so" "${BUILD_LIB}/ibacm/libibacmp.so")

rdma_executable(ib_acme
  src/acme.c
  src/libacm.c
  src/parse.c
  )
target_link_libraries(ib_acme LINK_PRIVATE
  ibverbs
  )
target_compile_definitions(ib_acme PRIVATE "-DACME_PRINTS")

rdma_man_pages(
  man/ib_acme.1
  man/ibacm.7
  man/ibacm.8
  man/ibacm_prov.7.in
  )

# FIXME: update the .init.in
rdma_subst_install(FILES "ibacm.init.in"
  DESTINATION "${CMAKE_INSTALL_INITDDIR}"
  RENAME "ibacm"
  PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)

rdma_subst_install(FILES "ibacm.service.in"
  DESTINATION "${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}"
  RENAME ibacm.service
  PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)

install(FILES "ibacm.socket"
  DESTINATION "${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}"
  RENAME ibacm.socket
  PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)