From 12139f587bc6dfb0efae9410249e0f3d06f1cca5 Mon Sep 17 00:00:00 2001 From: Bernd Amend Date: Wed, 20 Jun 2018 16:55:14 +0200 Subject: [PATCH] fix cmake warning "Policy CMP0048 is not set" (#214) This also bumps the minimum CMake version to 3.0 (from 2.8.12). --- CMakeLists.txt | 9 ++++----- scripts/pugixml.pc.in | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e95e6c0..148f7b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.0) -project(pugixml) +project(pugixml VERSION 1.9) option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF) option(BUILD_TESTS "Build tests" OFF) @@ -53,12 +53,11 @@ if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1 AND ";${CMAKE_C target_compile_features(pugixml PUBLIC cxx_long_long_type) endif() -set_target_properties(pugixml PROPERTIES VERSION 1.9 SOVERSION 1) -get_target_property(PUGIXML_VERSION_STRING pugixml VERSION) +set_target_properties(pugixml PROPERTIES VERSION ${pugixml_VERSION} SOVERSION 1) if(USE_VERSIONED_LIBDIR) # Install library into its own directory under LIBDIR - set(INSTALL_SUFFIX /pugixml-${PUGIXML_VERSION_STRING}) + set(INSTALL_SUFFIX /pugixml-${pugixml_VERSION}) endif() target_include_directories(pugixml PUBLIC diff --git a/scripts/pugixml.pc.in b/scripts/pugixml.pc.in index 804c4d3..04b4d3b 100644 --- a/scripts/pugixml.pc.in +++ b/scripts/pugixml.pc.in @@ -6,6 +6,6 @@ libdir=${exec_prefix}/lib@INSTALL_SUFFIX@ Name: pugixml Description: Light-weight, simple and fast XML parser for C++ with XPath support. URL: http://pugixml.org/ -Version: @PUGIXML_VERSION_STRING@ +Version: @pugixml_VERSION@ Cflags: -I${includedir} Libs: -L${libdir} -lpugixml