Read version info from file

This commit is contained in:
Sven Fink 2020-12-08 08:31:44 +01:00
parent 73d57d9540
commit ce8c03151f
2 changed files with 8 additions and 1 deletions

View File

@ -8,10 +8,16 @@ if(HUNTER_ENABLED)
)
endif()
# Read version from file VERSION
FILE(READ "VERSION" PROJECT_VERSION)
STRING(STRIP "${PROJECT_VERSION}" PROJECT_VERSION)
cmake_policy(SET CMP0048 NEW)
project(nlohmann_json_schema_validator
VERSION "${PROJECT_VERSION}"
LANGUAGES CXX)
set(PROJECT_VERSION 2.1.1)
message(STATUS "Version: ${PROJECT_VERSION}")
cmake_minimum_required(VERSION 3.2)

1
VERSION Normal file
View File

@ -0,0 +1 @@
2.1.1