View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009183CMakeCMakepublic2009-06-19 09:402015-07-08 08:57
ReporterGavin Beatty 
Assigned ToBill Hoffman 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionno change required 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0009183: No way to determine full install prefix (including DESTDIR)
DescriptionSometimes it is useful at install time to edit or delete files instead of using the install() variants.

Example: I would like to delete all old Export${project}.cmake files installed previously at install time. This prevents inclusion of Export${project}-${buildtype}.cmake variants that no longer apply (as there is an include glob in the generated Export${project}.cmake)

My feature request is for a command, macro or variable to give the actual install prefix that install() uses.
Additional InformationI have been hindered in writing a macro for this myself because of bug 0009182 which I reported today.

Here was my attempt:

macro(macro_install_prefix _var)
    set(_destdir "$ENV{DESTDIR}")
    if("${_destdir}" STREQUAL "")
        file(TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" "${_var}")
    else("${_destdir}" STREQUAL "")
        file(TO_CMAKE_PATH "${_destdir}/${CMAKE_INSTALL_PREFIX}" "${_var}")
    endif("${_destdir}" STREQUAL "")
endmacro(macro_install_prefix _var)
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0017446)
Bill Hoffman (manager)
2009-09-14 13:18

Not sure I understand what you want?
(0038088)
Stephen Kelly (developer)
2015-02-26 16:09

$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX} can be used in install scripts.
(0039078)
Robert Maynard (manager)
2015-07-08 08:57

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2009-06-19 09:40 Gavin Beatty New Issue
2009-09-14 13:18 Bill Hoffman Status new => assigned
2009-09-14 13:18 Bill Hoffman Assigned To => Bill Hoffman
2009-09-14 13:18 Bill Hoffman Note Added: 0017446
2015-02-26 16:09 Stephen Kelly Note Added: 0038088
2015-02-26 16:09 Stephen Kelly Status assigned => resolved
2015-02-26 16:09 Stephen Kelly Resolution open => no change required
2015-07-08 08:57 Robert Maynard Note Added: 0039078
2015-07-08 08:57 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team