From: vsr Date: Thu, 18 Feb 2021 10:52:59 +0000 (+0300) Subject: CoTech 126.2: Use SalomeMacros.cmake from CONFIGURATION repository X-Git-Tag: V9_7_0a1~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6be99917aaca6ec5ca328053e3d078c1c4c193ac;p=modules%2Fshaper.git CoTech 126.2: Use SalomeMacros.cmake from CONFIGURATION repository --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d335e2991..33861baf1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,10 +43,10 @@ INCLUDE(FindSalome) INCLUDE(FindSUIT) INCLUDE(FindTInspector) -IF(${HAVE_SALOME}) +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") + SET(CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH}) INCLUDE(SalomeMacros) INCLUDE(FindSalomeQt5) ELSE() @@ -54,7 +54,6 @@ IF(${HAVE_SALOME}) 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}) @@ -63,8 +62,9 @@ IF(${HAVE_SALOME}) ENDIF(EXISTS ${KERNEL_ROOT_DIR}) SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI") IF(EXISTS ${GUI_ROOT_DIR}) - LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/salome_adm/cmake_files") FIND_PACKAGE(SalomeGUI REQUIRED) + ELSE(EXISTS ${GUI_ROOT_DIR}) + MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR") ENDIF(EXISTS ${GUI_ROOT_DIR}) INCLUDE(SalomeSetupPlatform) # From CONFIGURATION @@ -73,12 +73,12 @@ IF(${HAVE_SALOME}) FIND_PACKAGE(SalomeOpenCASCADE REQUIRED) -ELSE(${HAVE_SALOME}) +ELSE() INCLUDE(SalomeMacros) INCLUDE(FindSalomeQt5) INCLUDE(FindPython) INCLUDE(FindSalomeOpenCASCADE) -ENDIF(${HAVE_SALOME}) +ENDIF() # Common CMake macros # ===================