mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Allowed overriding of SPDLOG_MASTER_PROJECT
to better support Conan
This commit is contained in:
parent
6fe899af10
commit
24e4f0aa87
@ -38,12 +38,14 @@ include(cmake/sanitizers.cmake)
|
|||||||
# spdlog target
|
# spdlog target
|
||||||
#---------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Check if spdlog is being used directly or via add_subdirectory
|
# Check if spdlog is being used directly or via add_subdirectory, but allow overriding
|
||||||
|
if (NOT DEFINED SPDLOG_MASTER_PROJECT)
|
||||||
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||||
set(SPDLOG_MASTER_PROJECT ON)
|
set(SPDLOG_MASTER_PROJECT ON)
|
||||||
else()
|
else()
|
||||||
set(SPDLOG_MASTER_PROJECT OFF)
|
set(SPDLOG_MASTER_PROJECT OFF)
|
||||||
endif()
|
endif()
|
||||||
|
endif ()
|
||||||
|
|
||||||
option(BUILD_SHARED_LIBS "Global flag to cause add_library to create shared libraries if on." ON)
|
option(BUILD_SHARED_LIBS "Global flag to cause add_library to create shared libraries if on." ON)
|
||||||
option(SPDLOG_BUILD_EXAMPLES "Build examples" ${SPDLOG_MASTER_PROJECT})
|
option(SPDLOG_BUILD_EXAMPLES "Build examples" ${SPDLOG_MASTER_PROJECT})
|
||||||
|
Loading…
Reference in New Issue
Block a user