From d89d6d9551e5343de4f70ac534f61c3057713f92 Mon Sep 17 00:00:00 2001 From: John Butterfield Date: Wed, 20 Jun 2018 18:58:09 -0700 Subject: [PATCH] Updated CMakeLists.txt for relocatable installs Forcing CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR to be absolute is unnecessary and results in absolute paths in the installation. This prevents relocatable prefix installations. --- CMakeLists.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f7b41ae..978a24b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,13 +143,6 @@ endif() install(FILES tinyxml2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -foreach(p LIB INCLUDE) - set(var CMAKE_INSTALL_${p}DIR) - if(NOT IS_ABSOLUTE "${${var}}") - set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") - endif() -endforeach() - configure_file(tinyxml2.pc.in tinyxml2.pc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)