]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
CoTech 126.2: Use SalomeMacros.cmake from CONFIGURATION repository
authorvsr <vsr@opencascade.com>
Thu, 18 Feb 2021 10:52:59 +0000 (13:52 +0300)
committervsr <vsr@opencascade.com>
Thu, 18 Feb 2021 10:54:19 +0000 (13:54 +0300)
CMakeLists.txt

index d335e299187c34cf5ed7031269a76dfb6dfe473d..33861baf115472669be8bdc74ae61aac63dcdb5f 100644 (file)
@@ -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
 # ===================