mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 17:19:34 +08:00
Remove the namespaced
Namespaces are good for avoiding collisions, but since the non-namespaced targets still exist, it does no good to add the namespaced targets on top.
This commit is contained in:
@@ -24,9 +24,14 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
project(SpdlogExamples CXX)
|
||||
|
||||
if(NOT TARGET spdlog::spdlog)
|
||||
# Stand-alone build
|
||||
find_package(spdlog CONFIG REQUIRED)
|
||||
if(TARGET spdlog)
|
||||
# If we're running this example as part of the primary spdlog applciation
|
||||
# then add an alias. This allows us to use the same "spdlog::spdlog"
|
||||
# below that a user would use (with the namespace)
|
||||
add_library(spdlog::spdlog ALIAS spdlog)
|
||||
else()
|
||||
# Stand-alone build
|
||||
find_package(spdlog REQUIRED)
|
||||
endif()
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
Reference in New Issue
Block a user