Strangely, running cmake -DCMAKE_INSTALL_PREFIX=/some/path does NOT
rewrite the cmake_install.cmake, but does rewrite the CMakeCache.txt and
other files. The result is a bad install path won't go away until one
manually removes the cmake_install.cmake file(s).
On Thu, Dec 4, 2014 at 9:48 PM, J
This looks like a bug to me. I have a very simple test case where
CMAKE_INSTALL_PREFIX is set correctly if I do so after the project()
statement, and fails to be set correctly if I do it before the project()
statement.
On Fri, Dec 5, 2014 at 2:06 PM, Chris Johnson cxjohn...@gmail.com wrote:
I have a global include file used by all of the CMakeLists.txt files in my
project. In it, I set the value of CMAKE_INSTALL_PREFIX, as well as a
number of other variables and functions.
In my CMakeLists.txt file, I had this:
cmake_minimum_require(VERSION 2.8.4)
include(global.inc)
I find it's better to define CMAKE_INSTALL_PREFIX on the command line when
building
I do have this bit of code...
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX
${CMAKE_BINARY_DIR}/../${CMAKE_BUILD_TYPE}_out CACHE PATH Install
default 'out' in this directory.