From: bruneton Date: Wed, 25 Sep 2013 07:23:42 +0000 (+0000) Subject: CMake: Python detection was not always seting PYTHON_ROOT_DIR! X-Git-Tag: begin_agr_portmanager_branch_131004~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=34dcdadbb0e381e83c8c2e4c542a42bb3795e1cd;p=modules%2Fkernel.git CMake: Python detection was not always seting PYTHON_ROOT_DIR! --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 74cf28b9d..f4f18e28c 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,7 @@ IF(SALOME_USE_LIBBATCH) ENDIF() FIND_PACKAGE(SalomePython REQUIRED) +message("PYTHON_ROOT_DIR ${PYTHON_ROOT_DIR}") FIND_PACKAGE(SalomePThread REQUIRED) FIND_PACKAGE(SalomeSWIG REQUIRED) FIND_PACKAGE(SalomeLibXml2 REQUIRED) @@ -237,6 +238,8 @@ SET(OMNIORB_ROOT_DIR "${OMNIORB_ROOT_DIR}") SET(OMNIORBPY_ROOT_DIR "${OMNIORBPY_ROOT_DIR}") SET(LIBBATCH_ROOT_DIR "${LIBBATCH_ROOT_DIR}") +message("PYTHON_ROOT_DIR ${PYTHON_ROOT_DIR}") + SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include") CONFIGURE_PACKAGE_CONFIG_FILE(salome_adm/cmake_files/${PROJECT_NAME}Config.cmake.in ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake diff --git a/salome_adm/cmake_files/FindSalomePython.cmake b/salome_adm/cmake_files/FindSalomePython.cmake index 26b86dcf7..7704148de 100644 --- a/salome_adm/cmake_files/FindSalomePython.cmake +++ b/salome_adm/cmake_files/FindSalomePython.cmake @@ -146,8 +146,13 @@ IF (SALOMEPYTHON_FOUND) ENDIF() ENDIF() - # 6. Specifics - # + ## + ## 6. Save the final detected installation + ## + SET(PYTHON_ROOT_DIR "${_tmp_ROOT_DIR}") + + ## 7. Specifics + ## # NumPy detection EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import numpy ; import sys ; sys.stdout.write(numpy.get_include())" OUTPUT_VARIABLE NUMPY_INCLUDE_DIR ERROR_QUIET )