Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gabime/spdlog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgabime <gmelman1@gmail.com>2019-05-29 15:15:35 +0300
committergabime <gmelman1@gmail.com>2019-05-29 15:15:35 +0300
commit5743adc46796d94dbadb1f8383d08496427a3b8b (patch)
treed95d95c197b719215db821799a0185dee37145bd /CMakeLists.txt
parent76fc166e115a053cfb95b0378e8c7fdff6656ddf (diff)
CMake use extract version from version.h
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ad1b307..f99bfc83 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,8 +2,17 @@
# Distributed under the MIT License (http://opensource.org/licenses/MIT)
cmake_minimum_required(VERSION 3.1)
-project(spdlog VERSION 1.3.1 LANGUAGES CXX)
+
+
+#---------------------------------------------------------------------------------------
+# Start spdlog project
+#---------------------------------------------------------------------------------------
+include(cmake/version.cmake)
+project(spdlog VERSION ${SPDLOG_VERSION} LANGUAGES CXX)
+message(STATUS "Build spdlog: ${SPDLOG_VERSION}")
+
include(GNUInstallDirs)
+include(cmake/ide.cmake)
#---------------------------------------------------------------------------------------
# Set default build to release
@@ -40,12 +49,12 @@ option(SPDLOG_FMT_EXTERNAL "Use external fmt library instead of bundled" OFF)
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
+
find_package(Threads REQUIRED)
#---------------------------------------------------------------------------------------
# Static library version
#---------------------------------------------------------------------------------------
-include(cmake/ide.cmake)
add_library(spdlog STATIC src/spdlog.cpp ${SPDLOG_ALL_HEADERS})
add_library(spdlog::spdlog ALIAS spdlog)