mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 18:41:35 +08:00
cmake: add some commend blocks to clearly differentiate CMakeLists file sections
This commit is contained in:
parent
5504630e46
commit
ab25004242
@ -11,6 +11,9 @@ include(CTest)
|
|||||||
include(CMakeDependentOption)
|
include(CMakeDependentOption)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
# compiler config
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
@ -18,6 +21,9 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCH
|
|||||||
set(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}")
|
set(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
# spdlog target
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
add_library(spdlog INTERFACE)
|
add_library(spdlog INTERFACE)
|
||||||
|
|
||||||
option(SPDLOG_BUILD_EXAMPLES "Build examples" OFF)
|
option(SPDLOG_BUILD_EXAMPLES "Build examples" OFF)
|
||||||
@ -43,6 +49,9 @@ if(SPDLOG_BUILD_TESTING)
|
|||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
# Install/export targets and files
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
|
set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
|
||||||
set(include_install_dir "${CMAKE_INSTALL_INCLUDEDIR}")
|
set(include_install_dir "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||||
set(pkgconfig_install_dir "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
set(pkgconfig_install_dir "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||||
|
Loading…
Reference in New Issue
Block a user