From 5afc7437884016f4c6b139e63ba8176cb52911f1 Mon Sep 17 00:00:00 2001 From: nge Date: Wed, 13 Feb 2013 17:42:41 +0000 Subject: [PATCH] Integration of new CMake procedure --- CMakeLists.txt | 295 ++++++++++++++++-- adm_local/cmake_files/FindCAS.cmake | 257 +++++++-------- adm_local/cmake_files/FindQWT.cmake | 38 ++- doc/salome/gui/CMakeLists.txt | 46 +-- idl/CMakeLists.txt | 5 +- src/CAF/CMakeLists.txt | 7 +- src/CAM/CMakeLists.txt | 9 +- src/CASCatch/CMakeLists.txt | 5 +- src/CMakeLists.txt | 52 +-- src/DDS/CMakeLists.txt | 5 +- src/Event/CMakeLists.txt | 9 +- src/GLViewer/CMakeLists.txt | 11 +- src/GUI_PY/CMakeLists.txt | 4 +- src/GuiHelpers/CMakeLists.txt | 9 +- src/LightApp/CMakeLists.txt | 105 +++---- src/LogWindow/CMakeLists.txt | 9 +- src/OBJECT/CMakeLists.txt | 9 +- src/OCCViewer/CMakeLists.txt | 15 +- src/ObjBrowser/CMakeLists.txt | 9 +- src/OpenGLUtils/CMakeLists.txt | 6 +- src/Plot2d/CMakeLists.txt | 16 +- src/Prs/CMakeLists.txt | 3 +- src/PyConsole/CMakeLists.txt | 10 +- src/PyInterp/CMakeLists.txt | 10 +- src/QDS/CMakeLists.txt | 10 +- src/Qtx/CMakeLists.txt | 10 +- src/QxGraph/CMakeLists.txt | 10 +- src/QxScene/CMakeLists.txt | 10 +- src/ResExporter/CMakeLists.txt | 7 +- src/SALOME_PY/CMakeLists.txt | 17 +- src/SALOME_PYQT/CMakeLists.txt | 4 +- .../SALOME_PYQT_GUI/CMakeLists.txt | 18 +- .../SALOME_PYQT_GUILight/CMakeLists.txt | 21 +- src/SALOME_PYQT/SalomePyQt/CMakeLists.txt | 24 +- src/SALOME_SWIG/CMakeLists.txt | 9 +- src/SOCC/CMakeLists.txt | 10 +- src/SPlot2d/CMakeLists.txt | 9 +- src/STD/CMakeLists.txt | 10 +- src/SUIT/CMakeLists.txt | 10 +- src/SUITApp/CMakeLists.txt | 25 +- src/SUPERVGraph/CMakeLists.txt | 11 +- src/SVTK/CMakeLists.txt | 19 +- src/SalomeApp/CMakeLists.txt | 23 +- src/SalomeApp/Test/CMakeLists.txt | 7 +- src/Session/CMakeLists.txt | 49 ++- src/Session/Session_ServerLauncher.hxx | 2 +- src/Session/Session_ServerThread.hxx | 2 +- src/Style/CMakeLists.txt | 10 +- src/TOOLSGUI/CMakeLists.txt | 12 +- src/TreeData/CMakeLists.txt | 18 +- src/TreeData/Test/CMakeLists.txt | 10 +- src/VTKViewer/CMakeLists.txt | 10 +- src/ViewerTools/CMakeLists.txt | 9 +- tools/dlgfactory/CMakeLists.txt | 95 ++++++ tools/dlgfactory/GenericDialog.hxx | 2 +- tools/dlgfactory/Makefile.am | 8 - tools/dlgfactory/__GDIALOG__.hxx | 2 +- tools/dlgfactory/__QDIALOG__.hxx | 2 +- tools/vtkEDFOverloads/CMakeLists.txt | 12 +- 59 files changed, 871 insertions(+), 580 deletions(-) create mode 100755 tools/dlgfactory/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 799ed6489..ddc560ba9 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,56 +16,283 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +PROJECT(SALOME_GUI) -CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR) IF(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) ENDIF(COMMAND cmake_policy) +IF(APPLE) + SET(CMAKE_C_COMPILER gcc) + SET(CMAKE_CXX_COMPILER g++) + # because default is clang(llvm) with mountain lion at least +ENDIF(APPLE) + # Temporary definitions SET(DOXYGEN_IS_OK 0) IF(WINDOWS) SET(CPPUNIT_IS_OK 0) ENDIF(WINDOWS) -SET(GUI_ENABLE_CORBA ON) -SET(ENABLE_VTKVIEWER ON) -SET(ENABLE_SALOMEOBJECT ON) -SET(ENABLE_OCCVIEWER ON) -SET(ENABLE_GLVIEWER ON) -SET(ENABLE_PLOT2DVIEWER ON) -SET(ENABLE_PYCONSOLE ON) -SET(ENABLE_SUPERVGRAPHVIEWER ON) -SET(ENABLE_QXGRAPHVIEWER ON) + +#Defining all options first +option(SALOME_USE_MPI "Use MPI containers" OFF) +option(SALOME_USE_CORBA "Use distribute application with components" ON) +option(SALOME_USE_DOC "Generate documentation" ON) +option(SALOME_USE_TEST "Generate test" OFF) +OPTION(SALOME_USE_VTKVIEWER "Enable VTK visualization (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_SALOMEOBJECT "Enable Salome Object (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_OCCVIEWER "Enable OCC visualization (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_GLVIEWER "Enable OpenGL visualization (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_PLOT2DVIEWER "Enable Plot2D visualization (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_PYCONSOLE "Enable Python GUI interface (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_SUPERVGRAPHVIEWER "Enable Supervision visualization (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_QXGRAPHVIEWER "Enable QX graph visualization (Mandatory in classic configurations)" ON) ENABLE_TESTING() SET(VERSION "6.6.0") SET(VERSION_DEV "1") -SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR}) -IF(KERNEL_ROOT_DIR) - STRING(REPLACE "\\" "/" KERNEL_ROOT_DIR ${KERNEL_ROOT_DIR}) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) +SET(BUILD_SHARED_LIBS true) + +SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL") +IF(EXISTS ${KERNEL_ROOT_DIR}) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) +ELSE(EXISTS ${KERNEL_ROOT_DIR}) + MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR") +ENDIF(EXISTS ${KERNEL_ROOT_DIR}) + +STRING(REPLACE "\\" "/" KERNEL_ROOT_DIR ${KERNEL_ROOT_DIR}) +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) + + +# Threads +SET(CMAKE_THREAD_PREFER_PTHREAD) +find_package(Threads REQUIRED) + + +# Python +set(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR} CACHE PATH "Path to Python directory") +if(EXISTS ${PYTHON_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${PYTHON_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${PYTHON_ROOT_DIR}/lib) + set(CMAKE_PROGRAM_PATH ${PYTHON_ROOT_DIR}/bin) +endif(EXISTS ${PYTHON_ROOT_DIR}) +find_package(PythonInterp REQUIRED) +# Set PythonLibs_FIND_VERSION To avoid problems when several versions are in the system +SET(PythonLibs_FIND_VERSION ${PYTHON_VERSION_STRING}) +find_package(PythonLibs REQUIRED) +set(PYLOGLEVEL WARNING) + +# Swig +set(SWIG_ROOT_DIR $ENV{SWIG_ROOT_DIR} CACHE PATH "Path to Swig directory") +if(EXISTS ${SWIG_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${SWIG_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${SWIG_ROOT_DIR}/lib) + set(CMAKE_PROGRAM_PATH ${SWIG_ROOT_DIR}/bin) +endif(EXISTS ${SWIG_ROOT_DIR}) +find_package(SWIG REQUIRED) + +# LIBXML2 +set(LIBXML2_ROOT_DIR $ENV{LIBXML2_ROOT_DIR} CACHE PATH "Path to LibXml2 directory") +if(EXISTS ${LIBXML2_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${LIBXML2_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${LIBXML2_ROOT_DIR}/lib) + set(CMAKE_PROGRAM_PATH ${LIBXML2_ROOT_DIR}/bin) +endif(EXISTS ${LIBXML2_ROOT_DIR}) +find_package(LibXml2 REQUIRED) +if(${LIBXML2_VERSION_STRING} VERSION_LESS "2.7.8") + message(FATAL_ERROR "LIbXml2 required version is 2.7.8, version is ${LIBXML2_VERSION_STRING} , please defined LIBXML2_ROOT_DIR as environment or cmake variable") +endif(${LIBXML2_VERSION_STRING} VERSION_LESS "2.7.8") + + +# HDF5 +set(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to Hdf5 directory") +if(EXISTS ${HDF5_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${HDF5_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${HDF5_ROOT_DIR}/lib) + set(CMAKE_PROGRAM_PATH ${HDF5_ROOT_DIR}/bin) +endif(EXISTS ${HDF5_ROOT_DIR}) +find_package(HDF5 COMPONENTS C REQUIRED) +if (HDF5_FOUND) + set(HDF5_DEFINITIONS "-DH5_USE_16_API ${HDF5_DEFINITIONS}" ) + if(WINDOWS) + set(HDF5_DEFINITIONS "-D_HDF5USEDLL_ ${HDF5_DEFINITIONS}" ) + endif(WINDOWS) +endif(HDF5_FOUND) + +# MPI +if(SALOME_USE_MPI OR HDF5_IS_PARALLEL) + set(MPI_ROOT_DIR $ENV{MPI_ROOT_DIR} CACHE PATH "Path to Mpi directory") + if(EXISTS ${MPI_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${MPI_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${MPI_ROOT_DIR}/lib) + set(CMAKE_PROGRAM_PATH ${MPI_ROOT_DIR}/bin) + endif(EXISTS ${MPI_ROOT_DIR}) + find_package(MPI REQUIRED) + if(HDF5_IS_PARALLEL) + set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} ${MPI_C_INCLUDE_PATH} ${MPI_CXX_INCLUDE_PATH} ) + set(HDF5_LIBRARIES ${HDF5_LIBRARIES} ${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES}) + endif(HDF5_IS_PARALLEL) +endif(SALOME_USE_MPI OR HDF5_IS_PARALLEL) + +# Omniorb +if(SALOME_USE_CORBA) 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/FindMPI.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) +endif(SALOME_USE_CORBA) + +# Boost +set(Boost_ROOT_DIR $ENV{Boost_ROOT_DIR} CACHE PATH "Path to Boost directory") +if(EXISTS ${Boost_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${Boost_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${Boost_ROOT_DIR}/lib) +endif(EXISTS ${Boost_ROOT_DIR}) +set(Boost_USE_STATIC_LIBS OFF) +set(Boost_USE_MULTITHREADED ON) +set(Boost_USE_STATIC_RUNTIME OFF) +#find_package( Boost 1.49 REQUIRED )#COMPONENTS thread date_time signals filesystem system) +find_package( Boost REQUIRED )#COMPONENTS thread date_time signals filesystem system) +if(WINDOWS) + set(BOOST_DEFINITIONS -DBOOST_DISABLE_ASSERTS) +endif(WINDOWS) + +# CPPUNIT +if(SALOME_USE_TEST) + set(CPPUNIT_ROOT_DIR $ENV{CPPUNIT_ROOT_DIR} CACHE PATH "Path to Cppunit directory") + if(EXISTS ${CPPUNIT_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${CPPUNIT_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${CPPUNIT_ROOT_DIR}/lib) + set(CMAKE_PROGRAM_PATH ${CPPUNIT_ROOT_DIR}/bin) + endif(EXISTS ${CPPUNIT_ROOT_DIR}) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBBATCH.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) -ENDIF(KERNEL_ROOT_DIR) +endif(SALOME_USE_TEST) + +# Doxygen and graphviz +if(SALOME_USE_DOC) + set(DOXYGEN_ROOT_DIR $ENV{DOXYGEN_ROOT_DIR} CACHE PATH "Path to Doxygen directory") + set(GRAPHVIZ_ROOT_DIR $ENV{GRAPHVIZ_ROOT_DIR} CACHE PATH "Path to Graphviz directory") + if(EXISTS ${DOXYGEN_ROOT_DIR}) + set(CMAKE_PROGRAM_PATH ${DOXYGEN_ROOT_DIR}/bin) + endif(EXISTS ${DOXYGEN_ROOT_DIR}) + if(EXISTS ${GRAPHVIZ_ROOT_DIR}) + set(CMAKE_PROGRAM_PATH ${GRAPHVIZ_ROOT_DIR}/bin) + if(EXISTS ${DOXYGEN_ROOT_DIR}) + set(CMAKE_PROGRAM_PATH ${GRAPHVIZ_ROOT_DIR}/bin ${DOXYGEN_ROOT_DIR}/bin) + endif(EXISTS ${DOXYGEN_ROOT_DIR}) + endif(EXISTS ${GRAPHVIZ_ROOT_DIR}) + find_package(Doxygen) +endif(SALOME_USE_DOC) + +# Sphinx +if(SALOME_USE_DOC) + set(SPHINX_ROOT_DIR $ENV{SPHINX_ROOT_DIR} CACHE PATH "Path to Sphinx directory") + if(EXISTS ${SPHINX_ROOT_DIR}) + set(CMAKE_PROGRAM_PATH ${SPHINX_ROOT_DIR}/bin) + endif(EXISTS ${SPHINX_ROOT_DIR}) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake) +endif(SALOME_USE_DOC) + +# Qt 4 +#set(QT_MIN_VERSION 4.8.0) +set(QT_ROOT_DIR $ENV{QT_ROOT_DIR} CACHE PATH "Path to Qt directory") +if(EXISTS ${QT_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${QT_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${QT_ROOT_DIR}/lib) + set(CMAKE_PROGRAM_PATH ${QT_ROOT_DIR}/bin) +endif(EXISTS ${QT_ROOT_DIR}) +find_package(Qt4 REQUIRED QtCore QtGui QtXml QtWebKit QtOpenGL) +IF(NOT QT4_FOUND) + MESSAGE(FATAL_ERROR "Qt4 not found, please set QT_ROOT_DIR environment or cmake variable") +ELSE(NOT QT4_FOUND}) + INCLUDE(${QT_USE_FILE}) +ENDIF(NOT QT4_FOUND) + +# OpenCascade +if(SALOME_USE_OCCVIEWER) + set(CAS_ROOT_DIR $ENV{CAS_ROOT_DIR} CACHE PATH "Path to OpenCascade directory") + if(EXISTS ${CAS_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${CAS_ROOT_DIR}/inc) + set(CMAKE_PROGRAM_PATH ${CAS_ROOT_DIR}/bin) + if(WINDOWS) + if(CMAKE_BUILD_TYPE STREQUAL Debug) + set(CMAKE_LIBRARY_PATH ${CAS_ROOT}/win32/libd) + else(CMAKE_BUILD_TYPE STREQUAL Debug) + set(CMAKE_LIBRARY_DIR ${CAS_ROOT}/win32/lib) + endif(CMAKE_BUILD_TYPE STREQUAL Debug) + else(WINDOWS) + set(CMAKE_LIBRARY_PATH ${CAS_ROOT_DIR}/lib) + endif(WINDOWS) + endif(EXISTS ${CAS_ROOT_DIR}) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindCAS.cmake) +endif(SALOME_USE_OCCVIEWER) + +# OpenGL +if(SALOME_USE_GLVIEWER) + find_package(OpenGL REQUIRED) +endif(SALOME_USE_GLVIEWER) + +# VTK +if(SALOME_USE_VTKVIEWER) + set(PARAVIEW_ROOT_DIR $ENV{PARAVIEW_ROOT_DIR} CACHE PATH "Path to ParaView directory") + set(PARAVIEW_VERSION $ENV{PARAVIEW_VERSION} CACHE STRING "Version of Paraview") + if(EXISTS ${PARAVIEW_ROOT_DIR}) + set(VTK_DIR ${PARAVIEW_ROOT_DIR}/lib/paraview-${PARAVIEW_VERSION} CACHE PATH "Path to directory including VTKConfig.cmake") + endif(EXISTS ${PARAVIEW_ROOT_DIR}) + find_package(VTK REQUIRED) + if (VTK_FOUND) + include(${VTK_USE_FILE}) + message(STATUS "VTK version is ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}") + message(STATUS "Kit VTK availables : ${VTK_KITS}") + message(STATUS "VTK Library dir is : ${VTK_LIBRARY_DIRS}") + set(CMAKE_LIBRARY_PATH ${VTK_LIBRARY_DIRS}) + set(VTK_LIBSWENEED vtkCommon vtkGraphics vtkImaging vtkFiltering vtkIO vtkRendering vtkHybrid vtkParallel vtkWidgets vtkInfovis vtkVolumeRendering) + unset(VTK_LIBRARIES) + foreach(VTK_LIB_NEEDED ${VTK_LIBSWENEED}) + unset(VTK_LIB CACHE) + find_library(VTK_LIB ${VTK_LIB_NEEDED}) + set(VTK_LIBRARIES ${VTK_LIBRARIES} ${VTK_LIB}) + endforeach(VTK_LIB_NEEDED) + find_library(vtkCommonPythonD vtkCommonPythonD) + find_library(vtkGraphicsPythonD vtkGraphicsPythonD) + find_library(vtkImagingPythonD vtkImagingPythonD) + find_library(vtkPythonCore vtkPythonCore) + endif(VTK_FOUND) +endif(SALOME_USE_VTKVIEWER) + +# QWT +if(SALOME_USE_PLOT2DVIEWER) + set(QWT_ROOT_DIR $ENV{QWT_ROOT_DIR} CACHE PATH "Path to Qwt directory") + if(EXISTS ${QWT_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${QWT_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${QWT_ROOT_DIR}/lib) + set(CMAKE_PROGRAM_PATH ${QWT_ROOT_DIR}/bin) + endif(EXISTS ${QWT_ROOT_DIR}) + INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindQWT.cmake) +endif(SALOME_USE_PLOT2DVIEWER) + +# Sip +set(SIP_ROOT_DIR $ENV{SIP_ROOT_DIR} CACHE PATH "Path to Sip directory") +if(EXISTS ${SIP_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${SIP_ROOT_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} ${SIP_ROOT_DIR}/include) + set(CMAKE_PROGRAM_PATH ${SIP_ROOT_DIR}/bin) +endif(EXISTS ${SIP_ROOT_DIR}) +find_program(SIP_EXECUTABLE sip REQUIRED) +find_path(SIP_INCLUDE_DIR sip.h REQUIRED) -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) +# PyQt4 +set(PYQT_ROOT_DIR $ENV{PYQT_ROOT_DIR} CACHE PATH "Path to PyQt4 directory") +if(EXISTS ${PYQT_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${PYQT_ROOT_DIR}/share/sip ${PYQT_ROOT_DIR}/sip) + set(CMAKE_PROGRAM_PATH ${PYQT_ROOT_DIR}/bin) +endif(EXISTS ${PYQT_ROOT_DIR}) +FIND_PROGRAM(PYQT_PYUIC_EXECUTABLE NAMES pyuic4 pyuic4.bat) +FIND_PATH(PYQT_SIPS_DIR NAMES QtCore QtGui QtXml QtOpenGL QtAssistant QtDesigner QtNetwork QtSql QtSvg QtTest HINTS /usr/share/sip/PyQt4) +SET(PYQT_SIPFLAGS -s .cc -c . -t Qt_${QT_VERSION_MAJOR}_${QT_VERSION_MINOR}_${QT_VERSION_PATCH} -t WS_X11 + -I ${PYQT_SIPS_DIR} + -I ${PYQT_SIPS_DIR}/QtCore -I ${PYQT_SIPS_DIR}/QtGui -I ${PYQT_SIPS_DIR}/QtXml -I ${PYQT_SIPS_DIR}/QtOpenGL + -I ${PYQT_SIPS_DIR}/QtAssistant -I ${PYQT_SIPS_DIR}/QtDesigner -I ${PYQT_SIPS_DIR}/QtNetwork -I ${PYQT_SIPS_DIR}/QtSql + -I ${PYQT_SIPS_DIR}/QtSvg -I ${PYQT_SIPS_DIR}/QtTest ) EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].split(\".\") ; t[:]=(int(elt) for elt in t) ; sys.stdout.write(\"0x%02x%02x%02x\"%tuple(t))" ${VERSION} OUTPUT_VARIABLE XVERSION) @@ -94,7 +321,7 @@ SET(GUI_appliskel_SCRIPTS bin/salome/appliskel) SET(GUI_appliskel_PYTHON bin/salome/appliskel) -SET(GUI_pythondir lib/python${PYTHON_VERSION}/site-packages) +SET(GUI_pythondir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) SET(GUI_salomepythondir ${GUI_pythondir}/salome) SET(KERNEL_salomepythondir ${GUI_salomepythondir}) @@ -104,9 +331,9 @@ SET(GUI_sharedpkgpython_PYTHON ${GUI_salomepythondir}/shared_modules) SET(GUI_admlocalcmake adm_local/cmake_files) SET(IDLDIR) -IF(GUI_ENABLE_CORBA) +IF(SALOME_USE_CORBA) SET(IDLDIR idl) -ENDIF(GUI_ENABLE_CORBA) +ENDIF(SALOME_USE_CORBA) SET(SUBDIRS ${IDLDIR} diff --git a/adm_local/cmake_files/FindCAS.cmake b/adm_local/cmake_files/FindCAS.cmake index 4b72de6eb..65e3439a8 100644 --- a/adm_local/cmake_files/FindCAS.cmake +++ b/adm_local/cmake_files/FindCAS.cmake @@ -17,14 +17,13 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(CASROOT $ENV{CASROOT}) - # SET(OCC_VERSION_MAJOR 6) # SET(OCC_VERSION_MINOR 3) # SET(OCC_VERSION_MAINTENANCE 10) SET(OCC_VERSION_DEVELOPMENT 0) -FIND_FILE(ff Standard_Version.hxx ${CASROOT}/include/opencascade ${CASROOT}/inc) +FIND_FILE(ff Standard_Version.hxx) + IF(ff) FILE(STRINGS ${ff} OCC_VERSION_DEVELOPMENT_STR REGEX "^ *#define OCC_VERSION_DEVELOPMENT.*$") @@ -33,155 +32,135 @@ IF(ff) ENDIF(OCC_VERSION_DEVELOPMENT_STR) ENDIF(ff) -SET(CAS_CPPFLAGS) -# SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -DOCC_VERSION_MAJOR=${OCC_VERSION_MAJOR}) -# SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -DOCC_VERSION_MINOR=${OCC_VERSION_MINOR}) -# SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -DOCC_VERSION_MAINTENANCE=${OCC_VERSION_MAINTENANCE}) -SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -DLIN -DLINTEL -DCSFDB) SET(CAS_DEFINITIONS "-DLIN -DLINTEL -DCSFDB") -SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -DNo_exception) SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DNo_exception") -SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -DHAVE_CONFIG_H) SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DHAVE_CONFIG_H") -SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -DHAVE_LIMITS_H) -SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DHAVE_LIMITS_H") -SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -I${CASROOT}/inc) # to be removed -SET(CAS_INCLUDE_DIRS ${CASROOT}/inc) +SET(CAS_INCLUDE_DIRS ${CAS_ROOT_DIR}/inc) IF(CMAKE_SIZEOF_VOID_P STREQUAL 8) - SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -D_OCC64) + SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -D_OCC64") ENDIF(CMAKE_SIZEOF_VOID_P STREQUAL 8) IF(NOT WINDOWS) - FIND_LIBRARY(Xmu Xmu) + FIND_LIBRARY(CAS_Xmu Xmu) IF(Xmu) SET(CAS_LDPATH ${Xmu}) ENDIF(Xmu) ENDIF(NOT WINDOWS) -IF(WINDOWS) - IF(CMAKE_BUILD_TYPE STREQUAL Debug) - SET(CASROOT_LIBDIR ${CASROOT}/win32/libd) - ELSE(CMAKE_BUILD_TYPE STREQUAL Debug) - SET(CASROOT_LIBDIR ${CASROOT}/win32/lib) - ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) -ELSE(WINDOWS) - SET(CASROOT_LIBDIR ${CASROOT}/lib) -ENDIF(WINDOWS) - -FIND_LIBRARY(BinLPlugin BinLPlugin PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(BinPlugin BinPlugin PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(BinTObjPlugin BinTObjPlugin PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(BinXCAFPlugin BinXCAFPlugin PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(FWOSPlugin FWOSPlugin PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(mscmd mscmd PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(PTKernel PTKernel PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(StdLPlugin StdLPlugin PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(StdPlugin StdPlugin PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKAdvTools TKAdvTools PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKBin TKBin PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKBinL TKBinL PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKBinTObj TKBinTObj PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKBinXCAF TKBinXCAF PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKBO TKBO PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKBool TKBool PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKBRep TKBRep PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKCAF TKCAF PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKCDF TKCDF PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKCDLFront TKCDLFront PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKCPPClient TKCPPClient PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKCPPExt TKCPPExt PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKCPPIntExt TKCPPIntExt PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKCPPJini TKCPPJini PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKCSFDBSchema TKCSFDBSchema PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKDCAF TKDCAF PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKDraw TKDraw PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKernel TKernel PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKFeat TKFeat PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKFillet TKFillet PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKG2d TKG2d PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKG3d TKG3d PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKGeomAlgo TKGeomAlgo PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKGeomBase TKGeomBase PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKHLR TKHLR PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKIDLFront TKIDLFront PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKIGES TKIGES PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKLCAF TKLCAF PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKMath TKMath PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKMesh TKMesh PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKMeshVS TKMeshVS PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKNIS TKNIS PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKOffset TKOffset PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKOpenGl TKOpenGl PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKPCAF TKPCAF PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKPLCAF TKPLCAF PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKPrim TKPrim PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKPShape TKPShape PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKService TKService PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKShapeSchema TKShapeSchema PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKShHealing TKShHealing PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKStdLSchema TKStdLSchema PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKStdSchema TKStdSchema PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKSTEP TKSTEP PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKSTEP209 TKSTEP209 PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKSTEPAttr TKSTEPAttr PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKSTEPBase TKSTEPBase PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKSTL TKSTL PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKTCPPExt TKTCPPExt PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKTObj TKTObj PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKTObjDRAW TKTObjDRAW PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKTopAlgo TKTopAlgo PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKTopTest TKTopTest PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKV2d TKV2d PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKV3d TKV3d PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKViewerTest TKViewerTest PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKVRML TKVRML PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKWOK TKWOK PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKWOKTcl TKWOKTcl PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKXCAF TKXCAF PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKXCAFSchema TKXCAFSchema PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKXDEDRAW TKXDEDRAW PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKXDEIGES TKXDEIGES PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKXDESTEP TKXDESTEP PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKXMesh TKXMesh PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKXml TKXml PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKXmlL TKXmlL PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKXmlTObj TKXmlTObj PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKXmlXCAF TKXmlXCAF PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(TKXSBase TKXSBase PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(TKXSDRAW TKXSDRAW PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(wokcmd wokcmd PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(wokdeliverysteps wokdeliverysteps PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(wokdfltsteps wokdfltsteps PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(wokobjssteps wokobjssteps PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(wokorbixsteps wokorbixsteps PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(woksteps woksteps PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(woktoolscmd woktoolscmd PATHS ${CASROOT_LIBDIR}) -# FIND_LIBRARY(wokutilscmd wokutilscmd PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(XCAFPlugin XCAFPlugin PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(XmlLPlugin XmlLPlugin PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(XmlPlugin XmlPlugin PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(XmlTObjPlugin XmlTObjPlugin PATHS ${CASROOT_LIBDIR}) -FIND_LIBRARY(XmlXCAFPlugin XmlXCAFPlugin PATHS ${CASROOT_LIBDIR}) +FIND_LIBRARY(CAS_BinLPlugin BinLPlugin ) +FIND_LIBRARY(CAS_BinPlugin BinPlugin ) +FIND_LIBRARY(CAS_BinTObjPlugin BinTObjPlugin ) +FIND_LIBRARY(CAS_BinXCAFPlugin BinXCAFPlugin ) +FIND_LIBRARY(CAS_FWOSPlugin FWOSPlugin ) +# FIND_LIBRARY(CAS_mscmd mscmd ) +FIND_LIBRARY(CAS_PTKernel PTKernel ) +FIND_LIBRARY(CAS_StdLPlugin StdLPlugin ) +FIND_LIBRARY(CAS_StdPlugin StdPlugin ) +FIND_LIBRARY(CAS_TKAdvTools TKAdvTools ) +FIND_LIBRARY(CAS_TKBin TKBin ) +FIND_LIBRARY(CAS_TKBinL TKBinL ) +FIND_LIBRARY(CAS_TKBinTObj TKBinTObj ) +FIND_LIBRARY(CAS_TKBinXCAF TKBinXCAF ) +FIND_LIBRARY(CAS_TKBO TKBO ) +FIND_LIBRARY(CAS_TKBool TKBool ) +FIND_LIBRARY(CAS_TKBRep TKBRep ) +FIND_LIBRARY(CAS_TKCAF TKCAF ) +FIND_LIBRARY(CAS_TKCDF TKCDF ) +# FIND_LIBRARY(CAS_TKCDLFront TKCDLFront ) +# FIND_LIBRARY(CAS_TKCPPClient TKCPPClient ) +# FIND_LIBRARY(CAS_TKCPPExt TKCPPExt ) +# FIND_LIBRARY(CAS_TKCPPIntExt TKCPPIntExt ) +# FIND_LIBRARY(CAS_TKCPPJini TKCPPJini ) +# FIND_LIBRARY(CAS_TKCSFDBSchema TKCSFDBSchema ) +# FIND_LIBRARY(CAS_TKDCAF TKDCAF ) +# FIND_LIBRARY(CAS_TKDraw TKDraw ) +FIND_LIBRARY(CAS_TKernel TKernel ) +FIND_LIBRARY(CAS_TKFeat TKFeat ) +FIND_LIBRARY(CAS_TKFillet TKFillet ) +FIND_LIBRARY(CAS_TKG2d TKG2d ) +FIND_LIBRARY(CAS_TKG3d TKG3d ) +FIND_LIBRARY(CAS_TKGeomAlgo TKGeomAlgo ) +FIND_LIBRARY(CAS_TKGeomBase TKGeomBase ) +FIND_LIBRARY(CAS_TKHLR TKHLR ) +# FIND_LIBRARY(CAS_TKIDLFront TKIDLFront ) +FIND_LIBRARY(CAS_TKIGES TKIGES ) +FIND_LIBRARY(CAS_TKLCAF TKLCAF ) +FIND_LIBRARY(CAS_TKMath TKMath ) +FIND_LIBRARY(CAS_TKMesh TKMesh ) +FIND_LIBRARY(CAS_TKMeshVS TKMeshVS ) +FIND_LIBRARY(CAS_TKNIS TKNIS ) +FIND_LIBRARY(CAS_TKOffset TKOffset ) +FIND_LIBRARY(CAS_TKOpenGl TKOpenGl ) +FIND_LIBRARY(CAS_TKPCAF TKPCAF ) +FIND_LIBRARY(CAS_TKPLCAF TKPLCAF ) +FIND_LIBRARY(CAS_TKPrim TKPrim ) +FIND_LIBRARY(CAS_TKPShape TKPShape ) +FIND_LIBRARY(CAS_TKService TKService ) +FIND_LIBRARY(CAS_TKShapeSchema TKShapeSchema ) +FIND_LIBRARY(CAS_TKShHealing TKShHealing ) +FIND_LIBRARY(CAS_TKStdLSchema TKStdLSchema ) +FIND_LIBRARY(CAS_TKStdSchema TKStdSchema ) +FIND_LIBRARY(CAS_TKSTEP TKSTEP ) +FIND_LIBRARY(CAS_TKSTEP209 TKSTEP209 ) +FIND_LIBRARY(CAS_TKSTEPAttr TKSTEPAttr ) +FIND_LIBRARY(CAS_TKSTEPBase TKSTEPBase ) +FIND_LIBRARY(CAS_TKSTL TKSTL ) +# FIND_LIBRARY(CAS_TKTCPPExt TKTCPPExt ) +FIND_LIBRARY(CAS_TKTObj TKTObj ) +# FIND_LIBRARY(CAS_TKTObjDRAW TKTObjDRAW ) +FIND_LIBRARY(CAS_TKTopAlgo TKTopAlgo ) +# FIND_LIBRARY(CAS_TKTopTest TKTopTest ) +FIND_LIBRARY(CAS_TKV2d TKV2d ) +FIND_LIBRARY(CAS_TKV3d TKV3d ) +# FIND_LIBRARY(CAS_TKViewerTest TKViewerTest ) +FIND_LIBRARY(CAS_TKVRML TKVRML ) +# FIND_LIBRARY(CAS_TKWOK TKWOK ) +# FIND_LIBRARY(CAS_TKWOKTcl TKWOKTcl ) +FIND_LIBRARY(CAS_TKXCAF TKXCAF ) +FIND_LIBRARY(CAS_TKXCAFSchema TKXCAFSchema ) +# FIND_LIBRARY(CAS_TKXDEDRAW TKXDEDRAW ) +FIND_LIBRARY(CAS_TKXDEIGES TKXDEIGES ) +FIND_LIBRARY(CAS_TKXDESTEP TKXDESTEP ) +FIND_LIBRARY(CAS_TKXMesh TKXMesh ) +FIND_LIBRARY(CAS_TKXml TKXml ) +FIND_LIBRARY(CAS_TKXmlL TKXmlL ) +FIND_LIBRARY(CAS_TKXmlTObj TKXmlTObj ) +FIND_LIBRARY(CAS_TKXmlXCAF TKXmlXCAF ) +FIND_LIBRARY(CAS_TKXSBase TKXSBase ) +# FIND_LIBRARY(CAS_TKXSDRAW TKXSDRAW ) +# FIND_LIBRARY(CAS_wokcmd wokcmd ) +# FIND_LIBRARY(CAS_wokdeliverysteps wokdeliverysteps ) +# FIND_LIBRARY(CAS_wokdfltsteps wokdfltsteps ) +# FIND_LIBRARY(CAS_wokobjssteps wokobjssteps ) +# FIND_LIBRARY(CAS_wokorbixsteps wokorbixsteps ) +# FIND_LIBRARY(CAS_woksteps woksteps ) +# FIND_LIBRARY(CAS_woktoolscmd woktoolscmd ) +# FIND_LIBRARY(CAS_wokutilscmd wokutilscmd ) +FIND_LIBRARY(CAS_XCAFPlugin XCAFPlugin ) +FIND_LIBRARY(CAS_XmlLPlugin XmlLPlugin ) +FIND_LIBRARY(CAS_XmlPlugin XmlPlugin ) +FIND_LIBRARY(CAS_XmlTObjPlugin XmlTObjPlugin ) +FIND_LIBRARY(CAS_XmlXCAFPlugin XmlXCAFPlugin ) -SET(CAS_KERNEL ${TKernel} ${TKMath}) -SET(CAS_OCAF ${TKernel} ${TKMath} ${TKCDF} ${TKLCAF}) -SET(CAS_VIEWER ${TKService} ${TKV3d} ${TKG3d} ${TKGeomBase} ${TKBRep}) -SET(CAS_OCAFVIS ${TKCAF} ${TKBRep} ${TKG2d}) -SET(CAS_MODELER ${TKG3d} ${TKGeomBase} ${TKGeomAlgo} ${TKBRep} ${TKTopAlgo} ${TKG2d}) +SET(CAS_KERNEL ${CAS_TKernel} ${CAS_TKMath}) +SET(CAS_OCAF ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKCDF} ${CAS_TKLCAF}) +SET(CAS_VIEWER ${CAS_TKService} ${CAS_TKV3d} ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKBRep}) +SET(CAS_OCAFVIS ${CAS_TKCAF} ${CAS_TKBRep} ${CAS_TKG2d}) +SET(CAS_MODELER ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKGeomAlgo} ${CAS_TKBRep} ${CAS_TKTopAlgo} ${CAS_TKG2d}) -SET(TKV3d_EA ${TKernel} ${TKMath} ${TKV3d}) -SET(TKBool_EA ${TKernel} ${TKMath} ${TKBRep} ${TKG2d} ${TKG3d} ${TKGeomBase} ${TKGeomAlgo} ${TKTopAlgo} ${TKBool}) -SET(TKBRep_EA ${TKernel} ${TKMath} ${TKBRep}) -SET(TKIGES_EA ${TKernel} ${TKMath} ${TKXSBase} ${TKBRep} ${TKIGES}) -SET(TKSTEP_EA ${TKernel} ${TKMath} ${TKXSBase} ${TKBRep} ${TKSTEP}) -SET(TKSTL_EA ${TKernel} ${TKMath} ${TKSTL}) -SET(TKCAF_EA ${TKPrim} ${TKCAF}) +SET(CAS_TKV3d_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKV3d}) +SET(CAS_TKBool_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKBRep} ${CAS_TKG2d} ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKGeomAlgo} ${CAS_TKTopAlgo} ${CAS_TKBool}) +SET(CAS_TKBRep_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKBRep}) +SET(CAS_TKIGES_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKXSBase} ${CAS_TKBRep} ${CAS_TKIGES}) +SET(CAS_TKSTEP_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKXSBase} ${CAS_TKBRep} ${CAS_TKSTEP}) +SET(CAS_TKSTL_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKSTL}) +SET(CAS_TKCAF_EA ${CAS_TKPrim} ${CAS_TKCAF}) -SET(TKV3d ${TKV3d_EA}) -SET(TKBool ${TKBool_EA}) -SET(TKBRep ${TKBRep_EA}) -SET(TKIGES ${TKIGES_EA}) -SET(TKSTEP ${TKSTEP_EA}) -SET(TKSTL ${TKSTL_EA}) -SET(TKCAF ${TKCAF_EA}) +SET(CAS_TKV3d ${CAS_TKV3d_EA}) +SET(CAS_TKBool ${CAS_TKBool_EA}) +SET(CAS_TKBRep ${CAS_TKBRep_EA}) +SET(CAS_TKIGES ${CAS_TKIGES_EA}) +SET(CAS_TKSTEP ${CAS_TKSTEP_EA}) +SET(CAS_TKSTL ${CAS_TKSTL_EA}) +SET(CAS_TKCAF ${CAS_TKCAF_EA}) diff --git a/adm_local/cmake_files/FindQWT.cmake b/adm_local/cmake_files/FindQWT.cmake index c376e3649..c0e540aa8 100644 --- a/adm_local/cmake_files/FindQWT.cmake +++ b/adm_local/cmake_files/FindQWT.cmake @@ -17,25 +17,33 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -FILE(TO_CMAKE_PATH "$ENV{QWTHOME}" QWTHOME) -IF(NOT QWTHOME) - SET(QWTHOME /usr) -ENDIF(NOT QWTHOME) +SET(QWT_ROOT $ENV{QWTHOME} CACHE PATH "Path to the Qwt directory") -FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATHS ${QWTHOME}/include ${QWTHOME}/include/qwt) -SET(QWT_INCLUDES -I${QWT_INCLUDE_DIR}) # to remove -SET(QWT_INCLUDE_DIRS ${QWT_INCLUDE_DIR}) +FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATHS ${QWT_ROOT}/include ${QWT_ROOT}/include/qwt NO_DEFAULT_PATH) +FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATHS /usr/include/qwt-qt4) IF(WINDOWS) -SET(QWT_INCLUDES ${QWT_INCLUDES} -DQWT_DLL) # to remove -SET(QWT_DEFINITIONS "-DQWT_DLL") + SET(QWT_DEFINITIONS "-DQWT_DLL") ENDIF(WINDOWS) IF(WINDOWS) -IF(CMAKE_BUILD_TYPE STREQUAL Debug) -FIND_LIBRARY(QWT_LIBS qwtd5 ${QWTHOME}/lib) -ELSE(CMAKE_BUILD_TYPE STREQUAL Debug) -FIND_LIBRARY(QWT_LIBS qwt5 ${QWTHOME}/lib) -ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) + IF(CMAKE_BUILD_TYPE STREQUAL Debug) + FIND_LIBRARY(QWT_LIBRARY qwtd5 ${QWT_ROOT}/lib) + ELSE(CMAKE_BUILD_TYPE STREQUAL Debug) + FIND_LIBRARY(QWT_LIBRARY qwt5 ${QWT_ROOT}/lib) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) ELSE(WINDOWS) -FIND_LIBRARY(QWT_LIBS qwt HINTS ${QWTHOME} PATH_SUFFIXES lib lib64) + FIND_LIBRARY(QWT_LIBRARY qwt-qt4 HINTS ${QWT_ROOT} PATH_SUFFIXES lib lib64 NO_DEFAULT_PATH) + FIND_LIBRARY(QWT_LIBRARY qwt-qt4) + FIND_LIBRARY(QWT_LIBRARY qwt HINTS ${QWT_ROOT} PATH_SUFFIXES lib lib64 NO_DEFAULT_PATH) + FIND_LIBRARY(QWT_LIBRARY qwt) ENDIF(WINDOWS) + +SET(QWT_FOUND "FALSE") +IF(QWT_INCLUDE_DIR AND QWT_LIBRARY) + SET(QWT_FOUND "TRUE") + MARK_AS_ADVANCED(QWT_ROOT) + MARK_AS_ADVANCED(QWT_INCLUDE_DIR) + MARK_AS_ADVANCED(QWT_LIBRARY) +ELSE(QWT_INCLUDE_DIR AND QWT_LIBRARY) + MESSAGE(FATAL_ERROR "Qwt is required, please define QWT_ROOT CMake variable or set QWTHOME in your environment") +ENDIF(QWT_INCLUDE_DIR AND QWT_LIBRARY) \ No newline at end of file diff --git a/doc/salome/gui/CMakeLists.txt b/doc/salome/gui/CMakeLists.txt index 2ea1bad1e..6452195c7 100755 --- a/doc/salome/gui/CMakeLists.txt +++ b/doc/salome/gui/CMakeLists.txt @@ -20,38 +20,20 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(top_builddir - ${CMAKE_BINARY_DIR} -) -SET(top_srcdir - ${CMAKE_SOURCE_DIR} -) -SET(srcdir - ${CMAKE_CURRENT_SOURCE_DIR} -) -SET(builddir - ${CMAKE_CURRENT_BINARY_DIR} -) -SET(datadir - ${CMAKE_INSTALL_PREFIX}/share -) -SET(docdir - ${datadir}/doc/salome -) +SET(top_builddir ${CMAKE_BINARY_DIR}) +SET(top_srcdir ${CMAKE_SOURCE_DIR}) +SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) +SET(builddir ${CMAKE_CURRENT_BINARY_DIR}) +SET(datadir ${CMAKE_INSTALL_PREFIX}/share) +SET(docdir ${datadir}/doc/salome) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doxyfile) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/static/header.html.in ${CMAKE_CURRENT_BINARY_DIR}/static/header.html) + +ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE}) -SET(input ${CMAKE_CURRENT_SOURCE_DIR}/doxyfile.in) -SET(output ${CMAKE_CURRENT_BINARY_DIR}/doxyfile) -MESSAGE(STATUS "Creation of ${output}") -CONFIGURE_FILE(${input} ${output}) +ADD_DEPENDENCIES(usr_docs html_docs) -SET(input ${CMAKE_CURRENT_SOURCE_DIR}/static/header.html.in) -SET(output ${CMAKE_CURRENT_BINARY_DIR}/static/header.html) -MESSAGE(STATUS "Creation of ${output}") -CONFIGURE_FILE(${input} ${output}) - -ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE} - COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GUI''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}/GUI''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GUI'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GUI''')" - VERBATIM - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -) +INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${CMAKE_CACHEFILE_DIR} --target usr_docs)") +INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/GUI DESTINATION share/doc/salome/gui) +INSTALL(FILES images/head.png DESTINATION share/doc/salome/gui/GUI) diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt index 82e0c8fe9..bddf4b4eb 100755 --- a/idl/CMakeLists.txt +++ b/idl/CMakeLists.txt @@ -20,7 +20,7 @@ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/UseOMNIORB.cmake) INCLUDE_DIRECTORIES( - ${OMNIORB_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIR} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_BINARY_DIR} ) @@ -39,8 +39,9 @@ IF(WINDOWS) SET(TYPE STATIC) ENDIF(WINDOWS) +ADD_DEFINITIONS(${OMNIORB_DEFINITIONS}) + OMNIORB_ADD_MODULE(SalomeIDLGUI "${SalomeIDLGUI_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" ${TYPE}) TARGET_LINK_LIBRARIES(SalomeIDLGUI ${CORBA_LIBS}) -SET_TARGET_PROPERTIES(SalomeIDLGUI PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") INSTALL(TARGETS SalomeIDLGUI DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/CAF/CMakeLists.txt b/src/CAF/CMakeLists.txt index 56f7db31b..c74b458fa 100755 --- a/src/CAF/CMakeLists.txt +++ b/src/CAF/CMakeLists.txt @@ -33,7 +33,7 @@ SET(COMMON_LIBS qtx suit std - ${QT_MT_LIBS} + ${QT_LIBRARIES} ${CAS_OCAF} ${CAS_OCAFVIS} ) @@ -52,8 +52,9 @@ SET(GUITS_SOURCES resources/CAF_msg_fr.ts ) -ADD_LIBRARY(caf SHARED ${caf_SOURCES} ${GUI_HEADERS}) -SET_TARGET_PROPERTIES(caf PROPERTIES COMPILE_FLAGS "${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS}) + +ADD_LIBRARY(caf ${caf_SOURCES} ${GUI_HEADERS}) TARGET_LINK_LIBRARIES(caf ${COMMON_LIBS}) INSTALL(TARGETS caf DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/CAM/CMakeLists.txt b/src/CAM/CMakeLists.txt index b79fea069..47b5fe9d5 100755 --- a/src/CAM/CMakeLists.txt +++ b/src/CAM/CMakeLists.txt @@ -20,7 +20,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR} @@ -33,7 +33,7 @@ SET(COMMON_LIBS qtx suit std - ${QT_MT_LIBS} + ${QT_LIBRARIES} ) SET(CAM_HEADERS CAM_Application.h CAM_Module.h CAM_Study.h CAM_DataModel.h) @@ -52,8 +52,9 @@ SET(CAMTS_SOURCES resources/CAM_msg_fr.ts ) -ADD_LIBRARY(CAM SHARED ${CAM_SOURCES} ${CAM_HEADERS_MOC}) -SET_TARGET_PROPERTIES(CAM PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +ADD_LIBRARY(CAM ${CAM_SOURCES} ${CAM_HEADERS_MOC}) TARGET_LINK_LIBRARIES(CAM ${COMMON_LIBS}) INSTALL(TARGETS CAM DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/CASCatch/CMakeLists.txt b/src/CASCatch/CMakeLists.txt index 969295192..670a86779 100755 --- a/src/CASCatch/CMakeLists.txt +++ b/src/CASCatch/CMakeLists.txt @@ -28,8 +28,9 @@ SET(CASCatch_SOURCES CASCatch_Failure.cxx ) -ADD_LIBRARY(CASCatch SHARED ${CASCatch_SOURCES}) -SET_TARGET_PROPERTIES(CASCatch PROPERTIES COMPILE_FLAGS "${CAS_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +ADD_DEFINITIONS(${CAS_DEFINITIONS}) + +ADD_LIBRARY(CASCatch ${CASCatch_SOURCES}) TARGET_LINK_LIBRARIES(CASCatch ${CAS_KERNEL}) INSTALL(TARGETS CASCatch DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fe69daed1..414071e09 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -42,74 +42,74 @@ SET(SUBDIRS_COMMON ## # SALOME object ## -IF(ENABLE_SALOMEOBJECT) +IF(SALOME_USE_SALOMEOBJECT) SET(SUBDIRS_OBJECT OBJECT) -ENDIF(ENABLE_SALOMEOBJECT) +ENDIF(SALOME_USE_SALOMEOBJECT) ## # GL viewer ## -IF(ENABLE_GLVIEWER) +IF(SALOME_USE_GLVIEWER) SET(SUBDIRS_GLVIEWER GLViewer) -ENDIF(ENABLE_GLVIEWER) +ENDIF(SALOME_USE_GLVIEWER) ## # VTK viewer ## -IF(ENABLE_VTKVIEWER) +IF(SALOME_USE_VTKVIEWER) SET(SUBDIRS_VTKVIEWER VTKViewer) - IF(ENABLE_SALOMEOBJECT) + IF(SALOME_USE_SALOMEOBJECT) SET(SUBDIRS_VTKVIEWER ${SUBDIRS_VTKVIEWER} SVTK) SET(SUBDIRS_VIEWERTOOLSViewerTools) - ENDIF(ENABLE_SALOMEOBJECT) -ENDIF(ENABLE_VTKVIEWER) + ENDIF(SALOME_USE_SALOMEOBJECT) +ENDIF(SALOME_USE_VTKVIEWER) ## # OCC viewer ## -IF(ENABLE_OCCVIEWER) +IF(SALOME_USE_OCCVIEWER) SET(SUBDIRS_OCCVIEWER OCCViewer) SET(SUBDIRS_VIEWERTOOLS ViewerTools) - IF(ENABLE_SALOMEOBJECT) + IF(SALOME_USE_SALOMEOBJECT) SET(SUBDIRS_OCCVIEWER ${SUBDIRS_OCCVIEWER} SOCC) - ENDIF(ENABLE_SALOMEOBJECT) -ENDIF(ENABLE_OCCVIEWER) + ENDIF(SALOME_USE_SALOMEOBJECT) +ENDIF(SALOME_USE_OCCVIEWER) ## # Plot2d viewer ## -IF(ENABLE_PLOT2DVIEWER) +IF(SALOME_USE_PLOT2DVIEWER) SET(SUBDIRS_PLOT2DVIEWER Plot2d) - IF(ENABLE_SALOMEOBJECT) + IF(SALOME_USE_SALOMEOBJECT) SET(SUBDIRS_PLOT2DVIEWER ${SUBDIRS_PLOT2DVIEWER} SPlot2d) - ENDIF(ENABLE_SALOMEOBJECT) -ENDIF(ENABLE_PLOT2DVIEWER) + ENDIF(SALOME_USE_SALOMEOBJECT) +ENDIF(SALOME_USE_PLOT2DVIEWER) ## # SUPERV graph viewer ## -IF(ENABLE_SUPERVGRAPHVIEWER) +IF(SALOME_USE_SUPERVGRAPHVIEWER) SET(SUBDIRS_SUPERVGRAPHVIEWER SUPERVGraph) -ENDIF(ENABLE_SUPERVGRAPHVIEWER) +ENDIF(SALOME_USE_SUPERVGRAPHVIEWER) ## # Qx scene viewer ## ###VSR: QxGraph has been replaced by QxScene ###SUBDIRS_QXGRAPHVIEWER = QxGraph -IF(ENABLE_QXGRAPHVIEWER) +IF(SALOME_USE_QXGRAPHVIEWER) SET(SUBDIRS_QXGRAPHVIEWER QxScene) -ENDIF(ENABLE_QXGRAPHVIEWER) +ENDIF(SALOME_USE_QXGRAPHVIEWER) ## # Python console (base) ## -IF(ENABLE_PYCONSOLE) +IF(SALOME_USE_PYCONSOLE) SET(SUBDIRS_PYCONSOLE PyInterp PyConsole) -ENDIF(ENABLE_PYCONSOLE) +ENDIF(SALOME_USE_PYCONSOLE) ## # Light SALOME packages @@ -122,7 +122,7 @@ SET(SUBDIRS_LIGHT ## # Full (CORBA) SALOME packages ## -IF(GUI_ENABLE_CORBA) +IF(SALOME_USE_CORBA) SET(SUBDIRS_CORBA TOOLSGUI Session @@ -130,18 +130,18 @@ IF(GUI_ENABLE_CORBA) GuiHelpers TreeData ) -ENDIF(GUI_ENABLE_CORBA) +ENDIF(SALOME_USE_CORBA) ## # Extra Python packages ## -IF(ENABLE_PYCONSOLE) +IF(SALOME_USE_PYCONSOLE) SET(SUBDIRS_PY_LIGHT SALOME_SWIG SALOME_PY SALOME_PYQT ) -ENDIF(ENABLE_PYCONSOLE) +ENDIF(SALOME_USE_PYCONSOLE) SET(SUBDIRS ${SUBDIRS_COMMON} diff --git a/src/DDS/CMakeLists.txt b/src/DDS/CMakeLists.txt index 79fe985f8..bd9e8ead8 100755 --- a/src/DDS/CMakeLists.txt +++ b/src/DDS/CMakeLists.txt @@ -33,8 +33,9 @@ SET(DDS_SOURCES DDS_KeyWords.cxx ) -ADD_LIBRARY(DDS SHARED ${DDS_SOURCES}) -SET_TARGET_PROPERTIES(DDS PROPERTIES COMPILE_FLAGS "${CAS_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +ADD_DEFINITIONS(${CAS_DEFINITIONS}) + +ADD_LIBRARY(DDS ${DDS_SOURCES}) TARGET_LINK_LIBRARIES(DDS ${CAS_KERNEL} ${CAS_OCAF}) INSTALL(TARGETS DDS DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/Event/CMakeLists.txt b/src/Event/CMakeLists.txt index 0e2110fa4..914dcde0c 100755 --- a/src/Event/CMakeLists.txt +++ b/src/Event/CMakeLists.txt @@ -18,14 +18,15 @@ # SET(Event_SOURCES - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} SALOME_Event.cxx SALOME_EventFilter.cxx ) -ADD_LIBRARY(Event SHARED ${Event_SOURCES}) -SET_TARGET_PROPERTIES(Event PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -TARGET_LINK_LIBRARIES(Event ${QT_MT_LIBS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +ADD_LIBRARY(Event ${Event_SOURCES}) +TARGET_LINK_LIBRARIES(Event ${QT_LIBRARIES}) INSTALL(TARGETS Event DESTINATION ${GUI_salomelib_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") diff --git a/src/GLViewer/CMakeLists.txt b/src/GLViewer/CMakeLists.txt index 9a455f44a..07e462990 100755 --- a/src/GLViewer/CMakeLists.txt +++ b/src/GLViewer/CMakeLists.txt @@ -22,16 +22,16 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ) SET(COMMON_LIBS suit - ${QT_MT_LIBS} + ${QT_LIBRARIES} ${CAS_KERNEL} - ${OGL_LIBS} + ${OPENGL_LIBRARIES} ) SET(GUI_HEADERS GLViewer_Selector.h GLViewer_Selector2d.h GLViewer_ToolTip.h GLViewer_ViewFrame.h GLViewer_ViewManager.h GLViewer_ViewPort.h GLViewer_ViewPort2d.h GLViewer_Viewer.h GLViewer_Viewer2d.h GLViewer_Widget.h) @@ -70,8 +70,9 @@ SET(GUITS_SOURCES resources/GLViewer_msg_fr.ts ) -ADD_LIBRARY(GLViewer SHARED ${GLViewer_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(GLViewer PROPERTIES COMPILE_FLAGS "${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +ADD_DEFINITIONS(${CAS_DEFINITIONS}) + +ADD_LIBRARY(GLViewer ${GLViewer_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(GLViewer ${COMMON_LIBS}) INSTALL(TARGETS GLViewer DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/GUI_PY/CMakeLists.txt b/src/GUI_PY/CMakeLists.txt index 7eb45ea43..edba8d34b 100755 --- a/src/GUI_PY/CMakeLists.txt +++ b/src/GUI_PY/CMakeLists.txt @@ -44,7 +44,7 @@ FOREACH(output ${PYUIC_FILES}) SET(output ${CMAKE_CURRENT_BINARY_DIR}/${output}) ADD_CUSTOM_COMMAND( OUTPUT ${output} - COMMAND ${PYUIC_EXECUTABLE} -o ${output} ${input} + COMMAND ${PYQT_PYUIC_EXECUTABLE} -o ${output} ${input} MAIN_DEPENDENCY ${input} ) ENDFOREACH(output ${PYUIC_FILES}) @@ -53,4 +53,4 @@ ADD_CUSTOM_TARGET(BUILD_PY_UI_FILES ALL DEPENDS ${PYUIC_FILES}) FOREACH(output ${PYUIC_FILES}) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${output} DESTINATION ${GUI_salomepythondir}/salome/gui) -ENDFOREACH(output ${PYUIC_FILES}) \ No newline at end of file +ENDFOREACH(output ${PYUIC_FILES}) diff --git a/src/GuiHelpers/CMakeLists.txt b/src/GuiHelpers/CMakeLists.txt index 1a1cacdf3..faddd19a4 100755 --- a/src/GuiHelpers/CMakeLists.txt +++ b/src/GuiHelpers/CMakeLists.txt @@ -19,9 +19,9 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${BOOST_INCLUDE_DIRS} - ${OMNIORB_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../SalomeApp @@ -41,8 +41,9 @@ SET(SalomeGuiHelpers_SOURCES StandardApp_Module.cxx ) -ADD_LIBRARY(SalomeGuiHelpers SHARED ${SalomeGuiHelpers_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(SalomeGuiHelpers PROPERTIES COMPILE_FLAGS "${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS}) + +ADD_LIBRARY(SalomeGuiHelpers ${SalomeGuiHelpers_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SalomeGuiHelpers SalomeApp ${SalomeKernelHelpers} ${CORBA_LIBS}) INSTALL(TARGETS SalomeGuiHelpers DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/LightApp/CMakeLists.txt b/src/LightApp/CMakeLists.txt index 737c58f6e..e9cabfac2 100755 --- a/src/LightApp/CMakeLists.txt +++ b/src/LightApp/CMakeLists.txt @@ -20,11 +20,11 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${HDF5_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} - ${QWT_INCLUDE_DIRS} + ${QWT_INCLUDE_DIR} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT @@ -39,13 +39,14 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../CASCatch ) -SET(COMMON_FLAGS "${PYTHON_DEFINITIONS} ${HDF5_DEFINITIONS} ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${HDF5_DEFINITIONS} ${CAS_DEFINITIONS} ${QT_DEFINITIONS}) + IF(NOT WINDOWS) - SET(COMMON_FLAGS "${COMMON_FLAGS} -Wno-deprecated") + ADD_DEFINITIONS("-Wno-deprecated") ENDIF(NOT WINDOWS) SET(COMMON_LIBS - ${QT_LIBS} + ${QT_LIBRARIES} suit std CAM @@ -55,10 +56,10 @@ SET(COMMON_LIBS ObjBrowser SalomeStyle Event - ${HDF5_LIBS} + ${HDF5_LIBRARIES} ${KERNEL_LDFLAGS} - ${SalomeHDFPersist} - ${SALOMELocalTrace} + ${KERNEL_SalomeHDFPersist} + ${KERNEL_SALOMELocalTrace} ) SET(GUI_HEADERS @@ -149,106 +150,104 @@ SET(COMMON_HEADERS_H LightApp_FullScreenHelper.h ) -IF(ENABLE_PYCONSOLE) +IF(SALOME_USE_PYCONSOLE) INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../PyConsole ${CMAKE_CURRENT_SOURCE_DIR}/../PyInterp ${CMAKE_CURRENT_SOURCE_DIR}/../SUITApp ) - SET(COMMON_FLAGS "${COMMON_FLAGS} ${PYTHON_DEFINITIONS}") SET(COMMON_HEADERS_H ${COMMON_HEADERS_H} LightApp_PyInterp.h) SET(LightApp_SOURCES ${LightApp_SOURCES} LightApp_PyInterp.cxx) SET(COMMON_LIBS ${COMMON_LIBS} PyInterp PyConsole SUITApp) -ELSE(ENABLE_PYCONSOLE) - SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_PYCONSOLE") -ENDIF(ENABLE_PYCONSOLE) +ELSE(SALOME_USE_PYCONSOLE) + ADD_DEFINITIONS("-DDISABLE_PYCONSOLE") +ENDIF(SALOME_USE_PYCONSOLE) -IF(ENABLE_VTKVIEWER) +IF(SALOME_USE_VTKVIEWER) INCLUDE_DIRECTORIES( ${VTK_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../VTKViewer ) - SET(COMMON_LIBS ${COMMON_LIBS} ${VTK_LIBS} VTKViewer) - IF(ENABLE_SALOMEOBJECT) + SET(COMMON_LIBS ${COMMON_LIBS} ${VTK_LIBRARIES} VTKViewer) + IF(SALOME_USE_SALOMEOBJECT) SET(COMMON_HEADERS_H ${COMMON_HEADERS_H} LightApp_VTKSelector.h) SET(LightApp_SOURCES ${LightApp_SOURCES} LightApp_VTKSelector.cxx) SET(GUI_HEADERS ${GUI_HEADERS} LightApp_VTKSelector.h) SET(COMMON_LIBS ${COMMON_LIBS} SVTK) - ENDIF(ENABLE_SALOMEOBJECT) -ELSE(ENABLE_VTKVIEWER) - SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_VTKVIEWER") -ENDIF(ENABLE_VTKVIEWER) + ENDIF(SALOME_USE_SALOMEOBJECT) +ELSE(SALOME_USE_VTKVIEWER) + ADD_DEFINITIONS("-DDISABLE_VTKVIEWER") +ENDIF(SALOME_USE_VTKVIEWER) -IF(ENABLE_OCCVIEWER) +IF(SALOME_USE_OCCVIEWER) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../OCCViewer) SET(COMMON_HEADERS_H ${COMMON_HEADERS_H} LightApp_OCCSelector.h) SET(LightApp_SOURCES ${LightApp_SOURCES} LightApp_OCCSelector.cxx) SET(COMMON_LIBS ${COMMON_LIBS} OCCViewer) SET(GUI_HEADERS ${GUI_HEADERS} LightApp_OCCSelector.h) -ELSE(ENABLE_OCCVIEWER) - SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_OCCVIEWER") -ENDIF(ENABLE_OCCVIEWER) +ELSE(SALOME_USE_OCCVIEWER) + ADD_DEFINITIONS("-DDISABLE_OCCVIEWER") +ENDIF(SALOME_USE_OCCVIEWER) -IF(ENABLE_GLVIEWER) +IF(SALOME_USE_GLVIEWER) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../GLViewer) SET(COMMON_HEADERS_H ${COMMON_HEADERS_H} LightApp_GLSelector.h) SET(LightApp_SOURCES ${LightApp_SOURCES} LightApp_GLSelector.cxx) SET(GUI_HEADERS ${GUI_HEADERS} LightApp_GLSelector.h) SET(COMMON_LIBS ${COMMON_LIBS} GLViewer) -ELSE(ENABLE_GLVIEWER) - SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_GLVIEWER") -ENDIF(ENABLE_GLVIEWER) +ELSE(SALOME_USE_GLVIEWER) + ADD_DEFINITIONS("-DDISABLE_GLVIEWER") +ENDIF(SALOME_USE_GLVIEWER) -IF(ENABLE_PLOT2DVIEWER) +IF(SALOME_USE_PLOT2DVIEWER) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../Plot2d) - SET(COMMON_FLAGS "${COMMON_FLAGS} ${QWT_DEFINITIONS}") + ADD_DEFINITIONS(${QWT_DEFINITIONS}) SET(COMMON_HEADERS_H ${COMMON_HEADERS_H} LightApp_Plot2dSelector.h) SET(LightApp_SOURCES ${LightApp_SOURCES} LightApp_Plot2dSelector.cxx) SET(GUI_HEADERS ${GUI_HEADERS} LightApp_Plot2dSelector.h) SET(COMMON_LIBS ${COMMON_LIBS} Plot2d) -ELSE(ENABLE_PLOT2DVIEWER) - SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_PLOT2DVIEWER") -ENDIF(ENABLE_PLOT2DVIEWER) +ELSE(SALOME_USE_PLOT2DVIEWER) + ADD_DEFINITIONS("-DDISABLE_PLOT2DVIEWER") +ENDIF(SALOME_USE_PLOT2DVIEWER) -IF(ENABLE_SUPERVGRAPHVIEWER) +IF(SALOME_USE_SUPERVGRAPHVIEWER) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../SUPERVGraph) SET(COMMON_LIBS ${COMMON_LIBS} SUPERVGraph) -ELSE(ENABLE_SUPERVGRAPHVIEWER) - SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_SUPERVGRAPHVIEWER") -ENDIF(ENABLE_SUPERVGRAPHVIEWER) +ELSE(SALOME_USE_SUPERVGRAPHVIEWER) + ADD_DEFINITIONS("-DDISABLE_SUPERVGRAPHVIEWER") +ENDIF(SALOME_USE_SUPERVGRAPHVIEWER) -IF(ENABLE_QXGRAPHVIEWER) +IF(SALOME_USE_QXGRAPHVIEWER) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../QxScene) SET(COMMON_LIBS ${COMMON_LIBS} QxScene) -ELSE(ENABLE_QXGRAPHVIEWER) - SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_QXGRAPHVIEWER") -ENDIF(ENABLE_QXGRAPHVIEWER) +ELSE(SALOME_USE_QXGRAPHVIEWER) + ADD_DEFINITIONS("-DDISABLE_QXGRAPHVIEWER") +ENDIF(SALOME_USE_QXGRAPHVIEWER) -IF(ENABLE_SALOMEOBJECT) +IF(SALOME_USE_SALOMEOBJECT) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT) SET(COMMON_LIBS ${COMMON_LIBS} SalomeObject) - IF(ENABLE_PLOT2DVIEWER) + IF(SALOME_USE_PLOT2DVIEWER) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../SPlot2d) SET(COMMON_LIBS ${COMMON_LIBS} SPlot2d) - ENDIF(ENABLE_PLOT2DVIEWER) + ENDIF(SALOME_USE_PLOT2DVIEWER) - IF(ENABLE_OCCVIEWER) + IF(SALOME_USE_OCCVIEWER) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../SOCC) SET(COMMON_LIBS ${COMMON_LIBS} SOCC) - ENDIF(ENABLE_OCCVIEWER) + ENDIF(SALOME_USE_OCCVIEWER) - IF(ENABLE_VTKVIEWER) + IF(SALOME_USE_VTKVIEWER) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../SVTK) - ENDIF(ENABLE_VTKVIEWER) -ELSE(ENABLE_SALOMEOBJECT) - SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_SALOMEOBJECT") -ENDIF(ENABLE_SALOMEOBJECT) + ENDIF(SALOME_USE_VTKVIEWER) +ELSE(SALOME_USE_SALOMEOBJECT) + ADD_DEFINITIONS("-DDISABLE_SALOMEOBJECT") +ENDIF(SALOME_USE_SALOMEOBJECT) QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) QT4_ADD_RESOURCES(RCC_SRCS ${RCCS}) -ADD_LIBRARY(LightApp SHARED ${LightApp_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) -SET_TARGET_PROPERTIES(LightApp PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_LIBRARY(LightApp ${LightApp_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) TARGET_LINK_LIBRARIES(LightApp ${COMMON_LIBS}) INSTALL(TARGETS LightApp DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/LogWindow/CMakeLists.txt b/src/LogWindow/CMakeLists.txt index 4d0df7240..574119a5b 100755 --- a/src/LogWindow/CMakeLists.txt +++ b/src/LogWindow/CMakeLists.txt @@ -20,7 +20,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ) @@ -33,9 +33,10 @@ SET(GUITS_SOURCES resources/LogWindow_msg_fr.ts ) -ADD_LIBRARY(LogWindow SHARED LogWindow.cxx ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(LogWindow PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -TARGET_LINK_LIBRARIES(LogWindow qtx suit ${QT_MT_LIBS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +ADD_LIBRARY(LogWindow LogWindow.cxx ${GUI_HEADERS_MOC}) +TARGET_LINK_LIBRARIES(LogWindow qtx suit ${QT_LIBRARIES}) INSTALL(TARGETS LogWindow DESTINATION ${GUI_salomelib_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") diff --git a/src/OBJECT/CMakeLists.txt b/src/OBJECT/CMakeLists.txt index 96764f5b2..6e1d05713 100755 --- a/src/OBJECT/CMakeLists.txt +++ b/src/OBJECT/CMakeLists.txt @@ -20,12 +20,12 @@ INCLUDE_DIRECTORIES( ${PTHREAD_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${KERNEL_ROOT_DIR}/include/salome ) SET(COMMON_LIBS - ${QT_LIBS} + ${QT_LIBRARIES} ${CAS_LDPATH} ${TKV3d} ) @@ -44,8 +44,9 @@ SET(SalomeObject_SOURCES SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx ) -ADD_LIBRARY(SalomeObject SHARED ${SalomeObject_SOURCES}) -SET_TARGET_PROPERTIES(SalomeObject PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS}) + +ADD_LIBRARY(SalomeObject ${SalomeObject_SOURCES}) TARGET_LINK_LIBRARIES(SalomeObject ${COMMON_LIBS}) INSTALL(TARGETS SalomeObject DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/OCCViewer/CMakeLists.txt b/src/OCCViewer/CMakeLists.txt index 04f406477..cf1b98f0c 100755 --- a/src/OCCViewer/CMakeLists.txt +++ b/src/OCCViewer/CMakeLists.txt @@ -25,7 +25,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${OGL_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT @@ -34,14 +34,16 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../OpenGLUtils ${CMAKE_CURRENT_SOURCE_DIR}/../CASCatch ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${OGL_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + + + SET(COMMON_LIBS qtx suit ViewerTools OpenGLUtils - ${OGL_LIBS} - ${QT_MT_LIBS} + ${OPENGL_LIBRARIES} + ${QT_LIBRARIES} ${CAS_KERNEL} ${CAS_VIEWER} ) @@ -91,8 +93,9 @@ SET(GUITS_SOURCES resources/OCCViewer_msg_fr.ts ) -ADD_LIBRARY(OCCViewer SHARED ${OCCViewer_SOURCES} ${GUI_HEADERS}) -SET_TARGET_PROPERTIES(OCCViewer PROPERTIES COMPILE_FLAGS ${COMMON_FLAGS}) +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${OGL_DEFINITIONS}) + +ADD_LIBRARY(OCCViewer ${OCCViewer_SOURCES} ${GUI_HEADERS}) TARGET_LINK_LIBRARIES(OCCViewer ${COMMON_LIBS}) INSTALL(TARGETS OCCViewer DESTINATION ${GUI_salomelib_LIBS}) SET(COMMON_HEADERS_H diff --git a/src/ObjBrowser/CMakeLists.txt b/src/ObjBrowser/CMakeLists.txt index eb3b7d5f2..0fb58ded5 100644 --- a/src/ObjBrowser/CMakeLists.txt +++ b/src/ObjBrowser/CMakeLists.txt @@ -20,7 +20,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ) @@ -35,9 +35,10 @@ SET(GUITS_SOURCES resources/OB_msg_fr.ts ) -ADD_LIBRARY(ObjBrowser SHARED ${ObjBrowser_SOURCES} ${GUI_HEADERS}) -SET_TARGET_PROPERTIES(ObjBrowser PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -TARGET_LINK_LIBRARIES(ObjBrowser qtx ${QT_MT_LIBS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +ADD_LIBRARY(ObjBrowser ${ObjBrowser_SOURCES} ${GUI_HEADERS}) +TARGET_LINK_LIBRARIES(ObjBrowser qtx ${QT_LIBRARIES}) INSTALL(TARGETS ObjBrowser DESTINATION ${GUI_salomelib_LIBS}) SET(COMMON_HEADERS_H diff --git a/src/OpenGLUtils/CMakeLists.txt b/src/OpenGLUtils/CMakeLists.txt index 4a0c2eee9..811f7e2db 100755 --- a/src/OpenGLUtils/CMakeLists.txt +++ b/src/OpenGLUtils/CMakeLists.txt @@ -22,11 +22,9 @@ INCLUDE_DIRECTORIES( ${KERNEL_ROOT_DIR}/include/salome ) -SET(COMMON_FLAGS "${PLATFORM_DEFINITIONS}") -SET(COMMON_LIBS ${OGL_LIBS} ${SALOMELocalTrace}) +SET(COMMON_LIBS ${OPENGL_LIBRARIES} ${KERNEL_SALOMELocalTrace}) -ADD_LIBRARY(OpenGLUtils SHARED OpenGLUtils_FrameBuffer.cxx) -SET_TARGET_PROPERTIES(OpenGLUtils PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_LIBRARY(OpenGLUtils OpenGLUtils_FrameBuffer.cxx) TARGET_LINK_LIBRARIES(OpenGLUtils ${COMMON_LIBS}) INSTALL(TARGETS OpenGLUtils DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/Plot2d/CMakeLists.txt b/src/Plot2d/CMakeLists.txt index 669455b41..713a2713f 100755 --- a/src/Plot2d/CMakeLists.txt +++ b/src/Plot2d/CMakeLists.txt @@ -20,8 +20,8 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( - ${QWT_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QWT_INCLUDE_DIR} + ${QT_INCLUDES} ${BOOST_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome @@ -29,8 +29,9 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -SET(COMMON_LIBS ${QWT_LIBS} ${QT_MT_LIBS} ${PYTHON_LIBS} suit) +ADD_DEFINITIONS(${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${PYTHON_DEFINITIONS}) + +SET(COMMON_LIBS ${QWT_LIBRARY} ${QT_LIBRARIES} ${PYTHON_LIBRARIES} suit) SET(GUI_HEADERS Plot2d_FitDataDlg.h @@ -93,7 +94,7 @@ SET(COMMON_HEADERS_H Plot2d_SetupCurveScaleDlg.h ) -IF(ENABLE_PYCONSOLE) +IF(SALOME_USE_PYCONSOLE) SET(COMMON_HEADERS_H ${COMMON_HEADERS_H} Plot2d_AnalyticalCurve.h @@ -110,12 +111,11 @@ IF(ENABLE_PYCONSOLE) ${GUI_HEADERS} Plot2d_AnalyticalCurveDlg.h ) -ENDIF(ENABLE_PYCONSOLE) +ENDIF(SALOME_USE_PYCONSOLE) QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) -ADD_LIBRARY(Plot2d SHARED ${Plot2d_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(Plot2d PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_LIBRARY(Plot2d ${Plot2d_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(Plot2d ${COMMON_LIBS}) INSTALL(TARGETS Plot2d DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/Prs/CMakeLists.txt b/src/Prs/CMakeLists.txt index cd501fbd2..d9e7d75e2 100755 --- a/src/Prs/CMakeLists.txt +++ b/src/Prs/CMakeLists.txt @@ -17,8 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -ADD_LIBRARY(SalomePrs SHARED SALOME_Prs.cxx) -SET_TARGET_PROPERTIES(SalomePrs PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}") +ADD_LIBRARY(SalomePrs SALOME_Prs.cxx) INSTALL(TARGETS SalomePrs DESTINATION ${GUI_salomelib_LIBS}) INSTALL(FILES SALOME_Prs.h DESTINATION ${GUI_salomeinclude_HEADERS}) diff --git a/src/PyConsole/CMakeLists.txt b/src/PyConsole/CMakeLists.txt index cb2316456..f148e7a4b 100755 --- a/src/PyConsole/CMakeLists.txt +++ b/src/PyConsole/CMakeLists.txt @@ -20,7 +20,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${PTHREAD_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome @@ -29,8 +29,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../PyInterp ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -SET(COMMON_LIBS ${PYTHON_LIBS} ${QT_LIBS} ${SALOMELocalTrace} qtx suit PyInterp) +SET(COMMON_LIBS ${PYTHON_LIBRARIES} ${QT_LIBRARIES} ${SALOMELocalTrace} qtx suit PyInterp) SET(GUI_HEADERS PyConsole_Editor.h @@ -49,8 +48,9 @@ SET(GUITS_SOURCES resources/PyConsole_msg_fr.ts ) -ADD_LIBRARY(PyConsole SHARED ${PyConsole_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(PyConsole PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) + +ADD_LIBRARY(PyConsole ${PyConsole_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(PyConsole ${COMMON_LIBS}) INSTALL(TARGETS PyConsole DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/PyInterp/CMakeLists.txt b/src/PyInterp/CMakeLists.txt index d53efed70..f1040fd9d 100755 --- a/src/PyInterp/CMakeLists.txt +++ b/src/PyInterp/CMakeLists.txt @@ -20,14 +20,13 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${PYTHON_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../Event ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -SET(COMMON_LIBS ${PYTHON_LIBS} ${QT_LIBS} Event) +SET(COMMON_LIBS ${PYTHON_LIBRARIES} ${QT_LIBRARIES} Event) SET(GUI_HEADERS PyInterp_Watcher.h) QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) @@ -37,8 +36,9 @@ SET(PyInterp_SOURCES PyInterp_Dispatcher.cxx ) -ADD_LIBRARY(PyInterp SHARED ${PyInterp_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(PyInterp PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) + +ADD_LIBRARY(PyInterp ${PyInterp_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(PyInterp ${COMMON_LIBS}) INSTALL(TARGETS PyInterp DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/QDS/CMakeLists.txt b/src/QDS/CMakeLists.txt index 599c3b33f..4ced7ff0f 100755 --- a/src/QDS/CMakeLists.txt +++ b/src/QDS/CMakeLists.txt @@ -22,14 +22,13 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../DDS ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -SET(COMMON_LIBS ${QT_MT_LIBS} ${CAS_KERNEL} DDS qtx) +SET(COMMON_LIBS ${QT_LIBRARIES} ${CAS_KERNEL} DDS qtx) SET(GUI_HEADERS QDS_CheckBox.h @@ -61,8 +60,9 @@ SET(GUITS_SOURCES resources/QDS_msg_fr.ts ) -ADD_LIBRARY(QDS SHARED ${QDS_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(QDS PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS}) + +ADD_LIBRARY(QDS ${QDS_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(QDS ${COMMON_LIBS}) INSTALL(TARGETS QDS DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/Qtx/CMakeLists.txt b/src/Qtx/CMakeLists.txt index 6a3cba8de..a47e0597f 100755 --- a/src/Qtx/CMakeLists.txt +++ b/src/Qtx/CMakeLists.txt @@ -20,9 +20,11 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ) + + SET(GUI_HEADERS QtxAction.h QtxActionGroup.h @@ -124,9 +126,9 @@ SET(GUITS_SOURCES resources/Qtx_msg_fr.ts ) -ADD_LIBRARY(qtx SHARED ${qtx_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(qtx PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -TARGET_LINK_LIBRARIES(qtx ${QT_MT_LIBS} ${OGL_LIBS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) +ADD_LIBRARY(qtx ${qtx_SOURCES} ${GUI_HEADERS_MOC}) +TARGET_LINK_LIBRARIES(qtx ${QT_LIBRARIES} ${OPENGL_LIBRARIES}) INSTALL(TARGETS qtx DESTINATION ${GUI_salomelib_LIBS}) SET(COMMON_HEADERS_H diff --git a/src/QxGraph/CMakeLists.txt b/src/QxGraph/CMakeLists.txt index 2d3dba532..662cc5eef 100755 --- a/src/QxGraph/CMakeLists.txt +++ b/src/QxGraph/CMakeLists.txt @@ -21,7 +21,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${BOOST_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome @@ -29,8 +29,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -SET(COMMON_LIBS ${QT_MT_LIBS} suit) +SET(COMMON_LIBS ${QT_LIBRARIES} suit) SET(GUI_HEADERS QxGraph_Canvas.h @@ -56,8 +55,9 @@ SET(GUITS_SOURCES resources/QxGraph_msg_fr.ts ) -ADD_LIBRARY(QxGraph SHARED ${QxGraph_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(QxGraph PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_DEFINITIONS("${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS}") + +ADD_LIBRARY(QxGraph ${QxGraph_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(QxGraph ${COMMON_LIBS}) INSTALL(TARGETS QxGraph DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/QxScene/CMakeLists.txt b/src/QxScene/CMakeLists.txt index 28defd202..59f4d468b 100755 --- a/src/QxScene/CMakeLists.txt +++ b/src/QxScene/CMakeLists.txt @@ -21,7 +21,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${BOOST_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome @@ -29,8 +29,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -SET(COMMON_LIBS ${QT_MT_LIBS} suit) +SET(COMMON_LIBS ${QT_LIBRARIES} suit) SET(GUI_HEADERS QxScene_ViewWindow.h @@ -51,8 +50,9 @@ SET(GUITS_SOURCES resources/QxSceneViewer_msg_fr.ts ) -ADD_LIBRARY(QxScene SHARED ${QxScene_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(QxScene PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS}) + +ADD_LIBRARY(QxScene ${QxScene_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(QxScene ${COMMON_LIBS}) INSTALL(TARGETS QxScene DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/ResExporter/CMakeLists.txt b/src/ResExporter/CMakeLists.txt index 169503b37..c23778f92 100755 --- a/src/ResExporter/CMakeLists.txt +++ b/src/ResExporter/CMakeLists.txt @@ -18,19 +18,18 @@ # INCLUDE_DIRECTORIES( - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS qtx suit ${QT_LIBRARIES}) -SET(COMMON_LIBS qtx suit ${QT_LIBS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_EXECUTABLE(ResourceExporter ResourceExporter.cxx) -SET_TARGET_PROPERTIES(ResourceExporter PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") TARGET_LINK_LIBRARIES(ResourceExporter SUITApp ${COMMON_LIBS}) INSTALL(TARGETS ResourceExporter DESTINATION ${GUI_salomebin_BINS}) diff --git a/src/SALOME_PY/CMakeLists.txt b/src/SALOME_PY/CMakeLists.txt index 8322d0186..6fe2ffc4e 100755 --- a/src/SALOME_PY/CMakeLists.txt +++ b/src/SALOME_PY/CMakeLists.txt @@ -19,7 +19,7 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${PYTHON_INCLUDE_DIRS} ${BOOST_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS} @@ -37,13 +37,11 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT ) -SET(COMMON_FLAGS "-DHAVE_CONFIG_H ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") - SET(COMMON_LIBS - ${PYTHON_LIBS} - ${QT_MT_LIBS} - ${VTK_LIBS} - ${OGL_LIBS} + ${PYTHON_LIBRARIES} + ${QT_LIBRARIES} + ${VTK_LIBRARIES} + ${OPENGL_LIBRARIES} LightApp ${vtkCommonPythonD} ${vtkGraphicsPythonD} @@ -51,8 +49,9 @@ SET(COMMON_LIBS ${vtkPythonCore} ) -ADD_LIBRARY(SalomePy SHARED SalomePy.cxx) -SET_TARGET_PROPERTIES(SalomePy PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_DEFINITIONS("-DHAVE_CONFIG_H ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${PYTHON_DEFINITIONS}") + +ADD_LIBRARY(SalomePy SalomePy.cxx) TARGET_LINK_LIBRARIES(SalomePy ${COMMON_LIBS}) INSTALL(TARGETS SalomePy DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/SALOME_PYQT/CMakeLists.txt b/src/SALOME_PYQT/CMakeLists.txt index e9134d20f..fa7d70a89 100755 --- a/src/SALOME_PYQT/CMakeLists.txt +++ b/src/SALOME_PYQT/CMakeLists.txt @@ -20,6 +20,6 @@ ADD_SUBDIRECTORY(SALOME_PYQT_GUILight) ADD_SUBDIRECTORY(SalomePyQt) -IF(GUI_ENABLE_CORBA) +IF(SALOME_USE_CORBA) ADD_SUBDIRECTORY(SALOME_PYQT_GUI) -ENDIF(GUI_ENABLE_CORBA) +ENDIF(SALOME_USE_CORBA) diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt b/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt index 28ca986be..40a9e8d25 100755 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt @@ -19,14 +19,14 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${PTHREAD_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${SIP_INCLUDE_DIRS} ${BOOST_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS} - ${OMNIORB_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIR} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../../PyInterp @@ -42,12 +42,11 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../../STD ) -SET(COMMON_FLAGS "-DCALL_OLD_METHODS -DHAVE_CONFIG_H ${QT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${CORBA_DEFINITIONS} ${PLATFORM_DEFINITIONS}") SET(COMMON_LIBS - ${PYTHON_LIBS} - ${PYQT_LIBS} - ${VTK_LIBS} - ${OGL_LIBS} + ${PYTHON_LIBRARIES} + ${PYQT_LIBRARIES} + ${VTK_LIBRARIES} + ${OPENGL_LIBRARIES} ${PLATFORM_LIBS} PyInterp SalomeApp @@ -59,8 +58,9 @@ SET(COMMON_LIBS SET(GUI_HEADERS SALOME_PYQT_Module.h) QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) -ADD_LIBRARY(SalomePyQtGUI SHARED SALOME_PYQT_Module.cxx ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(SalomePyQtGUI PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_DEFINITIONS("-DCALL_OLD_METHODS -DHAVE_CONFIG_H ${QT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${OMNIORB_DEFINITIONS}") + +ADD_LIBRARY(SalomePyQtGUI SALOME_PYQT_Module.cxx ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SalomePyQtGUI ${COMMON_LIBS}) INSTALL(TARGETS SalomePyQtGUI DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt b/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt index b486ac979..c4c80d4d3 100755 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt @@ -19,8 +19,8 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} - ${SIP_INCLUDE_DIRS} + ${QT_INCLUDES} + ${SIP_INCLUDE_DIR} ${BOOST_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS} @@ -41,18 +41,17 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../../STD ) -SET(COMMON_FLAGS "-DHAVE_CONFIG_H -DCALL_OLD_METHODS ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -SET(COMMON_LIBS ${PYTHON_LIBS} ${PYQT_LIBS} ${VTK_LIBS} ${OGL_LIBS} PyInterp LightApp) +SET(COMMON_LIBS ${PYTHON_LIBRARIES} ${PYQT_LIBRARIES} ${VTK_LIBRARIES} ${OPENGL_LIBRARIES} PyInterp LightApp) -IF(GUI_ENABLE_CORBA) +IF(SALOME_USE_CORBA) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../../SalomeApp - ${OMNIORB_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIR} ) SET(COMMON_LIBS ${COMMON_LIBS} SalomeApp ${SalomeContainer}) -ELSE(GUI_ENABLE_CORBA) +ELSE(SALOME_USE_CORBA) SET(COMMON_FLAGS "${COMMON_FLAGS} -DGUI_DISABLE_CORBA") -ENDIF(GUI_ENABLE_CORBA) +ENDIF(SALOME_USE_CORBA) SET(GUI_HEADERS SALOME_PYQT_PyModule.h SALOME_PYQT_ModuleLight.h SALOME_PYQT_DataModelLight.h) QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) @@ -87,8 +86,10 @@ SET(SalomePyQtGUI_SOURCES SALOME_PYQT_DataModelLight.cxx SALOME_PYQT_PyInterp.cxx ) -ADD_LIBRARY(SalomePyQtGUILight SHARED ${SalomePyQtGUI_SOURCES} ${GUI_HEADERS_MOC} ${SIP_SRC}) -SET_TARGET_PROPERTIES(SalomePyQtGUILight PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") + +ADD_DEFINITIONS( "-DHAVE_CONFIG_H -DCALL_OLD_METHODS ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${PYTHON_DEFINITIONS}") + +ADD_LIBRARY(SalomePyQtGUILight ${SalomePyQtGUI_SOURCES} ${GUI_HEADERS_MOC} ${SIP_SRC}) TARGET_LINK_LIBRARIES(SalomePyQtGUILight ${COMMON_LIBS}) INSTALL(TARGETS SalomePyQtGUILight DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt index 5d5ab7292..441239a8c 100755 --- a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt +++ b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt @@ -19,9 +19,9 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} - ${QWT_INCLUDE_DIRS} - ${SIP_INCLUDE_DIRS} + ${QT_INCLUDES} + ${QWT_INCLUDE_DIR} + ${SIP_INCLUDE_DIR} ${BOOST_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} @@ -45,15 +45,13 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../../ObjBrowser ${CMAKE_CURRENT_SOURCE_DIR}/../../OBJECT ) -# -DHAVE_CONFIG_H -SET(COMMON_FLAGS "${QWT_DEFINITIONS} ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") SET(COMMON_LIBS - ${PYTHON_LIBS} + ${PYTHON_LIBRARIES} ${SIP_LIBS} - ${PYQT_LIBS} - ${VTK_LIBS} - ${QWT_LIBS} - ${OGL_LIBS} + ${PYQT_LIBRARIES} + ${VTK_LIBRARIES} + ${QWT_LIBRARY} + ${OPENGL_LIBRARIES} suit CAM std @@ -98,8 +96,10 @@ ENDFOREACH(input ${SIP_FILES}) SET(SalomePyQt_SOURCES SalomePyQt.cxx) -ADD_LIBRARY(SalomePyQt SHARED ${SalomePyQt_SOURCES} ${GUI_HEADERS_MOC} ${SIP_SRC}) -SET_TARGET_PROPERTIES(SalomePyQt PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +# -DHAVE_CONFIG_H +ADD_DEFINITIONS("${QWT_DEFINITIONS} ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${PYTHON_DEFINITIONS}") + +ADD_LIBRARY(SalomePyQt ${SalomePyQt_SOURCES} ${GUI_HEADERS_MOC} ${SIP_SRC}) TARGET_LINK_LIBRARIES(SalomePyQt ${COMMON_LIBS}) INSTALL(TARGETS SalomePyQt DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/SALOME_SWIG/CMakeLists.txt b/src/SALOME_SWIG/CMakeLists.txt index 08943c209..06bf37fec 100755 --- a/src/SALOME_SWIG/CMakeLists.txt +++ b/src/SALOME_SWIG/CMakeLists.txt @@ -28,8 +28,8 @@ SET_SOURCE_FILES_PROPERTIES(libSALOME_SwigPYTHON_wrap.cxx PROPERTIES COMPILE_FLA INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} - ${QWT_INCLUDE_DIRS} + ${QT_INCLUDES} + ${QWT_INCLUDE_DIR} ${VTK_INCLUDE_DIRS} ${BOOST_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} @@ -55,11 +55,10 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../Plot2d ) -SET(COMMON_FLAGS "${PYTHON_DEFINITIONS} ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${VTK_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${VTK_DEFINITIONS} ${BOOST_DEFINITIONS}) SWIG_ADD_MODULE(libSALOME_Swig python libSALOME_Swig.i SALOMEGUI_Swig.cxx) -SWIG_LINK_LIBRARIES(libSALOME_Swig LightApp ${PYTHON_LIBS}) -SET_TARGET_PROPERTIES(_libSALOME_Swig PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +SWIG_LINK_LIBRARIES(libSALOME_Swig LightApp ${PYTHON_LIBRARIES}) IF(WINDOWS) SET_TARGET_PROPERTIES(_libSALOME_Swig PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_Swig_d) diff --git a/src/SOCC/CMakeLists.txt b/src/SOCC/CMakeLists.txt index d7c6c1dd5..a111cf9a0 100755 --- a/src/SOCC/CMakeLists.txt +++ b/src/SOCC/CMakeLists.txt @@ -19,7 +19,7 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${BOOST_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome @@ -30,8 +30,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -SET(COMMON_LIBS ${QT_LIBS} qtx suit SalomeObject SalomePrs OCCViewer) +SET(COMMON_LIBS ${QT_LIBRARIES} qtx suit SalomeObject SalomePrs OCCViewer) SET(GUI_HEADERS SOCC_ViewModel.h @@ -45,8 +44,9 @@ SET(SOCC_SOURCES SOCC_ViewWindow.cxx ) -ADD_LIBRARY(SOCC SHARED ${SOCC_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(SOCC PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS}) + +ADD_LIBRARY(SOCC ${SOCC_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SOCC ${COMMON_LIBS}) INSTALL(TARGETS SOCC DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/SPlot2d/CMakeLists.txt b/src/SPlot2d/CMakeLists.txt index 3c7cc7064..70f4c26c7 100755 --- a/src/SPlot2d/CMakeLists.txt +++ b/src/SPlot2d/CMakeLists.txt @@ -19,9 +19,9 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${BOOST_INCLUDE_DIRS} - ${QWT_INCLUDE_DIRS} + ${QWT_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx @@ -31,7 +31,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${QWT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +ADD_DEFINITIONS("${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${QWT_DEFINITIONS}") SET(COMMON_LIBS suit Plot2d SalomePrs SalomeObject) SET(GUI_HEADERS @@ -48,8 +48,7 @@ SET(SPlot2d_SOURCES SPlot2d_ViewWindow.cxx ) -ADD_LIBRARY(SPlot2d SHARED ${SPlot2d_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(SPlot2d PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_LIBRARY(SPlot2d ${SPlot2d_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SPlot2d ${COMMON_LIBS}) INSTALL(TARGETS SPlot2d DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/STD/CMakeLists.txt b/src/STD/CMakeLists.txt index f2b4ff424..ffda4b201 100755 --- a/src/STD/CMakeLists.txt +++ b/src/STD/CMakeLists.txt @@ -20,14 +20,13 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -SET(COMMON_LIBS ${QT_MT_LIBS} suit qtx) +SET(COMMON_LIBS ${QT_LIBRARIES} suit qtx) SET(GUI_HEADERS STD_Application.h @@ -50,8 +49,9 @@ SET(GUITS_SOURCES resources/STD_msg_fr.ts ) -ADD_LIBRARY(std SHARED ${std_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(std PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +ADD_LIBRARY(std ${std_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(std ${COMMON_LIBS}) INSTALL(TARGETS std DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/SUIT/CMakeLists.txt b/src/SUIT/CMakeLists.txt index e2f2c98e2..78fee94b6 100644 --- a/src/SUIT/CMakeLists.txt +++ b/src/SUIT/CMakeLists.txt @@ -20,7 +20,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../ObjBrowser @@ -29,12 +29,11 @@ INCLUDE_DIRECTORIES( SET(COMMON_LIBS qtx ObjBrowser - ${QT_LIBS} + ${QT_LIBRARIES} ${PLATFORM_LIBS} ) -SET(COMMON_FLAGS "${PLATFORM_DEFINITIONS}") IF(ENABLE_TESTRECORDER) - SET(COMMON_FLAGS "${COMMON_FLAGS} -DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") + ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") SET(COMMON_LIBS ${COMMON_LIBS} ${TESTRECORDER_LIBS}) ENDIF(ENABLE_TESTRECORDER) @@ -102,8 +101,7 @@ SET(GUITS_SOURCES resources/SUIT_images.ts ) -ADD_LIBRARY(suit SHARED ${suit_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(suit PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_LIBRARY(suit ${suit_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(suit ${COMMON_LIBS}) INSTALL(TARGETS suit DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/SUITApp/CMakeLists.txt b/src/SUITApp/CMakeLists.txt index 8bdd3a252..e0216655a 100755 --- a/src/SUITApp/CMakeLists.txt +++ b/src/SUITApp/CMakeLists.txt @@ -20,7 +20,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${PTHREAD_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} @@ -30,13 +30,13 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../Style ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + SET(COMMON_LIBS qtx suit SalomeStyle - ${QT_MT_LIBS} + ${QT_LIBRARIES} ) SET(GUI_HEADERS SUITApp_Application.h) @@ -47,7 +47,7 @@ SET(SUITApp_SOURCES SUITApp_Application.cxx ) SET(COMMON_HEADERS_HXX) -IF(ENABLE_PYCONSOLE) +IF(SALOME_USE_PYCONSOLE) SET(COMMON_HEADERS_HXX ${COMMON_HEADERS_HXX} SUITApp_init_python.hxx @@ -58,16 +58,12 @@ IF(ENABLE_PYCONSOLE) ) SET(COMMON_LIBS ${COMMON_LIBS} - ${PYTHON_LIBS} + ${PYTHON_LIBRARIES} ) -ENDIF(ENABLE_PYCONSOLE) +ENDIF(SALOME_USE_PYCONSOLE) IF(ENABLE_TESTRECORDER) - SET(COMMON_FLAGS - ${COMMON_FLAGS} - -DENABLE_TESTRECORDER - ${TESTRECORDER_DEFINITIONS} - ) + ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") SET(COMMON_LIBS ${COMMON_LIBS} ${TESTRECORDER_LIBS} @@ -79,13 +75,14 @@ SET(GUITS_SOURCES resources/SUITApp_msg_fr.ts ) -ADD_LIBRARY(SUITApp SHARED ${SUITApp_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(SUITApp PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) + +ADD_LIBRARY(SUITApp ${SUITApp_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SUITApp ${COMMON_LIBS}) INSTALL(TARGETS SUITApp DESTINATION ${GUI_salomelib_LIBS}) ADD_EXECUTABLE(TestSUITApp SUITApp.cxx) -SET_TARGET_PROPERTIES(TestSUITApp PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}" OUTPUT_NAME "SUITApp") +SET_TARGET_PROPERTIES(TestSUITApp PROPERTIES OUTPUT_NAME "SUITApp") TARGET_LINK_LIBRARIES(TestSUITApp SUITApp ${COMMON_LIBS}) INSTALL(TARGETS TestSUITApp DESTINATION ${GUI_salomebin_BINS}) diff --git a/src/SUPERVGraph/CMakeLists.txt b/src/SUPERVGraph/CMakeLists.txt index 2fc8b3f00..1140e6dad 100755 --- a/src/SUPERVGraph/CMakeLists.txt +++ b/src/SUPERVGraph/CMakeLists.txt @@ -21,10 +21,10 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${BOOST_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT @@ -56,9 +56,10 @@ SET(GUITS_SOURCES resources/SUPERVGraph_msg_fr.ts ) -ADD_LIBRARY(SUPERVGraph SHARED ${SUPERVGraph_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(SUPERVGraph PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${PYTHON_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -TARGET_LINK_LIBRARIES(SUPERVGraph ${QT_MT_LIBS} suit SalomeObject) +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${PYTHON_DEFINITIONS} ${BOOST_DEFINITIONS}) + +ADD_LIBRARY(SUPERVGraph ${SUPERVGraph_SOURCES} ${GUI_HEADERS_MOC}) +TARGET_LINK_LIBRARIES(SUPERVGraph ${QT_LIBRARIES} suit SalomeObject) INSTALL(TARGETS SUPERVGraph DESTINATION ${GUI_salomelib_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") diff --git a/src/SVTK/CMakeLists.txt b/src/SVTK/CMakeLists.txt index de49ce5cd..90a85743e 100755 --- a/src/SVTK/CMakeLists.txt +++ b/src/SVTK/CMakeLists.txt @@ -21,7 +21,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${VTK_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${BOOST_INCLUDE_DIRS} @@ -35,7 +35,9 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../VTKViewer ${CMAKE_CURRENT_SOURCE_DIR}/../OpenGLUtils ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${VTK_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${VTK_DEFINITIONS} ${BOOST_DEFINITIONS}) + SET(COMMON_LIBS qtx suit @@ -44,11 +46,11 @@ SET(COMMON_LIBS SalomePrs VTKViewer OpenGLUtils - ${SALOMELocalTrace} - ${OpUtil} - ${VTK_LIBS} - ${OGL_LIBS} - ${QT_MT_LIBS} + ${KERNEL_SALOMELocalTrace} + ${KERNEL_OpUtil} + ${VTK_LIBRARIES} + ${OPENGL_LIBRARIES} + ${QT_LIBRARIES} ${CAS_KERNEL} ${CAS_VIEWER} ) @@ -102,8 +104,7 @@ SET(GUITS_SOURCES resources/SVTK_images.ts ) -ADD_LIBRARY(SVTK SHARED ${SVTK_SOURCES} ${GUI_HEADERS}) -SET_TARGET_PROPERTIES(SVTK PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_LIBRARY(SVTK ${SVTK_SOURCES} ${GUI_HEADERS}) TARGET_LINK_LIBRARIES(SVTK ${COMMON_LIBS}) INSTALL(TARGETS SVTK DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/SalomeApp/CMakeLists.txt b/src/SalomeApp/CMakeLists.txt index 7f9888e46..a7bdab445 100755 --- a/src/SalomeApp/CMakeLists.txt +++ b/src/SalomeApp/CMakeLists.txt @@ -20,9 +20,9 @@ ADD_SUBDIRECTORY(pluginsdemo) IF(CPPUNIT_IS_OK) - IF(GUI_ENABLE_CORBA) + IF(SALOME_USE_CORBA) ADD_SUBDIRECTORY(Test) - ENDIF(GUI_ENABLE_CORBA) + ENDIF(SALOME_USE_CORBA) ENDIF(CPPUNIT_IS_OK) INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) @@ -30,13 +30,13 @@ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${VTK_INCLUDE_DIRS} - ${QWT_INCLUDE_DIRS} + ${QWT_INCLUDE_DIR} ${BOOST_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} - ${OMNIORB_INCLUDE_DIRS} - ${LIBXML_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIR} + ${LIBXML2_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../LightApp @@ -58,10 +58,10 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../Prs ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${LIBXML_DEFINITIONS} ${CORBA_DEFINITIONS} ${VTK_DEFINITIONS} ${QWT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + SET(COMMON_LIBS - ${PYTHON_LIBS} - ${QT_MT_LIBS} + ${PYTHON_LIBRARIES} + ${QT_LIBRARIES} ${OpUtil} ${SALOMELocalTrace} ${SalomeDSClient} @@ -135,8 +135,9 @@ SET(GUITS_SOURCES resources/SalomeApp_msg_fr.ts ) -ADD_LIBRARY(SalomeApp SHARED ${SalomeApp_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(SalomeApp PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_DEFINITIONS(${QT_DEFINITIONS} ${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${VTK_DEFINITIONS} ${QWT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS}) + +ADD_LIBRARY(SalomeApp ${SalomeApp_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SalomeApp ${COMMON_LIBS}) INSTALL(TARGETS SalomeApp DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/SalomeApp/Test/CMakeLists.txt b/src/SalomeApp/Test/CMakeLists.txt index a4777c43a..7139b206e 100755 --- a/src/SalomeApp/Test/CMakeLists.txt +++ b/src/SalomeApp/Test/CMakeLists.txt @@ -23,15 +23,14 @@ INCLUDE_DIRECTORIES( ) SET(COMMON_LIBS ${CPPUNIT_LIBS} ${PLATFORM_LIBS}) -SET(COMMON_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -ADD_LIBRARY(SalomeAppTest SHARED SalomeAppTest.cxx) -SET_TARGET_PROPERTIES(SalomeAppTest PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS}) + +ADD_LIBRARY(SalomeAppTest SalomeAppTest.cxx) TARGET_LINK_LIBRARIES(SalomeAppTest ${COMMON_LIBS}) INSTALL(TARGETS SalomeAppTest DESTINATION ${GUI_salomelib_LIBS}) ADD_EXECUTABLE(TestSalomeApp TestSalomeApp.cxx) -SET_TARGET_PROPERTIES(TestSalomeApp PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") TARGET_LINK_LIBRARIES(TestSalomeApp SalomeAppTest ${COMMON_LIBS}) INSTALL(TARGETS TestSalomeApp DESTINATION ${GUI_salomebin_BINS}) diff --git a/src/Session/CMakeLists.txt b/src/Session/CMakeLists.txt index 2a8cf2c8d..5e16543de 100755 --- a/src/Session/CMakeLists.txt +++ b/src/Session/CMakeLists.txt @@ -18,13 +18,13 @@ # INCLUDE_DIRECTORIES( - ${QT_INCLUDE_DIRS} - ${LIBXML_INCLUDE_DIRS} + ${QT_INCLUDES} + ${LIBXML2_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS} ${BOOST_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS} - ${OMNIORB_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl @@ -37,30 +37,31 @@ INCLUDE_DIRECTORIES( ) SET(COMMON_LIBS - ${SalomeNS} - ${SalomeLifeCycleCORBA} - ${OpUtil} - ${SALOMELocalTrace} - ${SalomeCatalog} - ${SalomeDSClient} + ${KERNEL_SalomeNS} + ${KERNEL_SalomeLifeCycleCORBA} + ${KERNEL_OpUtil} + ${KERNEL_SALOMELocalTrace} + ${KERNEL_SalomeCatalog} + ${KERNEL_SalomeDSClient} ${CAS_KERNEL} - ${with_loggerTraceCollector} - ${SalomeIDLKernel} - ${SalomeContainer} - ${TOOLSDS} - ${SalomeLauncher} - ${Registry} - ${SALOMEBasics} + ${KERNEL_with_loggerTraceCollector} + ${KERNEL_SalomeIDLKernel} + ${KERNEL_SalomeContainer} + ${KERNEL_TOOLSDS} + ${KERNEL_SalomeLauncher} + ${KERNEL_Registry} + ${KERNEL_SALOMEBasics} suit Event SalomeIDLGUI SalomeStyle - ${QT_LIBS} + ${QT_LIBRARIES} ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${LIBXML_DEFINITIONS} ${PYTHON_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${CAS_DEFINITIONS} ${CORBA_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +ADD_DEFINITIONS(${QT_DEFINITIONS} ${LIBXML2_DEFINITIONS} ${PYTHON_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${CAS_DEFINITIONS} ${OMNIORB_DEFINITIONS}) IF(ENABLE_TESTRECORDER) - SET(COMMON_FLAGS "${COMMON_FLAGS} -DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") + ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") SET(COMMON_LIBS ${COMMON_LIBS} ${TESTRECORDER_LIBS}) ENDIF(ENABLE_TESTRECORDER) @@ -70,8 +71,7 @@ SET(SalomeSession_SOURCES Session_ServerLauncher.cxx Session_ServerCheck.cxx ) -ADD_LIBRARY(SalomeSession SHARED ${SalomeSession_SOURCES}) -SET_TARGET_PROPERTIES(SalomeSession PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_LIBRARY(SalomeSession ${SalomeSession_SOURCES}) TARGET_LINK_LIBRARIES(SalomeSession ${COMMON_LIBS}) INSTALL(TARGETS SalomeSession DESTINATION ${GUI_salomelib_LIBS}) @@ -90,12 +90,11 @@ SET(SALOME_Session_Server_LIBS qtx SalomeIDLGUI SalomeSession - ${HDF5_LIBS} - ${PYTHON_LIBS} - ${OMNIORB_LIBS} + ${HDF5_LIBRARIES} + ${PYTHON_LIBRARIES} + ${OMNIORB_LIBRARIES} ) ADD_EXECUTABLE(SALOME_Session_Server SALOME_Session_Server.cxx) -SET_TARGET_PROPERTIES(SALOME_Session_Server PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") TARGET_LINK_LIBRARIES(SALOME_Session_Server ${SALOME_Session_Server_LIBS}) INSTALL(TARGETS SALOME_Session_Server DESTINATION ${GUI_salomebin_BINS}) diff --git a/src/Session/Session_ServerLauncher.hxx b/src/Session/Session_ServerLauncher.hxx index c2cd32176..f39740866 100755 --- a/src/Session/Session_ServerLauncher.hxx +++ b/src/Session/Session_ServerLauncher.hxx @@ -29,7 +29,7 @@ #include "SALOME_Session.hxx" -#include +#include #include #include #include diff --git a/src/Session/Session_ServerThread.hxx b/src/Session/Session_ServerThread.hxx index 46bd6d3cd..7811af57e 100755 --- a/src/Session/Session_ServerThread.hxx +++ b/src/Session/Session_ServerThread.hxx @@ -29,7 +29,7 @@ #include "SALOME_Session.hxx" -#include +#include #include void WaitForServerReadiness(std::string serverName); diff --git a/src/Style/CMakeLists.txt b/src/Style/CMakeLists.txt index 3ca61786d..6791dcd71 100755 --- a/src/Style/CMakeLists.txt +++ b/src/Style/CMakeLists.txt @@ -19,14 +19,13 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ) -SET(COMMON_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -SET(COMMON_LIBS ${QT_MT_LIBS} qtx) +SET(COMMON_LIBS ${QT_LIBRARIES} qtx) SET(GUI_HEADERS Style_PrefDlg.h @@ -55,8 +54,9 @@ SET(GUITS_SOURCES resources/Style_msg_fr.ts ) -ADD_LIBRARY(SalomeStyle SHARED ${SalomeStyle_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) -SET_TARGET_PROPERTIES(SalomeStyle PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +ADD_LIBRARY(SalomeStyle ${SalomeStyle_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) TARGET_LINK_LIBRARIES(SalomeStyle ${COMMON_LIBS}) INSTALL(TARGETS SalomeStyle DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/TOOLSGUI/CMakeLists.txt b/src/TOOLSGUI/CMakeLists.txt index ad53d1d8a..3be5ad58f 100755 --- a/src/TOOLSGUI/CMakeLists.txt +++ b/src/TOOLSGUI/CMakeLists.txt @@ -21,8 +21,8 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} - ${OMNIORB_INCLUDE_DIRS} + ${QT_INCLUDES} + ${OMNIORB_INCLUDE_DIR} ${BOOST_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome @@ -31,7 +31,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT) SET(COMMON_LIBS - ${QT_MT_LIBS} + ${QT_LIBRARIES} suit ${CAS_KERNEL} ${SalomeIDLKernel} @@ -54,8 +54,10 @@ SET(GUITS_SOURCES resources/ToolsGUI_msg_fr.ts ) -ADD_LIBRARY(ToolsGUI SHARED ${ToolsGUI_SOURCES} ${GUI_HEADERS}) -SET_TARGET_PROPERTIES(ToolsGUI PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS}) + + +ADD_LIBRARY(ToolsGUI ${ToolsGUI_SOURCES} ${GUI_HEADERS}) TARGET_LINK_LIBRARIES(ToolsGUI ${COMMON_LIBS}) INSTALL(TARGETS ToolsGUI DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/TreeData/CMakeLists.txt b/src/TreeData/CMakeLists.txt index d41e6256f..90eeae5d1 100755 --- a/src/TreeData/CMakeLists.txt +++ b/src/TreeData/CMakeLists.txt @@ -22,8 +22,8 @@ ADD_SUBDIRECTORY(Test) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} - ${OMNIORB_INCLUDE_DIRS} + ${QT_INCLUDES} + ${OMNIORB_INCLUDE_DIR} ${BOOST_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome @@ -37,14 +37,13 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../GuiHelpers ) -SET(COMMON_FLAGS "${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") SET(COMMON_LIBS - ${CORBA_LIBS} - ${QT_LIBS} + ${OMNIORB_LIBRARIES} + ${QT_LIBRARIES} ${KERNEL_LDFLAGS} - ${SalomeLifeCycleCORBA} - ${SalomeKernelHelpers} + ${KERNEL_SalomeLifeCycleCORBA} + ${KERNEL_SalomeKernelHelpers} SalomeApp LightApp suit @@ -68,8 +67,9 @@ SET(SalomeTreeData_SOURCES TreeGuiManager.cxx ) -ADD_LIBRARY(SalomeTreeData SHARED ${SalomeTreeData_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(SalomeTreeData PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS}) + +ADD_LIBRARY(SalomeTreeData ${SalomeTreeData_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SalomeTreeData ${COMMON_LIBS}) INSTALL(TARGETS SalomeTreeData DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/TreeData/Test/CMakeLists.txt b/src/TreeData/Test/CMakeLists.txt index 560aa8e88..c872a9b3c 100755 --- a/src/TreeData/Test/CMakeLists.txt +++ b/src/TreeData/Test/CMakeLists.txt @@ -19,8 +19,8 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( - ${OMNIORB_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIR} + ${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_SOURCE_DIR}/src/GuiHelpers @@ -29,7 +29,7 @@ INCLUDE_DIRECTORIES( SET(COMMON_LIBS ${CORBA_LIBS} - ${QT_LIBS} + ${QT_LIBRARIES} SalomeTreeData SalomeGuiHelpers ${SalomeLifeCycleCORBA} @@ -51,8 +51,9 @@ SET(TreeData_guitester_SOURCES MyDataModel.cxx ) +ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${QT_DEFINITIONS}) + ADD_EXECUTABLE(TreeData_guitester ${TreeData_guitester_SOURCES} ${GUI_HEADERS} ${GUI_FORMS_HEADERS}) -SET_TARGET_PROPERTIES(TreeData_guitester PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") TARGET_LINK_LIBRARIES(TreeData_guitester ${COMMON_LIBS}) SET(TreeData_tester_SOURCES @@ -61,7 +62,6 @@ SET(TreeData_tester_SOURCES ) ADD_EXECUTABLE(TreeData_tester ${TreeData_tester_SOURCES}) -SET_TARGET_PROPERTIES(TreeData_tester PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") TARGET_LINK_LIBRARIES(TreeData_tester ${COMMON_LIBS}) INSTALL(TARGETS TreeData_guitester TreeData_tester DESTINATION ${GUI_salomebin_BINS}) diff --git a/src/VTKViewer/CMakeLists.txt b/src/VTKViewer/CMakeLists.txt index 7d0442f1d..51780f7dd 100755 --- a/src/VTKViewer/CMakeLists.txt +++ b/src/VTKViewer/CMakeLists.txt @@ -20,7 +20,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${VTK_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome @@ -28,8 +28,9 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ) -SET(COMMON_FLAGS "${VTK_DEFINITIONS} ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -SET(COMMON_LIBS ${QT_MT_LIBS} ${OGL_LIBS} ${VTK_LIBS} ${CAS_KERNEL} qtx suit ${SALOMELocalTrace}) +ADD_DEFINITIONS(${VTK_DEFINITIONS} ${CAS_DEFINITIONS} ${QT_DEFINITIONS}) + +SET(COMMON_LIBS ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${VTK_LIBRARIES} ${CAS_KERNEL} qtx suit ${SALOMELocalTrace}) SET(GUI_HEADERS VTKViewer_RenderWindow.h @@ -83,8 +84,7 @@ SET(GUITS_SOURCES resources/VTKViewer_msg_fr.ts ) -ADD_LIBRARY(VTKViewer SHARED ${VTKViewer_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) -SET_TARGET_PROPERTIES(VTKViewer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +ADD_LIBRARY(VTKViewer ${VTKViewer_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) TARGET_LINK_LIBRARIES(VTKViewer ${COMMON_LIBS}) INSTALL(TARGETS VTKViewer DESTINATION ${GUI_salomelib_LIBS}) diff --git a/src/ViewerTools/CMakeLists.txt b/src/ViewerTools/CMakeLists.txt index 538c95358..c71956cf1 100755 --- a/src/ViewerTools/CMakeLists.txt +++ b/src/ViewerTools/CMakeLists.txt @@ -20,7 +20,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( - ${QT_INCLUDE_DIRS} + ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ) SET(GUI_HEADERS ViewerTools_CubeAxesDlgBase.h ViewerTools_DialogBase.h ViewerTools_FontWidgetBase.h) @@ -36,9 +36,10 @@ SET(GUITS_SOURCES resources/ViewerTools_msg_fr.ts ) -ADD_LIBRARY(ViewerTools SHARED ${ViewerTools_SOURCES} ${GUI_HEADERS_MOC}) -SET_TARGET_PROPERTIES(ViewerTools PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") -TARGET_LINK_LIBRARIES(ViewerTools qtx ${QT_MT_LIBS}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +ADD_LIBRARY(ViewerTools ${ViewerTools_SOURCES} ${GUI_HEADERS_MOC}) +TARGET_LINK_LIBRARIES(ViewerTools qtx ${QT_LIBRARIES}) INSTALL(TARGETS ViewerTools DESTINATION ${GUI_salomelib_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") diff --git a/tools/dlgfactory/CMakeLists.txt b/tools/dlgfactory/CMakeLists.txt new file mode 100755 index 000000000..2821d4d37 --- /dev/null +++ b/tools/dlgfactory/CMakeLists.txt @@ -0,0 +1,95 @@ +# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ) + + +SET(qtester_SOURCES + qtester.cxx + ) + +SET(qtester_HEADERS + ${CMAKE_CURRENT_BINARY_DIR}/QDialogTest.hxx + ) + +SET(qtester_FORMS + ${CMAKE_CURRENT_BINARY_DIR}/QDialogTest.ui + ) + +SET(gtester_SOURCES + gtester.cxx + GenericDialog.cxx + ) + +SET(gtester_HEADERS + ${CMAKE_CURRENT_BINARY_DIR}/GDialogTest.hxx + ) + +SET(gtester_FORMS + ${CMAKE_CURRENT_BINARY_DIR}/GDialogTest.ui + ) + +SET(GenericDialog_HEADERS + GenericDialog.hxx + ) + +SET(GenericDialog_FORMS + GenericDialog.ui + ) + +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +ADD_CUSTOM_COMMAND( OUTPUT QDialogTest.cxx QDialogTest.hxx QDialogTest.ui + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/dlgfactory.py -s -n QDialogTest -t qdialog + ) + +ADD_CUSTOM_COMMAND( OUTPUT GDialogTest.cxx GDialogTest.hxx GDialogTest.ui + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/dlgfactory.py -s -n GDialogTest -t gdialog + ) + +QT4_WRAP_UI(qtester_FORMS_HEADERS ${qtester_FORMS} ) +QT4_WRAP_CPP(qtester_HEADERS_MOC ${qtester_HEADERS}) + + +QT4_WRAP_UI(gtester_FORMS_HEADERS ${gtester_FORMS} ) +QT4_WRAP_CPP(gtester_HEADERS_MOC ${gtester_HEADERS}) + +QT4_WRAP_UI(GenericDialog_FORMS_HEADERS ${GenericDialog_FORMS} ) +QT4_WRAP_CPP(GenericDialog_HEADERS_MOC ${GenericDialog_HEADERS}) + +ADD_EXECUTABLE(qtester ${qtester_SOURCES} + ${qtester_HEADERS_MOC} + ${qtester_FORMS_HEADERS} + QDialogTest.cxx + ) +TARGET_LINK_LIBRARIES(qtester ${QT_LIBRARIES}) + +ADD_EXECUTABLE(gtester ${gtester_SOURCES} + ${gtester_HEADERS_MOC} + ${gtester_FORMS_HEADERS} + ${GenericDialog_HEADERS_MOC} + ${GenericDialog_FORMS_HEADERS} + GDialogTest.cxx + ) +TARGET_LINK_LIBRARIES(gtester ${QT_LIBRARIES}) + +INSTALL(TARGETS qtester gtester DESTINATION ${GUI_salomebin_BINS}) diff --git a/tools/dlgfactory/GenericDialog.hxx b/tools/dlgfactory/GenericDialog.hxx index ee946617d..1c9d7ea69 100644 --- a/tools/dlgfactory/GenericDialog.hxx +++ b/tools/dlgfactory/GenericDialog.hxx @@ -2,7 +2,7 @@ #define _GenericDialog_HXX #include -#include "ui_GenericDialog.hxx" +#include "ui_GenericDialog.h" class GenericDialog : public QDialog { diff --git a/tools/dlgfactory/Makefile.am b/tools/dlgfactory/Makefile.am index c83870fa7..9f6021b85 100644 --- a/tools/dlgfactory/Makefile.am +++ b/tools/dlgfactory/Makefile.am @@ -20,14 +20,6 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am -# moc-files generation (using MOC) -%_moc.cxx: %.hxx - $(MOC) $< -o $@ - -# Qt form files generation (using UIC) -ui_%.hxx: %.ui - $(UIC) -o $@ $< - # Program targets bin_PROGRAMS = qtester gtester diff --git a/tools/dlgfactory/__GDIALOG__.hxx b/tools/dlgfactory/__GDIALOG__.hxx index ab805a197..ed1547079 100644 --- a/tools/dlgfactory/__GDIALOG__.hxx +++ b/tools/dlgfactory/__GDIALOG__.hxx @@ -2,7 +2,7 @@ #define ___CLASSNAME___HXX #include -#include "ui___CLASSNAME__.hxx" +#include "ui___CLASSNAME__.h" #include "GenericDialog.hxx" class __CLASSNAME__ : public GenericDialog diff --git a/tools/dlgfactory/__QDIALOG__.hxx b/tools/dlgfactory/__QDIALOG__.hxx index 3865e170b..b2cfd4f7f 100644 --- a/tools/dlgfactory/__QDIALOG__.hxx +++ b/tools/dlgfactory/__QDIALOG__.hxx @@ -2,7 +2,7 @@ #define ___CLASSNAME___HXX #include -#include "ui___CLASSNAME__.hxx" +#include "ui___CLASSNAME__.h" class __CLASSNAME__ : public QDialog { diff --git a/tools/vtkEDFOverloads/CMakeLists.txt b/tools/vtkEDFOverloads/CMakeLists.txt index 43a3ca9d5..70a9dcec6 100755 --- a/tools/vtkEDFOverloads/CMakeLists.txt +++ b/tools/vtkEDFOverloads/CMakeLists.txt @@ -21,14 +21,14 @@ INCLUDE_DIRECTORIES( ${VTK_INCLUDE_DIRS} ) -ADD_LIBRARY(vtkTools SHARED vtkEDFCutter.cxx) -SET_TARGET_PROPERTIES(vtkTools PROPERTIES COMPILE_FLAGS "${VTK_DEFINITIONS}") -TARGET_LINK_LIBRARIES(vtkTools ${VTK_LIBS}) +ADD_DEFINITIONS(${VTK_DEFINITIONS}) + +ADD_LIBRARY(vtkTools vtkEDFCutter.cxx) +TARGET_LINK_LIBRARIES(vtkTools ${VTK_LIBRARIES}) INSTALL(TARGETS vtkTools DESTINATION ${GUI_salomelib_LIBS}) -ADD_LIBRARY(vtkEDFOverloads SHARED vtkEDFFactory.cxx) -SET_TARGET_PROPERTIES(vtkEDFOverloads PROPERTIES COMPILE_FLAGS "${VTK_DEFINITIONS}") -TARGET_LINK_LIBRARIES(vtkEDFOverloads ${VTK_LIBS} vtkTools) +ADD_LIBRARY(vtkEDFOverloads vtkEDFFactory.cxx) +TARGET_LINK_LIBRARIES(vtkEDFOverloads ${VTK_LIBRARIES} vtkTools) INSTALL(TARGETS vtkEDFOverloads DESTINATION ${GUI_paraviewlib_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -- 2.39.2