I have this piece of CMake code:
if ( CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT )
set ( CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" )
endif()
message ( "CMAKE_INSTALL_PREFIX: " ${CMAKE_INSTALL_PREFIX} )
The first time I run cmake it correctly shows CMAKE_INSTALL_PREFIX pointing to my build_dir/install
The second time I run cmake, it gets back to /usr/local.
What's wrong ?