From b944528a4fc3e36c2470027c08eed9c7f262529e Mon Sep 17 00:00:00 2001 From: David Rupprecht Date: Thu, 25 Mar 2021 13:41:00 +0100 Subject: [PATCH] Install srslog to system folder --- lib/src/srslog/CMakeLists.txt | 18 +++++++++++++++--- lib/src/srslog/bundled/fmt/CMakeLists.txt | 14 -------------- lib/src/srslog/formatters/CMakeLists.txt | 13 ------------- 3 files changed, 15 insertions(+), 30 deletions(-) delete mode 100644 lib/src/srslog/bundled/fmt/CMakeLists.txt delete mode 100644 lib/src/srslog/formatters/CMakeLists.txt diff --git a/lib/src/srslog/CMakeLists.txt b/lib/src/srslog/CMakeLists.txt index 7800e8c3a..794285555 100644 --- a/lib/src/srslog/CMakeLists.txt +++ b/lib/src/srslog/CMakeLists.txt @@ -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}) diff --git a/lib/src/srslog/bundled/fmt/CMakeLists.txt b/lib/src/srslog/bundled/fmt/CMakeLists.txt deleted file mode 100644 index e1a92ee3a..000000000 --- a/lib/src/srslog/bundled/fmt/CMakeLists.txt +++ /dev/null @@ -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) diff --git a/lib/src/srslog/formatters/CMakeLists.txt b/lib/src/srslog/formatters/CMakeLists.txt deleted file mode 100644 index 7d35370d2..000000000 --- a/lib/src/srslog/formatters/CMakeLists.txt +++ /dev/null @@ -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})