[cmake-developers] [CMake 0014450]: CMAKE_INSTALL_PREFIX scope

Mantis Bug Tracker mantis at public.kitware.com
Tue Oct 1 10:56:00 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14450 
====================================================================== 
Reported By:                georgeg
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14450
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2013-10-01 10:55 EDT
Last Modified:              2013-10-01 10:55 EDT
====================================================================== 
Summary:                    CMAKE_INSTALL_PREFIX scope
Description: 
The goal is that to install subdirectory in a custom path (usualy a child of the
top directory install path)
the top directory has no sources by itself but is only a container for the
subdirectories (the root of a project with other subprojects)

running make install in top directory will not obey the CMAKE_INSTALL_PREFIX
that we set in each subdirectory. instead, the default top directory
CMAKE_INSTALL_PREFIX value is used 

Steps to Reproduce: 
create one subdirectory and 2 cmake lists:
CMakeLists.txt:

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(cmaketest)
ADD_SUBDIRECTORY(1)

1/CMakeLists.txt:

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(cmaketest1)
SET(CMAKE_INSTALL_PREFIX /tmp/cmaketest/1)
MESSAGE ("1: CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
INSTALL(FILES 1.h DESTINATION include)


Additional Information: 
note the directory "1" must be created and a demo header file in it: "1.h"
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-10-01 10:55 georgeg        New Issue                                    
======================================================================




More information about the cmake-developers mailing list