From 627be210bf1d446a1dc444b4148401a6e9cbd299 Mon Sep 17 00:00:00 2001 From: adam Date: Mon, 1 Dec 2008 15:48:13 +0000 Subject: [PATCH] Mutualize cmake inclusions --- salome_adm/cmake_files/am2cmake.py | 49 +++++++++++++----------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index 4a78f1e67..3bdf93657 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -219,30 +219,9 @@ class CMakeFile(object): INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) """) pass - elif self.module == "gui": - newlines.append(""" - SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR}) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindCAS.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindQT4.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindOPENGL.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindVTK.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindQWT.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake) - """) else: newlines.append(""" SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR}) - SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR}) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) @@ -253,14 +232,28 @@ class CMakeFile(object): INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindCAS.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQT4.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindOPENGL.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindVTK.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQWT.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindGUI.cmake) """) + if self.module == "gui": + newlines.append(""" + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindCAS.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindQT4.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindOPENGL.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindVTK.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindQWT.cmake) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake) + """) + else: + newlines.append(""" + SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR}) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindCAS.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQT4.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindOPENGL.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindVTK.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQWT.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindGUI.cmake) + """) + pass pass # -- if self.module == "kernel": -- 2.39.2