From: bruneton Date: Tue, 2 Jul 2013 12:54:46 +0000 (+0000) Subject: CMake: minimal changes to compile under CMake without GUI. X-Git-Tag: B4CMakeModifs~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0b5b588eac0168bb3eda23e5bd1f057b30f511ea;p=modules%2Fmed.git CMake: minimal changes to compile under CMake without GUI. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ace05ba4..79e8c109e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,9 @@ IF(KERNEL_ROOT_DIR) SET(SALOME_MACROS_DIR ${KERNEL_ROOT_DIR}/salome_adm/cmake_files) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${SALOME_MACROS_DIR}) - find_package(PLATFORM) + INCLUDE(SalomeSetupPlatform) + INCLUDE(SalomeMacros) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindPYTHON.cmake) if(SALOME_USE_MPI) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindMPI.cmake) @@ -51,24 +53,26 @@ IF(KERNEL_ROOT_DIR) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindBOOST.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindLIBXML2.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindSWIG.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCppUnit.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindDOXYGEN.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSalomeLIBBATCH.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSphinx.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSalomeLibBatch.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindKERNEL.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindMEDFILE.cmake) + #INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindMEDFILE.cmake) SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR}) - FILE(TO_CMAKE_PATH $ENV{GUI_ROOT_DIR} GUI_ROOT_DIR) + FILE(TO_CMAKE_PATH "$ENV{GUI_ROOT_DIR}" GUI_ROOT_DIR) IF(GUI_ROOT_DIR) - SET(MED_ENABLE_GUI ON) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindCAS.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindQT4.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindOPENGL.cmake) - #INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindSalomeVTK.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindQWT.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindSIPPYQT.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindGUI.cmake) + LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files") + SET(MED_ENABLE_GUI ON) + #INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindCAS.cmake) + FIND_PACKAGE(SalomeCAS) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindQT4.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindOPENGL.cmake) + #INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindSalomeVTK.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindQWT.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindSIPPYQT.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindGUI.cmake) ENDIF(GUI_ROOT_DIR) ELSE(KERNEL_ROOT_DIR) SET(SALOME_MACROS_DIR ${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files) @@ -84,10 +88,10 @@ ELSE(KERNEL_ROOT_DIR) INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindLIBXML2.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindPTHREADS.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindSWIG.cmake) - INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindMEDFILE.cmake) + #INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindMEDFILE.cmake) ENDIF(KERNEL_ROOT_DIR) - +INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindMEDFILE.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindPARMETIS.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindMETIS.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSCOTCH.cmake) @@ -101,38 +105,25 @@ EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].spli OUTPUT_VARIABLE XVERSION) SET(MED_salomebin_BINS bin/salome) - SET(MED_salomelib_LIBS lib/salome) - SET(MED_salomeidl_IDLS idl/salome) SET(KERNEL_salomeidl_IDLS ${MED_salomeidl_IDLS}) - SET(MED_salomeinclude_HEADERS include/salome) - SET(MED_salomeres_DATA share/salome/resources/med) - SET(MED_salomeres_SCRIPTS share/salome/resources/med) - SET(MED_salomescript_SCRIPTS bin/salome) - SET(MED_salomescript_DATA bin/salome) - SET(MED_salomescript_PYTHON bin/salome) -SET(KERNEL_salomescript_PYTHON ${MED_salomescript_PYTHON}) - SET(MED_appliskel_SCRIPTS bin/salome/appliskel) - SET(MED_appliskel_PYTHON bin/salome/appliskel) - SET(MED_pythondir lib/python${PYTHON_VERSION}/site-packages) - SET(MED_salomepythondir ${MED_pythondir}/salome) -SET(KERNEL_salomepythondir ${MED_salomepythondir}) - SET(MED_sharedpkgpython_PYTHON ${MED_salomepythondir}/shared_modules) - SET(MED_admlocalcmake adm_local/cmake_files) +SET(KERNEL_salomescript_PYTHON ${MED_salomescript_PYTHON}) +SET(KERNEL_salomepythondir ${MED_salomepythondir}) + IF(MED_ENABLE_KERNEL) ADD_SUBDIRECTORY(idl) ELSE(MED_ENABLE_KERNEL) diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt index 570125d74..d5a94a34d 100644 --- a/idl/CMakeLists.txt +++ b/idl/CMakeLists.txt @@ -27,7 +27,7 @@ INCLUDE_DIRECTORIES( ) SET(SalomeIDLMED_IDLSOURCES - MED.idl + #MED.idl MEDCouplingCorbaServant.idl ParaMEDCouplingCorbaServant.idl MEDDataManager.idl diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 70b6e918c..a883b9bbc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -78,11 +78,11 @@ IF(MED_ENABLE_KERNEL) SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} ParaMEDCouplingCorba ParaMEDMEMComponent) ENDIF(MPI_IS_OK) IF(MED_ENABLE_MED3) - SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} MEDCalculator MEDOP) + SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} MEDCalculator) SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS}) ENDIF(MED_ENABLE_MED3) IF(MED_ENABLE_GUI) - SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS} MEDGUI) + SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS} MEDOP MEDGUI) ENDIF(MED_ENABLE_GUI) ENDIF(MED_ENABLE_KERNEL) diff --git a/src/MEDGUI/CMakeLists.txt b/src/MEDGUI/CMakeLists.txt index 93571d22d..b3d51fa6d 100644 --- a/src/MEDGUI/CMakeLists.txt +++ b/src/MEDGUI/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/UseQt4Ext.cmake) SET(MEDGUI_SOURCES MEDGUIFileContentDial.cxx diff --git a/src/MEDOP/gui/CMakeLists.txt b/src/MEDOP/gui/CMakeLists.txt index 2797efd63..71fe05104 100644 --- a/src/MEDOP/gui/CMakeLists.txt +++ b/src/MEDOP/gui/CMakeLists.txt @@ -19,7 +19,7 @@ ADD_SUBDIRECTORY(dialogs) -INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/UseQt4Ext.cmake) SET(MEDOPGUI_SOURCES MEDOPFactoryClient.cxx diff --git a/src/MEDOP/gui/dialogs/CMakeLists.txt b/src/MEDOP/gui/dialogs/CMakeLists.txt index a680315ea..8d0a38c01 100644 --- a/src/MEDOP/gui/dialogs/CMakeLists.txt +++ b/src/MEDOP/gui/dialogs/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/UseQt4Ext.cmake) MACRO (QT4_WRAP_UI_XX outfiles ) QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})