This commit is contained in:
Timur A. Fatkhullin
2026-02-12 00:36:20 +03:00
parent 7cc2c5e2a3
commit 9fbfb0d0b3

View File

@@ -48,6 +48,8 @@ if(USE_SPDLOG)
set(SPDLOG_USE_STD_FORMAT ON CACHE INTERNAL "Use of C++20 std::format")
set(SPDLOG_FMT_EXTERNAL OFF CACHE INTERNAL "Turn off external fmt library")
set(USE_SPDLOG_SYSTEM OFF)
find_package(spdlog CONFIG)
if(NOT ${spdlog_FOUND})
message(STATUS "\tfetch spdlog-lib ...")
@@ -62,7 +64,10 @@ if(USE_SPDLOG)
"-DSPDLOG_USE_STD_FORMAT=ON -DSPDLOG_FMT_EXTERNAL=OFF"
OVERRIDE_FIND_PACKAGE
)
find_package(spdlog REQUIRED CONFIG)
set(USE_SPDLOG_SYSTEM ON)
endif()
endif()
@@ -152,6 +157,8 @@ endif()
if(USE_ASIO)
pkg_check_modules(ASIOLIB IMPORTED_TARGET GLOBAL asio)
set(USE_ASIO_SYSTEM ON)
if(NOT ASIOLIB_FOUND)
message(STATUS "\tfetch asio-lib ...")
@@ -165,7 +172,6 @@ if(USE_ASIO)
)
FetchContent_MakeAvailable(asiolib_project)
endif()
execute_process(
WORKING_DIRECTORY ${asiolib_project_SOURCE_DIR}/asio
@@ -181,6 +187,10 @@ if(USE_ASIO)
pkg_check_modules(ASIOLIB IMPORTED_TARGET GLOBAL asio)
message(STATUS "ASIO INC PATHS: ${ASIOLIB_INCLUDE_DIRS}")
set(USE_ASIO_SYSTEM OFF)
endif()
endif()
if(USE_BSPLINE_PCM)
@@ -254,7 +264,7 @@ if(USE_ASIO)
endif()
if(USE_SPDLOG)
target_link_libraries(${PROJECT_NAME} INTERFACE spdlog::spdlog)
target_link_libraries(${PROJECT_NAME} INTERFACE spdlog::spdlog_header_only)
endif()
if(BUILD_TESTS)