From: bruneton Date: Fri, 21 Jun 2013 06:46:25 +0000 (+0000) Subject: CMake: Fixed bug at installation: directories should be set after X-Git-Tag: B4KillOfAutomake~39 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3775d94607f4d11f2fc054c5f356f911d2c33c6b;p=modules%2Fkernel.git CMake: Fixed bug at installation: directories should be set after prerequisite detection to have the correct Python version string. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index fc4c75bb2..b4c0ef9f9 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,39 +67,6 @@ OPTION(SALOME_PACO_PARALLEL "Build with PACO in parallel" OFF) OPTION(SALOME_LAUNCHER_ONLY "Build only the Launcher part" OFF) MARK_AS_ADVANCED(SALOME_LIGHT_ONLY SALOME_USE_LIBBATCH SALOME_PACO_PARALLEL SALOME_LAUNCHER_ONLY) -# Directories -# =========== -SET(SALOME_INSTALL_BINS bin/salome CACHE PATH "Install path: SALOME binaries") -SET(SALOME_INSTALL_LIBS lib/salome CACHE PATH "Install path: SALOME libs") -SET(SALOME_INSTALL_IDLS idl/salome CACHE PATH "Install path: SALOME IDL files") -SET(SALOME_INSTALL_HEADERS include/salome CACHE PATH "Install path: SALOME headers") -SET(SALOME_INSTALL_SCRIPT_SCRIPTS ${SALOME_INSTALL_BINS} CACHE PATH - "Install path: SALOME scripts") -SET(SALOME_INSTALL_SCRIPT_DATA ${SALOME_INSTALL_BINS} CACHE PATH - "Install path: SALOME script data") -SET(SALOME_INSTALL_SCRIPT_PYTHON ${SALOME_INSTALL_BINS} CACHE PATH - "Install path: SALOME Python scripts") -SET(SALOME_INSTALL_APPLISKEL_SCRIPTS ${SALOME_INSTALL_BINS}/appliskel CACHE PATH - "Install path: SALOME application skeleton - scripts") -SET(SALOME_INSTALL_APPLISKEL_PYTHON ${SALOME_INSTALL_BINS}/appliskel CACHE PATH - "Install path: SALOME application skeleton - Python") -SET(SALOME_INSTALL_CMAKE salome_adm/cmake_files CACHE PATH "Install path: SALOME CMake files") - -FIND_PACKAGE(PythonInterp) -SET(_pydir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) -SET(SALOME_INSTALL_PYTHON ${_pydir}/salome CACHE PATH "Install path: SALOME Python stuff") -SET(SALOME_INSTALL_PYTHON_SHARED ${SALOME_INSTALL_PYTHON}/shared_modules CACHE PATH - "Install path: SALOME Python shared modules") - -# Kernel specific: -SET(SALOME_KERNEL_INSTALL_RES_DATA share/salome/resources/kernel CACHE PATH "Install path: SALOME KERNEL specific data") -SET(SALOME_KERNEL_INSTALL_RES_SCRIPTS share/salome/resources/kernel CACHE PATH "Install path: SALOME KERNEL specific scripts") - -MARK_AS_ADVANCED(SALOME_INSTALL_BINS SALOME_INSTALL_LIBS SALOME_INSTALL_IDLS SALOME_INSTALL_HEADERS) -MARK_AS_ADVANCED(SALOME_INSTALL_SCRIPT_SCRIPTS SALOME_INSTALL_SCRIPT_DATA SALOME_INSTALL_SCRIPT_PYTHON) -MARK_AS_ADVANCED(SALOME_INSTALL_APPLISKEL_SCRIPTS SALOME_INSTALL_APPLISKEL_PYTHON SALOME_INSTALL_CMAKE) -MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED SALOME_KERNEL_INSTALL_RES_DATA SALOME_KERNEL_INSTALL_RES_SCRIPTS) - # Required prerequisites # Find "big" prerequisites first - they reference themselves many others # -> this can help finding the smaller prerequisites and detect conficts. @@ -148,6 +115,42 @@ IF(SALOME_BUILD_DOC) FIND_PACKAGE(SalomeSphinx REQUIRED) ENDIF() +# Directories +# +# Directories have to be given after prerequisites (to be able to use +# Python version string for example). +# =========== +SET(SALOME_INSTALL_BINS bin/salome CACHE PATH "Install path: SALOME binaries") +SET(SALOME_INSTALL_LIBS lib/salome CACHE PATH "Install path: SALOME libs") +SET(SALOME_INSTALL_IDLS idl/salome CACHE PATH "Install path: SALOME IDL files") +SET(SALOME_INSTALL_HEADERS include/salome CACHE PATH "Install path: SALOME headers") +SET(SALOME_INSTALL_SCRIPT_SCRIPTS ${SALOME_INSTALL_BINS} CACHE PATH + "Install path: SALOME scripts") +SET(SALOME_INSTALL_SCRIPT_DATA ${SALOME_INSTALL_BINS} CACHE PATH + "Install path: SALOME script data") +SET(SALOME_INSTALL_SCRIPT_PYTHON ${SALOME_INSTALL_BINS} CACHE PATH + "Install path: SALOME Python scripts") +SET(SALOME_INSTALL_APPLISKEL_SCRIPTS ${SALOME_INSTALL_BINS}/appliskel CACHE PATH + "Install path: SALOME application skeleton - scripts") +SET(SALOME_INSTALL_APPLISKEL_PYTHON ${SALOME_INSTALL_BINS}/appliskel CACHE PATH + "Install path: SALOME application skeleton - Python") +SET(SALOME_INSTALL_CMAKE salome_adm/cmake_files CACHE PATH "Install path: SALOME CMake files") + +FIND_PACKAGE(PythonInterp) +SET(_pydir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) +SET(SALOME_INSTALL_PYTHON ${_pydir}/salome CACHE PATH "Install path: SALOME Python stuff") +SET(SALOME_INSTALL_PYTHON_SHARED ${SALOME_INSTALL_PYTHON}/shared_modules CACHE PATH + "Install path: SALOME Python shared modules") + +# Kernel specific: +SET(SALOME_KERNEL_INSTALL_RES_DATA share/salome/resources/kernel CACHE PATH "Install path: SALOME KERNEL specific data") +SET(SALOME_KERNEL_INSTALL_RES_SCRIPTS share/salome/resources/kernel CACHE PATH "Install path: SALOME KERNEL specific scripts") + +MARK_AS_ADVANCED(SALOME_INSTALL_BINS SALOME_INSTALL_LIBS SALOME_INSTALL_IDLS SALOME_INSTALL_HEADERS) +MARK_AS_ADVANCED(SALOME_INSTALL_SCRIPT_SCRIPTS SALOME_INSTALL_SCRIPT_DATA SALOME_INSTALL_SCRIPT_PYTHON) +MARK_AS_ADVANCED(SALOME_INSTALL_APPLISKEL_SCRIPTS SALOME_INSTALL_APPLISKEL_PYTHON SALOME_INSTALL_CMAKE) +MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED SALOME_KERNEL_INSTALL_RES_DATA SALOME_KERNEL_INSTALL_RES_SCRIPTS) + # Sources # ======== IF(NOT SALOME_LIGHT_ONLY)