Install srslog to system folder

This commit is contained in:
David Rupprecht 2021-03-25 13:41:00 +01:00 committed by David Rupprecht
parent 838d5ac0f4
commit b944528a4f
3 changed files with 15 additions and 30 deletions

View File

@ -12,10 +12,22 @@ set(SOURCES
srslog_c.cpp
event_trace.cpp)
add_subdirectory(bundled/fmt)
add_subdirectory(formatters)
include_directories(${PROJECT_SOURCE_DIR}/lib/include/srsran/srslog/bundled/)
include_directories(${PROJECT_SOURCE_DIR}/lib/include/srsran/srslog/formatters)
set(SOURCES
${SOURCES}
${CMAKE_CURRENT_SOURCE_DIR}/bundled/fmt/format.cc
${CMAKE_CURRENT_SOURCE_DIR}/bundled/fmt/os.cc)
set(SOURCES
${SOURCES}
${CMAKE_CURRENT_SOURCE_DIR}/formatters/json_formatter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/formatters/text_formatter.cpp)
find_package(Threads REQUIRED)
add_library(srslog STATIC ${SOURCES})
target_link_libraries(srslog formatters fmt "${CMAKE_THREAD_LIBS_INIT}")
target_link_libraries(srslog ${CMAKE_THREAD_LIBS_INIT})
INSTALL(TARGETS srslog DESTINATION ${LIBRARY_DIR})

View File

@ -1,14 +0,0 @@
#
# Copyright 2013-2021 Software Radio Systems Limited
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the distribution.
#
set(SOURCES
format.cc
os.cc)
add_library(fmt STATIC ${SOURCES})
target_include_directories(fmt PUBLIC ../../../../include/srsran/srslog/bundled)

View File

@ -1,13 +0,0 @@
#
# Copyright 2013-2021 Software Radio Systems Limited
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the distribution.
#
set(SOURCES
json_formatter.cpp
text_formatter.cpp)
add_library(formatters STATIC ${SOURCES})