environnement_prefix.cmake 909 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

# Setting the default phoenix install prefix
set(PHOENIX_INSTALL_PREFIX "$ENV{HOME}/usr" CACHE STRING "Phoenix Install prefix" FORCE)

if(DEFINED ENV{CONDA_PREFIX})
	message(STATUS "Find conda variable CONDA_PREFIX = '$ENV{CONDA_PREFIX}' used as new install prefix")
	set(PHOENIX_INSTALL_PREFIX "$ENV{CONDA_PREFIX}" CACHE STRING "Phoenix Install prefix" FORCE)
endif()

if(DEFINED ENV{CONDA_ENV_PATH})
	message(STATUS "Find conda variable CONDA_ENV_PATH = '$ENV{CONDA_ENV_PATH}' used as new install prefix")
	set(PHOENIX_INSTALL_PREFIX "$ENV{CONDA_ENV_PATH}" CACHE STRING "Phoenix Install prefix" FORCE)
endif()

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
	set(CMAKE_INSTALL_PREFIX "${PHOENIX_INSTALL_PREFIX}" CACHE PATH "cmake install prefix" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)

set(CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake CACHE STRING "cmake module path" FORCE)