]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
CMake: Python detection was not always seting PYTHON_ROOT_DIR!
authorbruneton <bruneton>
Wed, 25 Sep 2013 07:23:42 +0000 (07:23 +0000)
committerbruneton <bruneton>
Wed, 25 Sep 2013 07:23:42 +0000 (07:23 +0000)
CMakeLists.txt
salome_adm/cmake_files/FindSalomePython.cmake

index 74cf28b9d308b9f54712a5147f3b69f1c6b92f1c..f4f18e28c4d82fc6a8a53e7a98d7f29eab71d3b1 100755 (executable)
@@ -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
index 26b86dcf7c0ecae93a9df54b091dd77be6bba203..7704148dec791bb16076d8ea11de7b4ec993b314 100644 (file)
@@ -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 )