fix cmake warning "Policy CMP0048 is not set" (#214)
This also bumps the minimum CMake version to 3.0 (from 2.8.12).
This commit is contained in:
parent
e584ea337e
commit
12139f587b
@ -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_SHARED_LIBS "Build shared instead of static library" OFF)
|
||||||
option(BUILD_TESTS "Build tests" 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)
|
target_compile_features(pugixml PUBLIC cxx_long_long_type)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(pugixml PROPERTIES VERSION 1.9 SOVERSION 1)
|
set_target_properties(pugixml PROPERTIES VERSION ${pugixml_VERSION} SOVERSION 1)
|
||||||
get_target_property(PUGIXML_VERSION_STRING pugixml VERSION)
|
|
||||||
|
|
||||||
if(USE_VERSIONED_LIBDIR)
|
if(USE_VERSIONED_LIBDIR)
|
||||||
# Install library into its own directory under LIBDIR
|
# Install library into its own directory under LIBDIR
|
||||||
set(INSTALL_SUFFIX /pugixml-${PUGIXML_VERSION_STRING})
|
set(INSTALL_SUFFIX /pugixml-${pugixml_VERSION})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(pugixml PUBLIC
|
target_include_directories(pugixml PUBLIC
|
||||||
|
|||||||
@ -6,6 +6,6 @@ libdir=${exec_prefix}/lib@INSTALL_SUFFIX@
|
|||||||
Name: pugixml
|
Name: pugixml
|
||||||
Description: Light-weight, simple and fast XML parser for C++ with XPath support.
|
Description: Light-weight, simple and fast XML parser for C++ with XPath support.
|
||||||
URL: http://pugixml.org/
|
URL: http://pugixml.org/
|
||||||
Version: @PUGIXML_VERSION_STRING@
|
Version: @pugixml_VERSION@
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
Libs: -L${libdir} -lpugixml
|
Libs: -L${libdir} -lpugixml
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user