build: Bump cmake version and use new version syntax (#587)

Co-authored-by: Alan Wang <wp_scut@163.com>
This commit is contained in:
Joshua Arulsamy 2021-10-22 02:15:19 -06:00 committed by GitHub
parent e5dbaee131
commit c77a688927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,18 +1,16 @@
set(CMAKE_LEGACY_CYGWIN_WIN32 0) set(CMAKE_LEGACY_CYGWIN_WIN32 0)
cmake_minimum_required(VERSION 2.8.5) cmake_minimum_required(VERSION 3.0)
project(cJSON
VERSION 1.7.15
LANGUAGES C)
project(cJSON C)
cmake_policy(SET CMP0054 NEW) # set CMP0054 policy cmake_policy(SET CMP0054 NEW) # set CMP0054 policy
include(GNUInstallDirs) include(GNUInstallDirs)
set(PROJECT_VERSION_MAJOR 1)
set(PROJECT_VERSION_MINOR 7)
set(PROJECT_VERSION_PATCH 15)
set(CJSON_VERSION_SO 1) set(CJSON_VERSION_SO 1)
set(CJSON_UTILS_VERSION_SO 1) set(CJSON_UTILS_VERSION_SO 1)
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
set(custom_compiler_flags) set(custom_compiler_flags)