diff options
Diffstat (limited to 'textproc/pugixml/files/patch-CMakeLists.txt')
-rw-r--r-- | textproc/pugixml/files/patch-CMakeLists.txt | 48 |
1 files changed, 14 insertions, 34 deletions
diff --git a/textproc/pugixml/files/patch-CMakeLists.txt b/textproc/pugixml/files/patch-CMakeLists.txt index aef338932ea7..b5c2df71f143 100644 --- a/textproc/pugixml/files/patch-CMakeLists.txt +++ b/textproc/pugixml/files/patch-CMakeLists.txt @@ -1,8 +1,8 @@ ---- CMakeLists.txt.orig 2016-11-27 15:48:03.000000000 -0500 -+++ CMakeLists.txt 2017-09-14 18:31:07.892853000 -0400 -@@ -2,7 +2,8 @@ +--- CMakeLists.txt.orig 2018-04-04 14:53:16 UTC ++++ CMakeLists.txt +@@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 2.8.12) - cmake_minimum_required(VERSION 2.6) + project(pugixml) -option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF) +option(BUILD_SHARED_LIBS "Build shared library" OFF) @@ -10,17 +10,12 @@ option(BUILD_TESTS "Build tests" OFF) option(BUILD_PKGCONFIG "Build in PKGCONFIG mode" OFF) -@@ -38,28 +39,27 @@ +@@ -38,9 +39,15 @@ endif() if(BUILD_SHARED_LIBS) - add_library(pugixml SHARED ${SOURCES}) + add_library(pugixml SHARED ${HEADERS} ${SOURCES}) -else() -- add_library(pugixml STATIC ${SOURCES}) -+ set_target_properties(pugixml PROPERTIES VERSION 1.8 SOVERSION 1) -+ install(TARGETS pugixml EXPORT pugixml-config -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +- add_library(pugixml STATIC ${HEADERS} ${SOURCES}) endif() +if(BUILD_STATIC_LIBS) + add_library(pugixml_static STATIC ${SOURCES}) @@ -31,32 +26,17 @@ + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +endif() - # Enable C++11 long long for compilers that are capable of it - if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1 AND ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_long_long_type;") - target_compile_features(pugixml PUBLIC cxx_long_long_type) - endif() + # Export symbols for shared library builds + if(BUILD_SHARED_LIBS AND MSVC) +@@ -54,11 +61,6 @@ endif() --set_target_properties(pugixml PROPERTIES VERSION 1.8 SOVERSION 1) --get_target_property(PUGIXML_VERSION_STRING pugixml VERSION) + set_target_properties(pugixml PROPERTIES VERSION 1.9 SOVERSION 1) + get_target_property(PUGIXML_VERSION_STRING pugixml VERSION) - -if(BUILD_PKGCONFIG) - # Install library into its own directory under LIBDIR - set(INSTALL_SUFFIX /pugixml-${PUGIXML_VERSION_STRING}) -endif() -- --install(TARGETS pugixml EXPORT pugixml-config -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX} -- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX} -- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) --install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX}) -+install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml) - if(BUILD_PKGCONFIG) -@@ -75,4 +75,4 @@ - add_executable(check ${TEST_SOURCES}) - target_link_libraries(check pugixml) - add_custom_command(TARGET check POST_BUILD COMMAND check WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) --endif() -\ No newline at end of file -+endif() + target_include_directories(pugixml PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src> |