From: mpv Date: Thu, 5 Jul 2018 13:14:23 +0000 (+0300) Subject: Issue #2553 Error while compiling Shaper on UB16 X-Git-Tag: V8_5_0p1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FBR_V8_5_0;p=modules%2Fshaper.git Issue #2553 Error while compiling Shaper on UB16 Added usage of SALOME procedure for searching Python is SALOME is found. --- diff --git a/CMakeCommon/Common.cmake b/CMakeCommon/Common.cmake index 5c45426fd..3e5d6abb3 100644 --- a/CMakeCommon/Common.cmake +++ b/CMakeCommon/Common.cmake @@ -17,7 +17,7 @@ ENDIF(WIN32) IF(UNIX) IF(CMAKE_COMPILER_IS_GNUCC) #C++11 is not supported on some platforms, disable it - MESSAGE(STATUS "Setting -std=c++0x flag for the gcc...") + #MESSAGE(STATUS "Setting -std=c++0x flag for the gcc...") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") #Supporting test coverage checks (gcov) in the DEBUG mode @@ -36,7 +36,7 @@ IF(UNIX) ENDIF(USE_TEST_COVERAGE) #SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -E") - MESSAGE(STATUS "gcc flags are: " ${CMAKE_CXX_FLAGS}) - MESSAGE(STATUS "linker flags are: " ${CMAKE_SHARED_LINKER_FLAGS}) + #MESSAGE(STATUS "gcc flags are: " ${CMAKE_CXX_FLAGS}) + #MESSAGE(STATUS "linker flags are: " ${CMAKE_SHARED_LINKER_FLAGS}) ENDIF(CMAKE_COMPILER_IS_GNUCC) ENDIF(UNIX) diff --git a/CMakeLists.txt b/CMakeLists.txt index d88849679..b28a3d5cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,12 +36,41 @@ INCLUDE(SalomeMacros) INCLUDE(FindEclipse) INCLUDE(Common) INCLUDE(FindSalomeQt5) -INCLUDE(FindPython) INCLUDE(FindSalome) INCLUDE(FindCAS) INCLUDE(FindSUIT) INCLUDE(FindTInspector) +IF(${HAVE_SALOME}) + SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files") + IF(EXISTS ${CONFIGURATION_ROOT_DIR}) + LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake") + INCLUDE(SalomeMacros) + ELSE() + MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !") + ENDIF() + SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL") + IF(EXISTS ${KERNEL_ROOT_DIR}) + LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files") + FIND_PACKAGE(SalomeKERNEL REQUIRED) + ADD_DEFINITIONS(${KERNEL_DEFINITIONS}) + INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS}) + ELSE(EXISTS ${KERNEL_ROOT_DIR}) + MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR") + ENDIF(EXISTS ${KERNEL_ROOT_DIR}) + INCLUDE(SalomeSetupPlatform) # From CONFIGURATION + + FIND_PACKAGE(SalomePythonInterp REQUIRED) + FIND_PACKAGE(SalomePythonLibs REQUIRED) + +ELSE(${HAVE_SALOME}) + INCLUDE(FindPython) +ENDIF(${HAVE_SALOME}) + +# Common CMake macros +# =================== + + # Find LibXml2 IF(DEFINED ENV{LIBXML2_ROOT_DIR}) IF(WIN32)