Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add use system spdlog flag #303

Merged
merged 4 commits into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ option(BUILD_SHARED_LIBS "Control shared/static building." ON)

option(UAGENT_USE_SYSTEM_FASTDDS "Force find and use system installed Fast-DDS." OFF)
option(UAGENT_USE_SYSTEM_FASTCDR "Force find and use system installed Fast-CDR." OFF)
option(UAGENT_USE_SYSTEM_LOGGER "Force find and use system installed spdlog." OFF)
option(UAGENT_FAST_PROFILE "Build FastMiddleware profile." ON)
option(UAGENT_CED_PROFILE "Build CedMiddleware profile." ON)
option(UAGENT_DISCOVERY_PROFILE "Build Discovery profile." ON)
Expand Down Expand Up @@ -102,8 +103,12 @@ if(UAGENT_FAST_PROFILE)
endif()

if(UAGENT_LOGGER_PROFILE)
set(_spdlog_version 1.9.2)
set(_spdlog_tag v1.9.2)
if(UAGENT_USE_SYSTEM_LOGGER)
set(_spdlog_version 1)
else()
set(_spdlog_version 1.9.2)
set(_spdlog_tag v1.9.2)
endif()
list(APPEND _deps "spdlog\;${_spdlog_version}")
endif()

Expand Down
2 changes: 1 addition & 1 deletion cmake/SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ if(UAGENT_FAST_PROFILE AND NOT UAGENT_USE_SYSTEM_FASTDDS)
endif()
endif()

if(UAGENT_LOGGER_PROFILE)
if(UAGENT_LOGGER_PROFILE AND NOT UAGENT_USE_SYSTEM_LOGGER)
# spdlog.
unset(spdlog_DIR CACHE)
find_package(spdlog ${_spdlog_version} EXACT QUIET)
Expand Down