summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt26
1 files changed, 7 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a843989..3dbdd6f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,27 +51,15 @@ set_target_properties(pugixml PROPERTIES VERSION 1.7 SOVERSION 1)
get_target_property(PUGIXML_VERSION_STRING pugixml VERSION)
if(BUILD_PKGCONFIG)
- # Install shared library into its own directory under LIBDIR
- install(TARGETS pugixml EXPORT pugixml-config
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/pugixml-${PUGIXML_VERSION_STRING}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/pugixml-${PUGIXML_VERSION_STRING}
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- )
-
- # Install header files into their own directory under INCLUDEDIR
- install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pugixml-${PUGIXML_VERSION_STRING})
-else()
- # Install shared library into default LIBDIR directory
- install(TARGETS pugixml EXPORT pugixml-config
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- )
-
- # Install header files into default INCLUDEDIR directory
- install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ # 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(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml)
if(BUILD_PKGCONFIG)