File: CMakeLists.txt

package info (click to toggle)
srslte 18.06.1-8
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 10,996 kB
  • sloc: cpp: 100,729; ansic: 69,791; sh: 118; makefile: 87
file content (76 lines) | stat: -rw-r--r-- 2,885 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# Copyright 2013-2017 Software Radio Systems Limited
#
# This file is part of srsLTE
#
# srsLTE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsLTE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#

add_subdirectory(mme)
add_subdirectory(hss)
add_subdirectory(spgw)
add_subdirectory(mbms-gw)

# Link libstdc++ and libgcc
if(BUILD_STATIC)
  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc")
endif(BUILD_STATIC)


if (RPATH)
  SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
endif (RPATH)


add_executable(srsepc main.cc )
target_link_libraries(srsepc  srsepc_mme
                              srsepc_hss
                              srsepc_sgw
                              srslte_upper
                              srslte_common
                              ${CMAKE_THREAD_LIBS_INIT} 
                              ${Boost_LIBRARIES} 
                              ${SEC_LIBRARIES}
                              ${LIBCONFIGPP_LIBRARIES}
                              ${SCTP_LIBRARIES})

add_executable(srsmbms mbms-gw/main.cc )
target_link_libraries(srsmbms   srsepc_mbms_gw
                                srslte_upper
                                srslte_common
                                ${CMAKE_THREAD_LIBS_INIT} 
                                ${Boost_LIBRARIES} 
                                ${SEC_LIBRARIES}
                                ${LIBCONFIGPP_LIBRARIES}
                                ${SCTP_LIBRARIES})
if (RPATH)
  set_target_properties(srsepc PROPERTIES INSTALL_RPATH "/usr/lib/srslte")
  set_target_properties(srsmbms PROPERTIES INSTALL_RPATH "/usr/lib/srslte")
endif (RPATH)

install(TARGETS srsepc DESTINATION ${RUNTIME_DIR})
install(TARGETS srsmbms DESTINATION ${RUNTIME_DIR})

########################################################################
# Option to run command after build (useful for remote builds)
########################################################################
if (NOT ${BUILDEPC_CMD} STREQUAL "")
  message(STATUS "Added custom post-build-EPC command: ${BUILDENB_CMD}")
  add_custom_command(TARGET srsenb POST_BUILD COMMAND ${BUILDENB_CMD})
else(NOT ${BUILDEPC_CMD} STREQUAL "")
  message(STATUS "No post-build-EPC command defined")
endif (NOT ${BUILDEPC_CMD} STREQUAL "")

install(TARGETS srsepc DESTINATION ${RUNTIME_DIR})