mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 09:09:35 +08:00
CMake improvements
This commit is contained in:
@@ -2,15 +2,9 @@
|
||||
# Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
project(SpdlogExamples CXX)
|
||||
project(spdlog_examples CXX)
|
||||
|
||||
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)
|
||||
add_library(spdlog::spdlog_header_only ALIAS spdlog_header_only)
|
||||
else()
|
||||
if(NOT TARGET spdlog)
|
||||
# Stand-alone build
|
||||
find_package(spdlog REQUIRED)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user