Verified Commit bf97d7e4 authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

Rename API library to libscord.so

parent e7d24c17
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ target_link_libraries(c_examples_common common::api::types)
foreach(example IN LISTS examples_c)
  add_executable(${example}_c)
  target_sources(${example}_c PRIVATE ${example}.c)
  target_link_libraries(${example}_c PUBLIC adm_iosched c_examples_common)
  target_link_libraries(${example}_c PUBLIC libscord c_examples_common)
  set_target_properties(${example}_c PROPERTIES OUTPUT_NAME ${example})
endforeach()

+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ foreach(example IN LISTS examples_cxx)
  add_executable(${example}_cxx)
  target_sources(${example}_cxx PRIVATE ${example}.cpp)
  target_link_libraries(${example}_cxx
    PUBLIC fmt::fmt adm_iosched cxx_examples_common)
    PUBLIC fmt::fmt libscord cxx_examples_common)
  set_target_properties(${example}_cxx PROPERTIES OUTPUT_NAME ${example})
endforeach()

+8 −6
Original line number Diff line number Diff line
@@ -22,23 +22,25 @@
# SPDX-License-Identifier: GPL-3.0-or-later                                    #
################################################################################

add_library(adm_iosched SHARED)
add_library(libscord SHARED)

target_sources(adm_iosched
target_sources(libscord
  PUBLIC admire.h admire.hpp
  PRIVATE admire.cpp c_wrapper.cpp detail/impl.hpp detail/impl.cpp env.hpp)

set_target_properties(adm_iosched PROPERTIES PUBLIC_HEADER "admire.h;admire.hpp")
set_target_properties(libscord PROPERTIES PUBLIC_HEADER "admire.h;admire.hpp")

target_include_directories(adm_iosched PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(libscord PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

target_link_libraries(adm_iosched PRIVATE
target_link_libraries(libscord PRIVATE
  common::network::rpc_client
  common::network::rpc_types PUBLIC
  tl::expected common::api::types)

set_target_properties(libscord PROPERTIES OUTPUT_NAME "scord")

install(
  TARGETS adm_iosched
  TARGETS libscord
  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
  PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+2 −2
Original line number Diff line number Diff line
@@ -54,10 +54,10 @@ init_logger() {
        if(const auto p = std::getenv(admire::env::LOG);
           p && !std::string{p}.empty() && std::string{p} != "0") {
            if(const auto log_file = std::getenv(admire::env::LOG_OUTPUT)) {
                scord::logger::create_global_logger("libadm_iosched", "file",
                scord::logger::create_global_logger("libscord", "file",
                                                    log_file);
            } else {
                scord::logger::create_global_logger("libadm_iosched",
                scord::logger::create_global_logger("libscord",
                                                    "console color");
            }
        }
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
add_executable(tests)

target_sources(tests PRIVATE test.cpp)
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain adm_iosched)
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain libscord)

include(Catch)
catch_discover_tests(tests)