This commit is contained in:
Gabi Melman
2020-04-01 00:10:57 +03:00
committed by GitHub
parent f57378d8ba
commit 7906592230

View File

@@ -1,11 +1,9 @@
# Copyright(c) 2019 spdlog authors # Copyright(c) 2019 spdlog authors
# Distributed under the MIT License (http://opensource.org/licenses/MIT) # Distributed under the MIT License (http://opensource.org/licenses/MIT)
cmake_minimum_required(VERSION 3.1) cmake_minimum_required(VERSION 3.2)
project(spdlog_examples CXX) project(spdlog_examples CXX)
include(../cmake/utils.cmake)
if(NOT TARGET spdlog) if(NOT TARGET spdlog)
# Stand-alone build # Stand-alone build
find_package(spdlog REQUIRED) find_package(spdlog REQUIRED)
@@ -15,7 +13,6 @@ endif()
# Example of using pre-compiled library # Example of using pre-compiled library
#--------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------
add_executable(example example.cpp) add_executable(example example.cpp)
spdlog_enable_warnings(example)
target_link_libraries(example PRIVATE spdlog::spdlog) target_link_libraries(example PRIVATE spdlog::spdlog)
#--------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------
@@ -23,7 +20,6 @@ target_link_libraries(example PRIVATE spdlog::spdlog)
#--------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------
if(SPDLOG_BUILD_EXAMPLE_HO) if(SPDLOG_BUILD_EXAMPLE_HO)
add_executable(example_header_only example.cpp) add_executable(example_header_only example.cpp)
spdlog_enable_warnings(example_header_only)
target_link_libraries(example_header_only PRIVATE spdlog::spdlog_header_only) target_link_libraries(example_header_only PRIVATE spdlog::spdlog_header_only)
endif() endif()