From caf236adb319bb111bf9029799cc4ddf86b77b37 Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 27 Jun 2016 11:53:54 +0300 Subject: [PATCH] SALOME configuration repository: 1) Remove unnecessary "include" 2) Use CONFIGURATION_ROOT_DIR instead KERNEL_ROOT_DIR. --- doc/salome/gui/CMakeLists.txt | 2 -- src/AppQuickStart/app-template/CMakeLists.txt | 11 ++++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/salome/gui/CMakeLists.txt b/doc/salome/gui/CMakeLists.txt index f211f8781..14d3f08d4 100755 --- a/doc/salome/gui/CMakeLists.txt +++ b/doc/salome/gui/CMakeLists.txt @@ -17,8 +17,6 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) - SALOME_CONFIGURE_FILE(doxyfile.in doxyfile) SALOME_CONFIGURE_FILE(static/header.html.in static/header.html) diff --git a/src/AppQuickStart/app-template/CMakeLists.txt b/src/AppQuickStart/app-template/CMakeLists.txt index edb4838ae..f1c320af5 100644 --- a/src/AppQuickStart/app-template/CMakeLists.txt +++ b/src/AppQuickStart/app-template/CMakeLists.txt @@ -33,12 +33,21 @@ SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) SET(${PROJECT_NAME_UC}_VERSION ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) + +# Common CMake macros +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() + # Find KERNEL # =========== 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") - INCLUDE(SalomeMacros) FIND_PACKAGE(SalomeKERNEL REQUIRED) KERNEL_WITH_CORBA() # check whether KERNEL builded with CORBA ELSE(EXISTS ${KERNEL_ROOT_DIR}) -- 2.39.2