srsRAN/srsepc/src/CMakeLists.txt

78 lines
2.9 KiB
CMake
Raw Permalink Normal View History

#
2020-03-13 11:12:52 +00:00
# Copyright 2013-2020 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
2019-04-26 19:27:38 +00:00
# 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/.
#
2017-10-09 13:11:43 +00:00
add_subdirectory(mme)
add_subdirectory(hss)
2017-11-17 12:28:05 +00:00
add_subdirectory(spgw)
add_subdirectory(mbms-gw)
2017-10-09 13:11:43 +00:00
# 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
s1ap_asn1
srslte_upper
srslte_common
srslog
${CMAKE_THREAD_LIBS_INIT}
${Boost_LIBRARIES}
${SEC_LIBRARIES}
${LIBCONFIGPP_LIBRARIES}
${SCTP_LIBRARIES})
2017-10-09 13:11:43 +00:00
add_executable(srsmbms mbms-gw/main.cc )
target_link_libraries(srsmbms srsepc_mbms_gw
srslte_upper
srslte_common
srslog
${CMAKE_THREAD_LIBS_INIT}
${Boost_LIBRARIES}
${SEC_LIBRARIES}
${LIBCONFIGPP_LIBRARIES}
${SCTP_LIBRARIES})
2017-10-09 13:11:43 +00:00
if (RPATH)
set_target_properties(srsepc PROPERTIES INSTALL_RPATH ".")
set_target_properties(srsmbms PROPERTIES INSTALL_RPATH ".")
2017-10-09 13:11:43 +00:00
endif (RPATH)
########################################################################
# Option to run command after build (useful for remote builds)
########################################################################
2017-10-09 14:42:13 +00:00
if (NOT ${BUILDEPC_CMD} STREQUAL "")
message(STATUS "Added custom post-build-EPC command: ${BUILDENB_CMD}")
2017-10-09 13:11:43 +00:00
add_custom_command(TARGET srsenb POST_BUILD COMMAND ${BUILDENB_CMD})
2017-10-09 14:42:13 +00:00
else(NOT ${BUILDEPC_CMD} STREQUAL "")
message(STATUS "No post-build-EPC command defined")
endif (NOT ${BUILDEPC_CMD} STREQUAL "")
2017-10-09 13:11:43 +00:00
install(TARGETS srsepc DESTINATION ${RUNTIME_DIR})
install(TARGETS srsmbms DESTINATION ${RUNTIME_DIR})