From 57665d85308de528da88de724de95066bfc83741 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sun, 7 Aug 2016 13:43:51 +0000 Subject: [PATCH] make the installations paths relative even for non Windows platforms Signed-off-by: Ivailo Monev --- cmake/modules/KatieBuildMacros.cmake | 43 ++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/cmake/modules/KatieBuildMacros.cmake b/cmake/modules/KatieBuildMacros.cmake index 85db39c20..ab40ba61c 100644 --- a/cmake/modules/KatieBuildMacros.cmake +++ b/cmake/modules/KatieBuildMacros.cmake @@ -190,31 +190,26 @@ endfunction() # they are null even quoting them will not help and CMake will complain that # not enought arguments have been passed to install() for DESTINATION function(KATIE_SETUP_PATHS) - if(KATIE_PLATFORM MATCHES "(win32|wince)") - set(CPACK_SET_DESTDIR FALSE) - set(instpaths - _PREFIX _HEADERS _LIBRARIES _BINARIES _PLUGINS _IMPORTS _DATA - _TRANSLATIONS _DOCUMENTATION _EXAMPLES _DEMOS _SETTINGS - ) - set(miscpaths - CMAKE_ - ) - foreach(instpath ${instpaths}) - string(REGEX REPLACE ".*${CMAKE_INSTALL_PREFIX}/" "" modpath "${QT${instpath}_PATH}") - string(REGEX REPLACE ".*${CMAKE_INSTALL_PREFIX}" "" modpath "${modpath}") - set(QT${instpath}_PATH "${modpath}" PARENT_SCOPE) - # message(STATUS "QT${instpath}_PATH: ${modpath}") - endforeach() + set(instpaths + _PREFIX _HEADERS _LIBRARIES _BINARIES _PLUGINS _IMPORTS _DATA + _TRANSLATIONS _DOCUMENTATION _EXAMPLES _DEMOS _SETTINGS + ) + set(miscpaths + CMAKE_ LDCONF_ PROFILE_ MAN_ APPLICATIONS_ PIXMAPS_ + ) + foreach(instpath ${instpaths}) + string(REGEX REPLACE ".*${CMAKE_INSTALL_PREFIX}/" "" modpath "${QT${instpath}_PATH}") + string(REGEX REPLACE ".*${CMAKE_INSTALL_PREFIX}" "" modpath "${modpath}") + set(QT${instpath}_PATH "${modpath}" PARENT_SCOPE) + # message(STATUS "QT${instpath}_PATH: ${modpath}") + endforeach() - foreach(instpath ${miscpaths}) - string(REGEX REPLACE ".*${CMAKE_INSTALL_PREFIX}/" "" modpath "${${instpath}INSTALL_PATH}") - string(REGEX REPLACE ".*${CMAKE_INSTALL_PREFIX}" "" modpath "${modpath}") - set(${instpath}INSTALL_PATH "${modpath}" PARENT_SCOPE) - # message(STATUS "${instpath}INSTALL_PATH: ${modpath}") - endforeach() - else() - set(CPACK_SET_DESTDIR TRUE) - endif() + foreach(instpath ${miscpaths}) + string(REGEX REPLACE ".*${CMAKE_INSTALL_PREFIX}/" "" modpath "${${instpath}INSTALL_PATH}") + string(REGEX REPLACE ".*${CMAKE_INSTALL_PREFIX}" "" modpath "${modpath}") + set(${instpath}INSTALL_PATH "${modpath}" PARENT_SCOPE) + # message(STATUS "${instpath}INSTALL_PATH: ${modpath}") + endforeach() endfunction() macro(KATIE_OPTIMIZE_HEADERS DIR) -- 2.11.0