From: vsr Date: Thu, 28 Feb 2013 13:46:34 +0000 (+0000) Subject: Merge from V6_main 28/02/2013 X-Git-Tag: V7_1_0b1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=373ceb017989dce241907729a6391ce0af8b9dcb;p=modules%2Fgui.git Merge from V6_main 28/02/2013 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a03543dd2..3fe5f77b1 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,56 +16,121 @@ # # 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 "7.0.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) - 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) - 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) +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) -ENDIF(KERNEL_ROOT_DIR) +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}) + +# directories for packages detection +SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${KERNEL_ROOT_DIR}/salome_adm/cmake_files ${CMAKE_SOURCE_DIR}/adm_local/cmake_files) + +find_package(PLATFORM) + + +# Threads +SET(CMAKE_THREAD_PREFER_PTHREAD) +find_package(Threads REQUIRED) + + +# required prerequisites from KERNEL + +find_package(SalomePYTHON) +find_package(SalomeSWIG) +find_package(SalomeLIBXML2) +find_package(SalomeHDF5) +find_package(SalomeBOOST) + +# required prerequisites for GUI + +find_package(SalomeQT4) +find_package(SalomeSIP) +find_package(SalomePYQT4) + +# optional prerequisites from KERNEL + +if(SALOME_USE_MPI OR HDF5_IS_PARALLEL) + find_package(SalomeMPI) +endif(SALOME_USE_MPI OR HDF5_IS_PARALLEL) + +if(SALOME_USE_CORBA) + find_package(OMNIORB) +endif(SALOME_USE_CORBA) + +if(SALOME_USE_TEST) + find_package(SalomeCPPUNIT) +endif(SALOME_USE_TEST) + +if(SALOME_USE_DOC) + find_package(SalomeDOXYGEN) + find_package(SalomeSPHINX) +endif(SALOME_USE_DOC) + +if(SALOME_USE_LIBBATCH) + find_package(LIBBATCH) +endif(SALOME_USE_LIBBATCH) + + +# optional prerequisites for GUI + +if(SALOME_USE_OCCVIEWER) + find_package(SalomeCAS) +endif(SALOME_USE_OCCVIEWER) + +if(SALOME_USE_GLVIEWER) + find_package(OpenGL REQUIRED) +endif(SALOME_USE_GLVIEWER) + +if(SALOME_USE_VTKVIEWER) + find_package(SalomeVTK) +endif(SALOME_USE_VTKVIEWER) -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) +if(SALOME_USE_PLOT2DVIEWER) + find_package(SalomeQWT) +endif(SALOME_USE_PLOT2DVIEWER) 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 +159,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 +169,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/CMakeLists.txt b/adm_local/cmake_files/CMakeLists.txt index e3f73dcfc..df176de9b 100755 --- a/adm_local/cmake_files/CMakeLists.txt +++ b/adm_local/cmake_files/CMakeLists.txt @@ -17,6 +17,8 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +ADD_SUBDIRECTORY(deprecated) + # =============================================================== # Files to be installed # =============================================================== @@ -24,12 +26,14 @@ # These files are data, module or lib files SET(DATA FindCAS.cmake - FindOPENGL.cmake - FindQT4.cmake UseQT4EXT.cmake FindQWT.cmake - FindSIPPYQT.cmake - FindVTK.cmake - FindGUI.cmake + FindGUI.cmake + FindSalomeCAS.cmake + FindSalomePYQT4.cmake + FindSalomeQT4.cmake + FindSalomeQWT.cmake + FindSalomeSIP.cmake + FindSalomeVTK.cmake ) -INSTALL(FILES ${DATA} DESTINATION ${GUI_admlocalcmake}) \ No newline at end of file +INSTALL(FILES ${DATA} DESTINATION ${GUI_admlocalcmake}) diff --git a/adm_local/cmake_files/FindCAS.cmake b/adm_local/cmake_files/FindCAS.cmake index 4b72de6eb..884df138c 100644 --- a/adm_local/cmake_files/FindCAS.cmake +++ b/adm_local/cmake_files/FindCAS.cmake @@ -17,171 +17,154 @@ # 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) +SET(CAS_VERSION_DEVELOPMENT 0) + +FIND_FILE(ff Standard_Version.hxx) -FIND_FILE(ff Standard_Version.hxx ${CASROOT}/include/opencascade ${CASROOT}/inc) IF(ff) - FILE(STRINGS ${ff} OCC_VERSION_DEVELOPMENT_STR - REGEX "^ *#define OCC_VERSION_DEVELOPMENT.*$") - IF(OCC_VERSION_DEVELOPMENT_STR) - SET(OCC_VERSION_DEVELOPMENT 1) - ENDIF(OCC_VERSION_DEVELOPMENT_STR) + FILE(STRINGS ${ff} CAS_VERSION_DEVELOPMENT_STR + REGEX "^ *#define OCC_VERSION_DEVELOPMENT *\"dev\".*$") + IF(CAS_VERSION_DEVELOPMENT_STR) + SET(CAS_VERSION_DEVELOPMENT 1) + ENDIF(CAS_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(CAS_VERSION_DEVELOPMENT STREQUAL 1) + SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DCAS_VERSION_DEVELOPMENT") +ENDIF(CAS_VERSION_DEVELOPMENT STREQUAL 1) + 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/FindOPENGL.cmake b/adm_local/cmake_files/FindOPENGL.cmake deleted file mode 100644 index d7e8d4fed..000000000 --- a/adm_local/cmake_files/FindOPENGL.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (C) 2007-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 -# - -IF(${WINDOWS}) - FIND_LIBRARY(OpenGL_LIB OpenGL32 "C:/Program Files/Microsoft SDKs/Windows/v6.0A/lib") - FIND_LIBRARY(GlU_LIB GlU32 "C:/Program Files/Microsoft SDKs/Windows/v6.0A/lib") -ELSE(${WINDOWS}) - FIND_LIBRARY(OpenGL_LIB GL) - FIND_LIBRARY(GlU_LIB GLU) -ENDIF(${WINDOWS}) -SET(OGL_LIBS ${OpenGL_LIB} ${GlU_LIB}) diff --git a/adm_local/cmake_files/FindQT4.cmake b/adm_local/cmake_files/FindQT4.cmake deleted file mode 100644 index 10419225b..000000000 --- a/adm_local/cmake_files/FindQT4.cmake +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2007-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(FindQt4) -INCLUDE(UseQt4) -SET(QT_INCLUDE_DIRS ${QT_INCLUDES}) -SET(DIRS) -FOREACH(D ${QT_INCLUDES}) -SET(DIRS ${DIRS} -I${D}) -ENDFOREACH(D ${QT_INCLUDES}) -SET(QT_INCLUDES ${DIRS}) # to be removed -SET(QT_INCLUDES ${QT_INCLUDES} -DQT_THREAD_SUPPORT) # to be removed -SET(QT_DEFINITIONS -DQT_THREAD_SUPPORT) -SET(QT_MT_LIBS ${QT_LIBRARIES} ${QT_QTXML_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${QT_QTWEBKIT_LIBRARY}) -SET(QT_LIBS ${QT_MT_LIBS}) -SET(qt4_ldflags ${QT_MT_LIBS}) -SET(QT_LIBS ${QT_MT_LIBS}) - -FIND_PROGRAM(QT_LRELEASE_EXECUTABLE lrelease) 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/adm_local/cmake_files/FindSIPPYQT.cmake b/adm_local/cmake_files/FindSIPPYQT.cmake deleted file mode 100644 index e9f5e55d8..000000000 --- a/adm_local/cmake_files/FindSIPPYQT.cmake +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright (C) 2007-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 -# - -FIND_PROGRAM(SIP_EXECUTABLE sip) - -SET(SIP_ROOT ${SIP_EXECUTABLE}) -IF(SIP_ROOT) -GET_FILENAME_COMPONENT(SIP_ROOT ${SIP_ROOT} PATH) -GET_FILENAME_COMPONENT(SIP_ROOT ${SIP_ROOT} PATH) -ENDIF(SIP_ROOT) - -SET(SIP_INCLUDES -I${SIP_ROOT}/include/python${PYTHON_VERSION}) # to be removed -SET(SIP_INCLUDE_DIRS ${SIP_ROOT}/include/python${PYTHON_VERSION}) -IF(WINDOWS) - SET(SIP_INCLUDES ${SIP_INCLUDES} -I${SIP_ROOT}/include) # to be removed - SET(SIP_INCLUDE_DIRS ${SIP_INCLUDE_DIRS} ${SIP_ROOT}/include) -ENDIF(WINDOWS) - -IF(WINDOWS) - FIND_PROGRAM(PYUIC_EXECUTABLE NAMES pyuic4 pyuic4.bat) -ELSE(WINDOWS) - FIND_PROGRAM(PYUIC_EXECUTABLE NAMES pyuic4) -ENDIF(WINDOWS) - -SET(PYUIC_ROOT ${PYUIC_EXECUTABLE}) -IF(PYUIC_ROOT) -GET_FILENAME_COMPONENT(PYUIC_ROOT ${PYUIC_ROOT} PATH) -GET_FILENAME_COMPONENT(PYUIC_ROOT ${PYUIC_ROOT} PATH) -ENDIF(PYUIC_ROOT) - -SET(PYQT_SIPS $ENV{PYQT_SIPS}) -IF(NOT PYQT_SIPS) - IF(WINDOWS) - SET(PYQT_SIPS ${PYUIC_ROOT}/sip) - ELSE(WINDOWS) - IF(PYUIC_ROOT STREQUAL /usr) - SET(PYQT_SIPS ${PYUIC_ROOT}/share/sip/PyQt4) - ELSE(PYUIC_ROOT STREQUAL /usr) - SET(PYQT_SIPS ${PYUIC_ROOT}/share/sip) - ENDIF(PYUIC_ROOT STREQUAL /usr) - ENDIF(WINDOWS) -ENDIF(NOT PYQT_SIPS) - -SET(PYQT_INCLUDES -I${PYQT_SIPS}) -SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtCore -I${PYQT_SIPS}/QtGui) -SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtXml -I${PYQT_SIPS}/QtOpenGL) -SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtAssistant -I${PYQT_SIPS}/QtDesigner) -SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtNetwork -I${PYQT_SIPS}/QtSql) -SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtSvg -I${PYQT_SIPS}/QtTest) - -EXECUTE_PROCESS( - COMMAND ${PYTHON_EXECUTABLE} -c "import re, PyQt4.pyqtconfig ; s = PyQt4.pyqtconfig.Configuration().pyqt_sip_flags ; print s;" - OUTPUT_VARIABLE COMPILE_FLAGS - OUTPUT_STRIP_TRAILING_WHITESPACE - ) -string(REPLACE " " ";" FLAGS_LIST ${COMPILE_FLAGS}) -FOREACH(FLG ${FLAGS_LIST}) -SET( PYQT_SIPFLAGS ${PYQT_SIPFLAGS} ${FLG}) -ENDFOREACH(FLG ${FLAGS_LIST}) - -SET( PYQT_SIPFLAGS ${PYQT_SIPFLAGS} -s .cc -c . ) -SET( PYQT_SIPFLAGS ${PYQT_SIPFLAGS} ${PYQT_INCLUDES} ) \ No newline at end of file diff --git a/adm_local/cmake_files/FindSalomeCAS.cmake b/adm_local/cmake_files/FindSalomeCAS.cmake new file mode 100644 index 000000000..b7cdf561b --- /dev/null +++ b/adm_local/cmake_files/FindSalomeCAS.cmake @@ -0,0 +1,18 @@ + +# OpenCascade detection for Salome + +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}) +find_package(CAS) diff --git a/adm_local/cmake_files/FindSalomePYQT4.cmake b/adm_local/cmake_files/FindSalomePYQT4.cmake new file mode 100644 index 000000000..30c23efd0 --- /dev/null +++ b/adm_local/cmake_files/FindSalomePYQT4.cmake @@ -0,0 +1,22 @@ + +# PyQt4 detection for Salome + +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_PYTHONPATH "") +if(EXISTS ${PYQT_ROOT_DIR}) + set(PYQT_PYTHONPATH ${PYQT_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) +endif(EXISTS ${PYQT_ROOT_DIR}) +EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.path[:0] = ['${PYQT_PYTHONPATH}']; from PyQt4 import pyqtconfig; sys.stdout.write(pyqtconfig.Configuration().pyqt_sip_flags)" + OUTPUT_VARIABLE PYQT_SIPFLAGS) +SEPARATE_ARGUMENTS(PYQT_SIPFLAGS) +SET(PYQT_SIPFLAGS ${PYQT_SIPFLAGS} -s .cc -c . + -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 ) diff --git a/adm_local/cmake_files/FindSalomeQT4.cmake b/adm_local/cmake_files/FindSalomeQT4.cmake new file mode 100644 index 000000000..42793a7ef --- /dev/null +++ b/adm_local/cmake_files/FindSalomeQT4.cmake @@ -0,0 +1,16 @@ + +# Qt4 detection for Salome + +#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) diff --git a/adm_local/cmake_files/FindSalomeQWT.cmake b/adm_local/cmake_files/FindSalomeQWT.cmake new file mode 100644 index 000000000..8f467c495 --- /dev/null +++ b/adm_local/cmake_files/FindSalomeQWT.cmake @@ -0,0 +1,10 @@ + +# QWT detection for salome + +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}) +find_package(QWT) diff --git a/adm_local/cmake_files/FindSalomeSIP.cmake b/adm_local/cmake_files/FindSalomeSIP.cmake new file mode 100644 index 000000000..b388bb4ef --- /dev/null +++ b/adm_local/cmake_files/FindSalomeSIP.cmake @@ -0,0 +1,10 @@ + +# Sip detection for Salome + +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 HINTS /usr/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) diff --git a/adm_local/cmake_files/FindSalomeVTK.cmake b/adm_local/cmake_files/FindSalomeVTK.cmake new file mode 100644 index 000000000..8e707868c --- /dev/null +++ b/adm_local/cmake_files/FindSalomeVTK.cmake @@ -0,0 +1,27 @@ + +# VTK detection for Salome + +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) diff --git a/adm_local/cmake_files/FindVTK.cmake b/adm_local/cmake_files/FindVTK.cmake deleted file mode 100644 index 4e0871c89..000000000 --- a/adm_local/cmake_files/FindVTK.cmake +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright (C) 2007-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(FindVTK) - -SET(VTK_INCLUDES) -FOREACH(dir ${VTK_INCLUDE_DIRS}) - SET(VTK_INCLUDES ${VTK_INCLUDES} -I${dir}) -ENDFOREACH(dir ${VTK_INCLUDE_DIRS}) - -SET(VTK_LIBS) -FIND_LIBRARY(VTK_COMMON vtkCommon PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -SET(VTK_LIBS ${VTK_LIBS} ${VTK_COMMON}) -FIND_LIBRARY(VTK_GRAPHICS vtkGraphics PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -SET(VTK_LIBS ${VTK_LIBS} ${VTK_GRAPHICS}) -FIND_LIBRARY(VTK_IMAGING vtkImaging PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -SET(VTK_LIBS ${VTK_LIBS} ${VTK_IMAGING}) -FIND_LIBRARY(VTK_FILTERING vtkFiltering PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -SET(VTK_LIBS ${VTK_LIBS} ${VTK_FILTERING}) -FIND_LIBRARY(VTK_IO vtkIO PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -SET(VTK_LIBS ${VTK_LIBS} ${VTK_IO}) -FIND_LIBRARY(VTK_RENDERING vtkRendering PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -SET(VTK_LIBS ${VTK_LIBS} ${VTK_RENDERING}) -FIND_LIBRARY(VTK_HYBRID vtkHybrid PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -SET(VTK_LIBS ${VTK_LIBS} ${VTK_HYBRID}) -FIND_LIBRARY(VTK_PARALLEL vtkParallel PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -SET(VTK_LIBS ${VTK_LIBS} ${VTK_PARALLEL}) -FIND_LIBRARY(VTK_WIDGETS vtkWidgets PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -SET(VTK_LIBS ${VTK_LIBS} ${VTK_WIDGETS}) -FIND_LIBRARY(VTK_GENERIC_FILTERING vtkGenericFiltering PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -SET(VTK_LIBS ${VTK_LIBS} ${VTK_GENERIC_FILTERING}) -FIND_LIBRARY(VTK_INFOVIS vtkInfovis PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -SET(VTK_LIBS ${VTK_LIBS} ${VTK_INFOVIS}) -FIND_LIBRARY(VTK_VOLUME_RENDERING vtkVolumeRendering PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -SET(VTK_LIBS ${VTK_LIBS} ${VTK_VOLUME_RENDERING}) - -FIND_LIBRARY(vtkCommonPythonD vtkCommonPythonD PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -FIND_LIBRARY(vtkGraphicsPythonD vtkGraphicsPythonD PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -FIND_LIBRARY(vtkImagingPythonD vtkImagingPythonD PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) -FIND_LIBRARY(vtkPythonCore vtkPythonCore PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) - - -#IF(NOT WINDOWS) -# IF(VTK_MAJOR_VERSION STREQUAL 5) -# IF(VTK_MINOR_VERSION STREQUAL 0) -# SET(VTK_INCLUDES ${VTK_INCLUDES} -Wno-deprecated) -# ENDIF(VTK_MINOR_VERSION STREQUAL 0) -# ENDIF(VTK_MAJOR_VERSION STREQUAL 5) -#ENDIF(NOT WINDOWS) - -SET(VTK_INCLUDES ${VTK_INCLUDES} -DVTK_EXCLUDE_STRSTREAM_HEADERS) -SET(VTK_DEFINITIONS -DVTK_EXCLUDE_STRSTREAM_HEADERS) \ No newline at end of file diff --git a/adm_local/cmake_files/Makefile.am b/adm_local/cmake_files/Makefile.am index 11f2ecd87..6b0e7deaf 100644 --- a/adm_local/cmake_files/Makefile.am +++ b/adm_local/cmake_files/Makefile.am @@ -19,13 +19,16 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am +SUBDIRS = deprecated + dist_admlocal_cmake_DATA = \ FindCAS.cmake \ -FindOPENGL.cmake \ -FindQT4.cmake \ UseQT4EXT.cmake \ FindQWT.cmake \ -FindSIPPYQT.cmake \ -FindVTK.cmake \ -FindGUI.cmake - +FindGUI.cmake \ +FindSalomeCAS.cmake \ +FindSalomePYQT4.cmake \ +FindSalomeQT4.cmake \ +FindSalomeQWT.cmake \ +FindSalomeSIP.cmake \ +FindSalomeVTK.cmake diff --git a/adm_local/cmake_files/deprecated/CMakeLists.txt b/adm_local/cmake_files/deprecated/CMakeLists.txt new file mode 100644 index 000000000..a1b4ffb9f --- /dev/null +++ b/adm_local/cmake_files/deprecated/CMakeLists.txt @@ -0,0 +1,35 @@ +# 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 +# + +# =============================================================== +# Files to be installed +# =============================================================== + +# These files are data, module or lib files +SET(DATA + FindCAS.cmake + FindGUI.cmake + FindOPENGL.cmake + FindQT4.cmake + FindQWT.cmake + FindSIPPYQT.cmake + FindVTK.cmake + UseQT4EXT.cmake +) +INSTALL(FILES ${DATA} DESTINATION ${GUI_admlocalcmake}/deprecated) \ No newline at end of file diff --git a/adm_local/cmake_files/deprecated/FindCAS.cmake b/adm_local/cmake_files/deprecated/FindCAS.cmake new file mode 100644 index 000000000..cb41aacc5 --- /dev/null +++ b/adm_local/cmake_files/deprecated/FindCAS.cmake @@ -0,0 +1,191 @@ +# Copyright (C) 2007-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 +# + +SET(CASROOT $ENV{CASROOT}) + +# SET(OCC_VERSION_MAJOR 6) +# SET(OCC_VERSION_MINOR 3) +# SET(OCC_VERSION_MAINTENANCE 10) +SET(CAS_VERSION_DEVELOPMENT 0) + +FIND_FILE(ff Standard_Version.hxx ${CASROOT}/include/opencascade ${CASROOT}/inc) +IF(ff) + FILE(STRINGS ${ff} CAS_VERSION_DEVELOPMENT_STR + REGEX "^ *#define OCC_VERSION_DEVELOPMENT *\"dev\".*$") + IF(CAS_VERSION_DEVELOPMENT_STR) + SET(CAS_VERSION_DEVELOPMENT 1) + ENDIF(CAS_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) + +IF(CMAKE_SIZEOF_VOID_P STREQUAL 8) + SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -D_OCC64) +ENDIF(CMAKE_SIZEOF_VOID_P STREQUAL 8) + +IF(CAS_VERSION_DEVELOPMENT STREQUAL 1) + SET(CAS_CPPFLAGS "${CAS_CPPFLAGS} -DCAS_VERSION_DEVELOPMENT") +ENDIF(CAS_VERSION_DEVELOPMENT STREQUAL 1) + +IF(NOT WINDOWS) + FIND_LIBRARY(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}) + +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(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(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}) diff --git a/adm_local/cmake_files/deprecated/FindGUI.cmake b/adm_local/cmake_files/deprecated/FindGUI.cmake new file mode 100644 index 000000000..eb3b436c6 --- /dev/null +++ b/adm_local/cmake_files/deprecated/FindGUI.cmake @@ -0,0 +1,63 @@ +# Copyright (C) 2007-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 +# + +SET(GUI_CXXFLAGS -I${GUI_ROOT_DIR}/include/salome) + +FIND_LIBRARY(caf caf ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(CAM CAM ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(CASCatch CASCatch ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(DDS DDS ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(Event Event ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(GLViewer GLViewer ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(LightApp LightApp ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(LogWindow LogWindow ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(ObjBrowser ObjBrowser ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(OCCViewer OCCViewer ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(OpenGLUtils OpenGLUtils ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(Plot2d Plot2d ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(PyConsole PyConsole ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(PyInterp PyInterp ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(QDS QDS ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(qtx qtx ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(QxScene QxScene ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeApp SalomeApp ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeAppTest SalomeAppTest ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeIDLGUI SalomeIDLGUI ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeObject SalomeObject ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomePrs SalomePrs ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomePyQtGUILight SalomePyQtGUILight ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomePyQtGUI SalomePyQtGUI ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomePyQt SalomePyQt ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomePy SalomePy ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeSession SalomeSession ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeStyle SalomeStyle ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SOCC SOCC ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SPlot2d SPlot2d ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(std std ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SUITApp SUITApp ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(suit suit ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SUPERVGraph SUPERVGraph ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SVTK SVTK ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(ToolsGUI ToolsGUI ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(ViewerTools ViewerTools ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(VTKViewer VTKViewer ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(vtkEDFOverloads vtkEDFOverloads ${GUI_ROOT_DIR}/lib/paraview) +FIND_LIBRARY(vtkTools vtkTools ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeGuiHelpers SalomeGuiHelpers ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeTreeData SalomeTreeData ${GUI_ROOT_DIR}/lib/salome) diff --git a/adm_local/cmake_files/deprecated/FindOPENGL.cmake b/adm_local/cmake_files/deprecated/FindOPENGL.cmake new file mode 100644 index 000000000..d7e8d4fed --- /dev/null +++ b/adm_local/cmake_files/deprecated/FindOPENGL.cmake @@ -0,0 +1,27 @@ +# Copyright (C) 2007-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 +# + +IF(${WINDOWS}) + FIND_LIBRARY(OpenGL_LIB OpenGL32 "C:/Program Files/Microsoft SDKs/Windows/v6.0A/lib") + FIND_LIBRARY(GlU_LIB GlU32 "C:/Program Files/Microsoft SDKs/Windows/v6.0A/lib") +ELSE(${WINDOWS}) + FIND_LIBRARY(OpenGL_LIB GL) + FIND_LIBRARY(GlU_LIB GLU) +ENDIF(${WINDOWS}) +SET(OGL_LIBS ${OpenGL_LIB} ${GlU_LIB}) diff --git a/adm_local/cmake_files/deprecated/FindQT4.cmake b/adm_local/cmake_files/deprecated/FindQT4.cmake new file mode 100644 index 000000000..10419225b --- /dev/null +++ b/adm_local/cmake_files/deprecated/FindQT4.cmake @@ -0,0 +1,35 @@ +# Copyright (C) 2007-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(FindQt4) +INCLUDE(UseQt4) +SET(QT_INCLUDE_DIRS ${QT_INCLUDES}) +SET(DIRS) +FOREACH(D ${QT_INCLUDES}) +SET(DIRS ${DIRS} -I${D}) +ENDFOREACH(D ${QT_INCLUDES}) +SET(QT_INCLUDES ${DIRS}) # to be removed +SET(QT_INCLUDES ${QT_INCLUDES} -DQT_THREAD_SUPPORT) # to be removed +SET(QT_DEFINITIONS -DQT_THREAD_SUPPORT) +SET(QT_MT_LIBS ${QT_LIBRARIES} ${QT_QTXML_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${QT_QTWEBKIT_LIBRARY}) +SET(QT_LIBS ${QT_MT_LIBS}) +SET(qt4_ldflags ${QT_MT_LIBS}) +SET(QT_LIBS ${QT_MT_LIBS}) + +FIND_PROGRAM(QT_LRELEASE_EXECUTABLE lrelease) diff --git a/adm_local/cmake_files/deprecated/FindQWT.cmake b/adm_local/cmake_files/deprecated/FindQWT.cmake new file mode 100644 index 000000000..c376e3649 --- /dev/null +++ b/adm_local/cmake_files/deprecated/FindQWT.cmake @@ -0,0 +1,41 @@ +# Copyright (C) 2007-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 +# + +FILE(TO_CMAKE_PATH "$ENV{QWTHOME}" QWTHOME) +IF(NOT QWTHOME) + SET(QWTHOME /usr) +ENDIF(NOT QWTHOME) + +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}) +IF(WINDOWS) +SET(QWT_INCLUDES ${QWT_INCLUDES} -DQWT_DLL) # to remove +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) +ELSE(WINDOWS) +FIND_LIBRARY(QWT_LIBS qwt HINTS ${QWTHOME} PATH_SUFFIXES lib lib64) +ENDIF(WINDOWS) diff --git a/adm_local/cmake_files/deprecated/FindSIPPYQT.cmake b/adm_local/cmake_files/deprecated/FindSIPPYQT.cmake new file mode 100644 index 000000000..e9f5e55d8 --- /dev/null +++ b/adm_local/cmake_files/deprecated/FindSIPPYQT.cmake @@ -0,0 +1,78 @@ +# Copyright (C) 2007-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 +# + +FIND_PROGRAM(SIP_EXECUTABLE sip) + +SET(SIP_ROOT ${SIP_EXECUTABLE}) +IF(SIP_ROOT) +GET_FILENAME_COMPONENT(SIP_ROOT ${SIP_ROOT} PATH) +GET_FILENAME_COMPONENT(SIP_ROOT ${SIP_ROOT} PATH) +ENDIF(SIP_ROOT) + +SET(SIP_INCLUDES -I${SIP_ROOT}/include/python${PYTHON_VERSION}) # to be removed +SET(SIP_INCLUDE_DIRS ${SIP_ROOT}/include/python${PYTHON_VERSION}) +IF(WINDOWS) + SET(SIP_INCLUDES ${SIP_INCLUDES} -I${SIP_ROOT}/include) # to be removed + SET(SIP_INCLUDE_DIRS ${SIP_INCLUDE_DIRS} ${SIP_ROOT}/include) +ENDIF(WINDOWS) + +IF(WINDOWS) + FIND_PROGRAM(PYUIC_EXECUTABLE NAMES pyuic4 pyuic4.bat) +ELSE(WINDOWS) + FIND_PROGRAM(PYUIC_EXECUTABLE NAMES pyuic4) +ENDIF(WINDOWS) + +SET(PYUIC_ROOT ${PYUIC_EXECUTABLE}) +IF(PYUIC_ROOT) +GET_FILENAME_COMPONENT(PYUIC_ROOT ${PYUIC_ROOT} PATH) +GET_FILENAME_COMPONENT(PYUIC_ROOT ${PYUIC_ROOT} PATH) +ENDIF(PYUIC_ROOT) + +SET(PYQT_SIPS $ENV{PYQT_SIPS}) +IF(NOT PYQT_SIPS) + IF(WINDOWS) + SET(PYQT_SIPS ${PYUIC_ROOT}/sip) + ELSE(WINDOWS) + IF(PYUIC_ROOT STREQUAL /usr) + SET(PYQT_SIPS ${PYUIC_ROOT}/share/sip/PyQt4) + ELSE(PYUIC_ROOT STREQUAL /usr) + SET(PYQT_SIPS ${PYUIC_ROOT}/share/sip) + ENDIF(PYUIC_ROOT STREQUAL /usr) + ENDIF(WINDOWS) +ENDIF(NOT PYQT_SIPS) + +SET(PYQT_INCLUDES -I${PYQT_SIPS}) +SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtCore -I${PYQT_SIPS}/QtGui) +SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtXml -I${PYQT_SIPS}/QtOpenGL) +SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtAssistant -I${PYQT_SIPS}/QtDesigner) +SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtNetwork -I${PYQT_SIPS}/QtSql) +SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtSvg -I${PYQT_SIPS}/QtTest) + +EXECUTE_PROCESS( + COMMAND ${PYTHON_EXECUTABLE} -c "import re, PyQt4.pyqtconfig ; s = PyQt4.pyqtconfig.Configuration().pyqt_sip_flags ; print s;" + OUTPUT_VARIABLE COMPILE_FLAGS + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +string(REPLACE " " ";" FLAGS_LIST ${COMPILE_FLAGS}) +FOREACH(FLG ${FLAGS_LIST}) +SET( PYQT_SIPFLAGS ${PYQT_SIPFLAGS} ${FLG}) +ENDFOREACH(FLG ${FLAGS_LIST}) + +SET( PYQT_SIPFLAGS ${PYQT_SIPFLAGS} -s .cc -c . ) +SET( PYQT_SIPFLAGS ${PYQT_SIPFLAGS} ${PYQT_INCLUDES} ) \ No newline at end of file diff --git a/adm_local/cmake_files/deprecated/FindVTK.cmake b/adm_local/cmake_files/deprecated/FindVTK.cmake new file mode 100644 index 000000000..4e0871c89 --- /dev/null +++ b/adm_local/cmake_files/deprecated/FindVTK.cmake @@ -0,0 +1,68 @@ +# Copyright (C) 2007-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(FindVTK) + +SET(VTK_INCLUDES) +FOREACH(dir ${VTK_INCLUDE_DIRS}) + SET(VTK_INCLUDES ${VTK_INCLUDES} -I${dir}) +ENDFOREACH(dir ${VTK_INCLUDE_DIRS}) + +SET(VTK_LIBS) +FIND_LIBRARY(VTK_COMMON vtkCommon PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +SET(VTK_LIBS ${VTK_LIBS} ${VTK_COMMON}) +FIND_LIBRARY(VTK_GRAPHICS vtkGraphics PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +SET(VTK_LIBS ${VTK_LIBS} ${VTK_GRAPHICS}) +FIND_LIBRARY(VTK_IMAGING vtkImaging PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +SET(VTK_LIBS ${VTK_LIBS} ${VTK_IMAGING}) +FIND_LIBRARY(VTK_FILTERING vtkFiltering PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +SET(VTK_LIBS ${VTK_LIBS} ${VTK_FILTERING}) +FIND_LIBRARY(VTK_IO vtkIO PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +SET(VTK_LIBS ${VTK_LIBS} ${VTK_IO}) +FIND_LIBRARY(VTK_RENDERING vtkRendering PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +SET(VTK_LIBS ${VTK_LIBS} ${VTK_RENDERING}) +FIND_LIBRARY(VTK_HYBRID vtkHybrid PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +SET(VTK_LIBS ${VTK_LIBS} ${VTK_HYBRID}) +FIND_LIBRARY(VTK_PARALLEL vtkParallel PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +SET(VTK_LIBS ${VTK_LIBS} ${VTK_PARALLEL}) +FIND_LIBRARY(VTK_WIDGETS vtkWidgets PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +SET(VTK_LIBS ${VTK_LIBS} ${VTK_WIDGETS}) +FIND_LIBRARY(VTK_GENERIC_FILTERING vtkGenericFiltering PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +SET(VTK_LIBS ${VTK_LIBS} ${VTK_GENERIC_FILTERING}) +FIND_LIBRARY(VTK_INFOVIS vtkInfovis PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +SET(VTK_LIBS ${VTK_LIBS} ${VTK_INFOVIS}) +FIND_LIBRARY(VTK_VOLUME_RENDERING vtkVolumeRendering PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +SET(VTK_LIBS ${VTK_LIBS} ${VTK_VOLUME_RENDERING}) + +FIND_LIBRARY(vtkCommonPythonD vtkCommonPythonD PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +FIND_LIBRARY(vtkGraphicsPythonD vtkGraphicsPythonD PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +FIND_LIBRARY(vtkImagingPythonD vtkImagingPythonD PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +FIND_LIBRARY(vtkPythonCore vtkPythonCore PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) + + +#IF(NOT WINDOWS) +# IF(VTK_MAJOR_VERSION STREQUAL 5) +# IF(VTK_MINOR_VERSION STREQUAL 0) +# SET(VTK_INCLUDES ${VTK_INCLUDES} -Wno-deprecated) +# ENDIF(VTK_MINOR_VERSION STREQUAL 0) +# ENDIF(VTK_MAJOR_VERSION STREQUAL 5) +#ENDIF(NOT WINDOWS) + +SET(VTK_INCLUDES ${VTK_INCLUDES} -DVTK_EXCLUDE_STRSTREAM_HEADERS) +SET(VTK_DEFINITIONS -DVTK_EXCLUDE_STRSTREAM_HEADERS) \ No newline at end of file diff --git a/adm_local/cmake_files/deprecated/Makefile.am b/adm_local/cmake_files/deprecated/Makefile.am new file mode 100644 index 000000000..8795aaaea --- /dev/null +++ b/adm_local/cmake_files/deprecated/Makefile.am @@ -0,0 +1,35 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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 $(top_srcdir)/adm_local/unix/make_common_starter.am + +admlocal_cmake_deprecateddir = $(prefix)/adm_local/cmake_files/deprecated + +dist_admlocal_cmake_deprecated_DATA = \ + FindCAS.cmake \ + FindGUI.cmake \ + FindOPENGL.cmake \ + FindQT4.cmake \ + FindQWT.cmake \ + FindSIPPYQT.cmake \ + FindVTK.cmake \ + UseQT4EXT.cmake diff --git a/adm_local/cmake_files/deprecated/UseQT4EXT.cmake b/adm_local/cmake_files/deprecated/UseQT4EXT.cmake new file mode 100644 index 000000000..0a0949ce2 --- /dev/null +++ b/adm_local/cmake_files/deprecated/UseQT4EXT.cmake @@ -0,0 +1,40 @@ +# Copyright (C) 2007-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 +# + +INSTALL(CODE "MACRO(QT4_COMPILE_TS_ON_INSTALL MYLRELEASE MYTSFILE MYFULLDIR MYOUTQMFILE) + FILE(MAKE_DIRECTORY \${MYFULLDIR}) + MESSAGE(STATUS \"Compiling \${MYTSFILE}\") + EXECUTE_PROCESS(COMMAND \${MYLRELEASE} \${MYTSFILE} -qm \${MYFULLDIR}/\${MYOUTQMFILE}) +ENDMACRO(QT4_COMPILE_TS_ON_INSTALL)") + +# This MACRO uses the following vars +# - QT_LRELEASE_EXECUTABLE : (given by default by FindQT.cmake) +# +# MYTSFILES containing all ts files to be compiled. +# WHERETOINSTALL contains directory (relative to install_prefix) where to install files after compilation of ts files too qm. +MACRO(QT4_INSTALL_TS_RESOURCES MYTSFILES WHERETOINSTALL) + INSTALL(CODE "SET(INSTALL_TS_DIR ${WHERETOINSTALL})") + SET(MYSOURCES) + FOREACH(input ${MYTSFILES}) + GET_FILENAME_COMPONENT(input2 ${input} NAME) + STRING(REGEX REPLACE ".ts" "" base ${input2}) + SET(output "${base}.qm") + INSTALL(CODE "QT4_COMPILE_TS_ON_INSTALL( \"${QT_LRELEASE_EXECUTABLE}\" \"${CMAKE_CURRENT_SOURCE_DIR}/${input}\" \"${CMAKE_INSTALL_PREFIX}/\${INSTALL_TS_DIR}\" ${output})") + ENDFOREACH(input ${MYIDLFILES}) +ENDMACRO(QT4_INSTALL_TS_RESOURCES) diff --git a/build_cmake b/build_cmake index b8fe099ce..af6b75bae 100755 --- a/build_cmake +++ b/build_cmake @@ -21,7 +21,7 @@ CURRENT_DIR=`pwd` CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` cd ${CONF_DIR} -python $KERNEL_ROOT_DIR/salome_adm/cmake_files/am2cmake.py --gui +python $KERNEL_ROOT_DIR/salome_adm/cmake_files/deprecated/am2cmake.py --gui status=$? cd ${CURRENT_DIR} exit $status diff --git a/build_cmake.bat b/build_cmake.bat index b5e1ffc53..f72ee227c 100644 --- a/build_cmake.bat +++ b/build_cmake.bat @@ -17,4 +17,4 @@ @REM See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @REM -%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\am2cmake.py --gui +%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\deprecated\am2cmake.py --gui diff --git a/configure.ac b/configure.ac index 221f6df4c..2f2b435a3 100644 --- a/configure.ac +++ b/configure.ac @@ -613,6 +613,7 @@ sed -i "s%\(\s*\)\(for searchdir in \$searchdirs; do\)%\1for sss in \$searchdirs AC_OUTPUT([ \ adm_local/Makefile \ adm_local/cmake_files/Makefile \ + adm_local/cmake_files/deprecated/Makefile \ adm_local/unix/Makefile \ adm_local/unix/config_files/Makefile \ bin/VERSION \ diff --git a/doc/salome/gui/CMakeLists.txt b/doc/salome/gui/CMakeLists.txt index 2ea1bad1e..23cf553a2 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_BINARY_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/GLViewer/GLViewer_ViewPort.cxx b/src/GLViewer/GLViewer_ViewPort.cxx index b11d7d29f..9f5cb4c4a 100644 --- a/src/GLViewer/GLViewer_ViewPort.cxx +++ b/src/GLViewer/GLViewer_ViewPort.cxx @@ -51,7 +51,6 @@ #include #undef QT_CLEAN_NAMESPACE #include -#include /*! \struct CMapEntry 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/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 0c11ef825..7434504fb 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -3570,7 +3570,7 @@ bool LightApp_Application::isLibExists( const QString& moduleTitle ) const //abd: changed libSalomePyQtGUI to SalomePyQtGUI for WIN32 bool isPythonModule = lib.contains("SalomePyQtGUI"); - bool isPythonLightModule = lib.contains("libSalomePyQtGUILight"); + bool isPythonLightModule = lib.contains("SalomePyQtGUILight"); QStringList paths; #ifdef WIN32 @@ -3608,11 +3608,11 @@ bool LightApp_Application::isLibExists( const QString& moduleTitle ) const QString pylibgui = moduleName( moduleTitle ) + QString("GUI.py"); // Check the python library -#ifdef WIN32 - paths = QString(::getenv( "PATH" )).split( ";", QString::SkipEmptyParts ); -#else +// #ifdef WIN32 +// paths = QString(::getenv( "PATH" )).split( ";", QString::SkipEmptyParts ); +// #else paths = QString(::getenv( "PYTHONPATH" )).split( ":", QString::SkipEmptyParts ); -#endif +// #endif bool isPyLib = false, isPyGuiLib = false; QStringList::const_iterator anIt = paths.begin(), aLast = paths.end(); for( ; anIt!=aLast; anIt++ ) 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/OCCViewer/OCCViewer_VService.cxx b/src/OCCViewer/OCCViewer_VService.cxx index 86181d953..e4fb689b8 100755 --- a/src/OCCViewer/OCCViewer_VService.cxx +++ b/src/OCCViewer/OCCViewer_VService.cxx @@ -25,6 +25,29 @@ #include #include +#include + +#if OCC_VERSION_LARGE > 0x06050500 + +// +// new code, changed in OCCT v6.6.0 +// + +#include +#include +#include +#ifdef WNT +#include +#else +#include +#endif + +#else // #if OCC_VERSION_LARGE > 0x06050500 + +// +// obsolete code (before OCCT v6.6.0); to be removed +// + #ifdef WNT #include #include @@ -33,57 +56,82 @@ #include #endif +#endif // #if OCC_VERSION_LARGE > 0x06050500 + /*! Create native view window for CasCade view [ static ] */ Handle(Aspect_Window) OCCViewer_VService::CreateWindow( const Handle(V3d_View)& view, - const Standard_Integer hiwin, - const Standard_Integer lowin, - const Xw_WindowQuality quality ) + WId winId ) { +#if OCC_VERSION_LARGE > 0x06050500 + +// +// new code, changed in OCCT v6.6.0 +// + Aspect_Handle aWindowHandle = (Aspect_Handle)winId; +#ifdef WNT + Handle(WNT_Window) viewWindow = new WNT_Window( aWindowHandle ); +#else + Handle(Aspect_DisplayConnection) aDispConnection = view->Viewer()->Driver()->GetDisplayConnection(); + Handle(Xw_Window) viewWindow = new Xw_Window( aDispConnection, aWindowHandle ); +#endif + return viewWindow; + +#else // #if OCC_VERSION_LARGE > 0x06050500 + +// +// obsolete code (before OCCT v6.6.0); to be removed +// + int hwnd = (int)winId; + short lowin = (short)hwnd; + short hiwin = (short)( hwnd >> 16 ); + #ifdef WNT Handle(WNT_Window) viewWindow = new WNT_Window( Handle(Graphic3d_WNTGraphicDevice)::DownCast(view->Viewer()->Device()), hiwin, lowin ); // Prevent flickering viewWindow->SetFlags( WDF_NOERASEBKGRND ); #else - Handle(Xw_Window) viewWindow = new Xw_Window( Handle(Graphic3d_GraphicDevice)::DownCast(view->Viewer()->Device()), hiwin, lowin, quality ); + Handle(Xw_Window) viewWindow = new Xw_Window( Handle(Graphic3d_GraphicDevice)::DownCast(view->Viewer()->Device()), hiwin, lowin, Xw_WQ_SAMEQUALITY ); #endif return viewWindow; + +#endif // #if OCC_VERSION_LARGE > 0x06050500 } /*! Maps CasCade view to the window [ static ] */ -void OCCViewer_VService::SetWindow( const Handle(V3d_View)& view, - const Standard_Integer hiwin, - const Standard_Integer lowin, - const Xw_WindowQuality quality ) -{ - view->SetWindow( OCCViewer_VService::CreateWindow( view, hiwin, lowin, quality ) ); -} +// void OCCViewer_VService::SetWindow( const Handle(V3d_View)& view, +// const Standard_Integer hiwin, +// const Standard_Integer lowin, +// const Xw_WindowQuality quality ) +// { +// view->SetWindow( OCCViewer_VService::CreateWindow( view, hiwin, lowin, quality ) ); +// } /*! Magnifies 'view' based on previous view [ static ] */ -void OCCViewer_VService::SetMagnify( const Handle(V3d_View)& view, - const Standard_Integer hiwin, - const Standard_Integer lowin, - const Handle(V3d_View)& prevView, - const Standard_Integer x1, - const Standard_Integer y1, - const Standard_Integer x2, - const Standard_Integer y2, - const Xw_WindowQuality aQuality ) -{ -#ifdef WNT - Handle(WNT_Window) w = - new WNT_Window( Handle(Graphic3d_WNTGraphicDevice)::DownCast(view->Viewer()->Device()), hiwin, lowin ); -#else - Handle(Xw_Window) w = - new Xw_Window( Handle(Graphic3d_GraphicDevice)::DownCast(view->Viewer()->Device()), hiwin, lowin, aQuality ); -#endif - view->SetMagnify( w, prevView, x1, y1, x2, y2 ); -} +// void OCCViewer_VService::SetMagnify( const Handle(V3d_View)& view, +// const Standard_Integer hiwin, +// const Standard_Integer lowin, +// const Handle(V3d_View)& prevView, +// const Standard_Integer x1, +// const Standard_Integer y1, +// const Standard_Integer x2, +// const Standard_Integer y2, +// const Xw_WindowQuality aQuality ) +// { +// #ifdef WNT +// Handle(WNT_Window) w = +// new WNT_Window( Handle(Graphic3d_WNTGraphicDevice)::DownCast(view->Viewer()->Device()), hiwin, lowin ); +// #else +// Handle(Xw_Window) w = +// new Xw_Window( Handle(Graphic3d_GraphicDevice)::DownCast(view->Viewer()->Device()), hiwin, lowin, aQuality ); +// #endif +// view->SetMagnify( w, prevView, x1, y1, x2, y2 ); +// } /*! Creates viewer 3d [ static ] @@ -96,6 +144,32 @@ Handle(V3d_Viewer) OCCViewer_VService::Viewer3d( const Standard_CString aDisplay const Standard_Boolean ComputedMode, const Standard_Boolean aDefaultComputedMode ) { +#if OCC_VERSION_LARGE > 0x06050500 + +// +// new code, changed in OCCT v6.6.0 +// + + static Handle(Graphic3d_GraphicDriver) aGraphicDriver; + if (aGraphicDriver.IsNull()) + { + Handle(Aspect_DisplayConnection) aDisplayConnection; +#ifndef WNT + aDisplayConnection = new Aspect_DisplayConnection( aDisplay ); +#endif + aGraphicDriver = Graphic3d::InitGraphicDriver( aDisplayConnection ); + } + + return new V3d_Viewer( aGraphicDriver, aName, aDomain, ViewSize, ViewProj, + Quantity_NOC_GRAY30, V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT, + ComputedMode, aDefaultComputedMode, V3d_TEX_NONE ); + +#else // #if OCC_VERSION_LARGE > 0x06050500 + +// +// obsolete code (before OCCT v6.6.0); to be removed +// + #ifndef WNT static Handle(Graphic3d_GraphicDevice) defaultdevice; if ( defaultdevice.IsNull() ) @@ -111,4 +185,6 @@ Handle(V3d_Viewer) OCCViewer_VService::Viewer3d( const Standard_CString aDisplay Quantity_NOC_GRAY30, V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT, ComputedMode, aDefaultComputedMode, V3d_TEX_NONE); #endif // WNT + +#endif // #if OCC_VERSION_LARGE > 0x06050500 } diff --git a/src/OCCViewer/OCCViewer_VService.h b/src/OCCViewer/OCCViewer_VService.h index 73dfcff45..b4f9fe938 100755 --- a/src/OCCViewer/OCCViewer_VService.h +++ b/src/OCCViewer/OCCViewer_VService.h @@ -29,34 +29,20 @@ #include #include #include -#include +//#include #include -#include +//#include #include +#include + class Standard_EXPORT OCCViewer_VService { public: - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if ( anAddress ) Standard::Free((Standard_Address&)anAddress); - } - - // STATIC METHODS - static Handle(Aspect_Window) - CreateWindow( const Handle(V3d_View)& view, - const Standard_Integer hiwin, - const Standard_Integer lowin, - const Xw_WindowQuality quality ); + // STATIC METHODS + static Handle(Aspect_Window) CreateWindow( const Handle(V3d_View)& view, WId id ); + /* static void SetWindow( const Handle( V3d_View )& view, const Standard_Integer hiwin, const Standard_Integer lowin, @@ -71,14 +57,15 @@ public: const Standard_Integer x2, const Standard_Integer y2, const Xw_WindowQuality quality = Xw_WQ_3DQUALITY ); - static Handle_V3d_Viewer - Viewer3d( const Standard_CString display, - const Standard_ExtString name, - const Standard_CString domain = "", - const Quantity_Length ViewSize = 1000.0, - const V3d_TypeOfOrientation ViewProj = V3d_XposYnegZpos, - const Standard_Boolean ComputedMode = Standard_True, - const Standard_Boolean DefaultComputedMode = Standard_True ); + */ + + static Handle(V3d_Viewer) Viewer3d( const Standard_CString display, + const Standard_ExtString name, + const Standard_CString domain = "", + const Quantity_Length ViewSize = 1000.0, + const V3d_TypeOfOrientation ViewProj = V3d_XposYnegZpos, + const Standard_Boolean ComputedMode = Standard_True, + const Standard_Boolean DefaultComputedMode = Standard_True ); }; #endif diff --git a/src/OCCViewer/OCCViewer_ViewPort.cxx b/src/OCCViewer/OCCViewer_ViewPort.cxx index 4c6dd5d2d..c976636c0 100755 --- a/src/OCCViewer/OCCViewer_ViewPort.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort.cxx @@ -49,7 +49,6 @@ #include #undef QT_CLEAN_NAMESPACE #include -#include struct CMapEntry { diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.cxx b/src/OCCViewer/OCCViewer_ViewPort3d.cxx index 3dd08a812..7e3593e5b 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort3d.cxx @@ -746,15 +746,7 @@ bool OCCViewer_ViewPort3d::setWindow( const Handle(V3d_View)& view ) if ( view.IsNull() ) return false; - int hwnd = (int)winId(); - if ( !hwnd ) - return false; - - /* set this widget as the drawing window */ - short lo = (short)hwnd; - short hi = (short)( hwnd >> 16 ); - - attachWindow( view, OCCViewer_VService::CreateWindow( view, (int)hi, (int)lo, Xw_WQ_SAMEQUALITY ) ); + attachWindow( view, OCCViewer_VService::CreateWindow( view, winId() ) ); myWindow = view->Window(); return !myWindow.IsNull(); 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/ObjBrowser/OB_Browser.cxx b/src/ObjBrowser/OB_Browser.cxx index a628ccb78..3b1e172b2 100755 --- a/src/ObjBrowser/OB_Browser.cxx +++ b/src/ObjBrowser/OB_Browser.cxx @@ -893,10 +893,15 @@ void OB_Browser::onExpandAll() { QModelIndexList indexes = selectedIndexes(); QModelIndex index; - + disconnect( treeView(), SIGNAL( expanded( const QModelIndex& ) ), + this, SLOT( onExpanded( const QModelIndex& ) ) ); + foreach ( index, indexes ) { myView->expandAll( index ); } + connect( treeView(), SIGNAL( expanded( const QModelIndex& ) ), + this, SLOT( onExpanded( const QModelIndex& ) ) ); + emit(onExpanded( index)); } /*! diff --git a/src/ObjBrowser/OB_Browser.h b/src/ObjBrowser/OB_Browser.h index a3d42a0d4..a05d6f3a4 100755 --- a/src/ObjBrowser/OB_Browser.h +++ b/src/ObjBrowser/OB_Browser.h @@ -120,6 +120,7 @@ signals: private slots: void onExpandAll(); void onCollapseAll(); + virtual void onExpanded( const QModelIndex& ) {} //void onDestroyed( SUIT_DataObject* ); //void onDoubleClicked ( QListViewItem* ); //void onDropped( QPtrList, QListViewItem*, int ); 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/Qtx/QtxPathEdit.cxx b/src/Qtx/QtxPathEdit.cxx index ae0dbfc69..57b6a8b04 100644 --- a/src/Qtx/QtxPathEdit.cxx +++ b/src/Qtx/QtxPathEdit.cxx @@ -22,10 +22,12 @@ // #include "QtxPathEdit.h" +#include #include #include #include #include +#include #include #include #include @@ -78,11 +80,14 @@ static const char* browse_icon[] = { \brief Constructor \param type widget mode (Qtx::PathType) \param parent parent widget + \param browse if \c true, automatically finish editing of file path when + user presses OK in "Select File/Directory" dialog box \sa pathType(), setPathType() */ -QtxPathEdit::QtxPathEdit( const Qtx::PathType type, QWidget* parent ) +QtxPathEdit::QtxPathEdit( const Qtx::PathType type, QWidget* parent, bool browse ) : QFrame( parent ), - myType( type ) + myType( type ), + myBrowse ( browse ) { initialize(); } @@ -93,11 +98,14 @@ QtxPathEdit::QtxPathEdit( const Qtx::PathType type, QWidget* parent ) Qtx::PT_OpenFile mode is used by default. \param parent parent widget + \param browse if \c true, automatically finish editing of file path when + user presses OK in "Select File/Directory" dialog box \sa pathType(), setPathType() */ -QtxPathEdit::QtxPathEdit( QWidget* parent ) +QtxPathEdit::QtxPathEdit( QWidget* parent, bool browse ) : QFrame( parent ), - myType( Qtx::PT_OpenFile ) + myType( Qtx::PT_OpenFile ), + myBrowse ( browse ) { initialize(); } @@ -206,6 +214,9 @@ void QtxPathEdit::onBrowse( bool /*on*/ ) myPath->setText( QDir::convertSeparators( path ) ); myPath->setFocus(); + + if ( !path.isEmpty() && myBrowse ) + QApplication::postEvent( myPath, new QKeyEvent( QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier ) ); } /*! diff --git a/src/Qtx/QtxPathEdit.h b/src/Qtx/QtxPathEdit.h index de991be89..eb5100edd 100644 --- a/src/Qtx/QtxPathEdit.h +++ b/src/Qtx/QtxPathEdit.h @@ -34,8 +34,8 @@ class QTX_EXPORT QtxPathEdit : public QFrame Q_OBJECT public: - QtxPathEdit( const Qtx::PathType, QWidget* = 0 ); - QtxPathEdit( QWidget* = 0 ); + QtxPathEdit( const Qtx::PathType, QWidget* = 0, bool = false ); + QtxPathEdit( QWidget* = 0, bool = false ); virtual ~QtxPathEdit(); QString path() const; @@ -61,6 +61,7 @@ private: QLineEdit* myPath; Qtx::PathType myType; QString myFilter; + bool myBrowse; }; #endif diff --git a/src/Qtx/QtxPathListEdit.cxx b/src/Qtx/QtxPathListEdit.cxx index 17b3044f9..5a9f98379 100644 --- a/src/Qtx/QtxPathListEdit.cxx +++ b/src/Qtx/QtxPathListEdit.cxx @@ -143,7 +143,7 @@ public: \brief Constructor \internal */ - Editor( QWidget* parent = 0 ) : QtxPathEdit( parent ) + Editor( QWidget* parent = 0 ) : QtxPathEdit( parent, true ) { layout()->setSpacing( 0 ); lineEdit()->setFrame( false ); diff --git a/src/Qtx/QtxWebBrowser.cxx b/src/Qtx/QtxWebBrowser.cxx index abd715030..119c012d7 100644 --- a/src/Qtx/QtxWebBrowser.cxx +++ b/src/Qtx/QtxWebBrowser.cxx @@ -405,11 +405,18 @@ void QtxWebBrowser::linkClicked( const QUrl& url ) // special processing of PDF files QStringList readers; readers << "xdg-open" << "acroread" << "kpdf" << "kghostview" << "xpdf"; + int i; foreach ( QString r, readers ) { QString reader = QString( "/usr/bin/%1" ).arg( r ); if ( QFileInfo( reader ).exists() ) { - ::system( QString( "unset LD_LIBRARY_PATH; %1 %2 &" ).arg( reader ).arg( url.toLocalFile() ).toLatin1().constData() ); - break; + i = ::system( QString( "%1 %2" ).arg( reader ).arg( url.toLocalFile() ).toLatin1().constData() ); + // If Salome Qt version is lower than the system one, on KDE an unresolved symbol is raised + // In this case, we try to launch the pdf viewer after unsetting the LD_LIBRARY_PATH environnement variable + // Warning: the test on the return value of ::system does not work if the command ends with '&' + if (i != 0) + i = ::system( QString( "unset LD_LIBRARY_PATH ; %1 %2" ).arg( reader ).arg( url.toLocalFile() ).toLatin1().constData() ); + if (i == 0) + break; } } #endif // WIN32 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/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index f36c4796d..66cab580c 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -159,7 +159,7 @@ extern "C" SALOMEAPP_EXPORT SUIT_Application* createApplication() /*!Constructor.*/ SalomeApp_Application::SalomeApp_Application() - : LightApp_Application(), myNoteBook( 0 ) + : LightApp_Application() { connect( desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ), Qt::UniqueConnection ); @@ -1608,8 +1608,6 @@ void SalomeApp_Application::objectBrowserColumnsVisibility() /*! Set SalomeApp_NoteBook pointer */ void SalomeApp_Application::setNoteBook( SalomeApp_NoteBook* theNoteBook ) { - if ( myNoteBook && myNoteBook != theNoteBook ) - delete myNoteBook; myNoteBook = theNoteBook; } diff --git a/src/SalomeApp/SalomeApp_Application.h b/src/SalomeApp/SalomeApp_Application.h index fbd778537..7064c1eb2 100644 --- a/src/SalomeApp/SalomeApp_Application.h +++ b/src/SalomeApp/SalomeApp_Application.h @@ -44,6 +44,8 @@ #include "SALOMEDSClient.hxx" +#include + class LightApp_Preferences; class SalomeApp_Study; class SalomeApp_NoteBook; @@ -189,7 +191,7 @@ private: void createExtraActions(); private: - SalomeApp_NoteBook* myNoteBook; + QPointer myNoteBook; QMap myExtActions; // Map signals: 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..3cb8978f0 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} @@ -42,17 +42,15 @@ SET(GUI_FORMS mainwindow.ui) QT4_WRAP_UI(GUI_FORMS_HEADERS ${GUI_FORMS}) SET(TreeData_guitester_SOURCES - testhelper.hxx testhelper.cxx guitester.cxx - mainwindow.hxx mainwindow.cxx - MyDataModel.hxx 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 +59,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..7df07c799 --- /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.h + ) + +SET(qtester_FORMS + ${CMAKE_CURRENT_BINARY_DIR}/QDialogTest.ui + ) + +SET(gtester_SOURCES + gtester.cxx + GenericDialog.cxx + ) + +SET(gtester_HEADERS + ${CMAKE_CURRENT_BINARY_DIR}/GDialogTest.h + ) + +SET(gtester_FORMS + ${CMAKE_CURRENT_BINARY_DIR}/GDialogTest.ui + ) + +SET(GenericDialog_HEADERS + GenericDialog.h + ) + +SET(GenericDialog_FORMS + GenericDialog.ui + ) + +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +ADD_CUSTOM_COMMAND( OUTPUT QDialogTest.cxx QDialogTest.h QDialogTest.ui + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/dlgfactory.py -s -n QDialogTest -t qdialog + ) + +ADD_CUSTOM_COMMAND( OUTPUT GDialogTest.cxx GDialogTest.h 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.cxx b/tools/dlgfactory/GenericDialog.cxx index 9b8456674..9c336f492 100644 --- a/tools/dlgfactory/GenericDialog.cxx +++ b/tools/dlgfactory/GenericDialog.cxx @@ -1,4 +1,4 @@ -#include "GenericDialog.hxx" +#include "GenericDialog.h" GenericDialog::GenericDialog(QDialog *parent) : QDialog(parent) { diff --git a/tools/dlgfactory/GenericDialog.h b/tools/dlgfactory/GenericDialog.h new file mode 100644 index 000000000..1c9d7ea69 --- /dev/null +++ b/tools/dlgfactory/GenericDialog.h @@ -0,0 +1,27 @@ +#ifndef _GenericDialog_HXX +#define _GenericDialog_HXX + +#include +#include "ui_GenericDialog.h" + +class GenericDialog : public QDialog +{ + Q_OBJECT + +public: + GenericDialog(QDialog *parent = 0); + + protected: + QFrame * getPanel(); + QDialogButtonBox * getButtonBox(); + + protected slots: + void accept(); + //void reject(); + + private: + Ui_GenericDialog ui; // instance of the class defined in ui_GenericDialog.h +}; + + +#endif // _GenericDialog_HXX diff --git a/tools/dlgfactory/GenericDialog.hxx b/tools/dlgfactory/GenericDialog.hxx deleted file mode 100644 index ee946617d..000000000 --- a/tools/dlgfactory/GenericDialog.hxx +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _GenericDialog_HXX -#define _GenericDialog_HXX - -#include -#include "ui_GenericDialog.hxx" - -class GenericDialog : public QDialog -{ - Q_OBJECT - -public: - GenericDialog(QDialog *parent = 0); - - protected: - QFrame * getPanel(); - QDialogButtonBox * getButtonBox(); - - protected slots: - void accept(); - //void reject(); - - private: - Ui_GenericDialog ui; // instance of the class defined in ui_GenericDialog.h -}; - - -#endif // _GenericDialog_HXX diff --git a/tools/dlgfactory/Makefile.am b/tools/dlgfactory/Makefile.am index c83870fa7..b7090df21 100644 --- a/tools/dlgfactory/Makefile.am +++ b/tools/dlgfactory/Makefile.am @@ -20,20 +20,12 @@ 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 # QDialog uic files UIC_FILES_QDIALOG = \ - ui_QDialogTest.hxx + ui_QDialogTest.h # QDialog moc files MOC_FILES_QDIALOG = \ @@ -41,16 +33,18 @@ MOC_FILES_QDIALOG = \ # GDialog uic files UIC_FILES_GDIALOG= \ - ui_GenericDialog.hxx \ - ui_GDialogTest.hxx + ui_GenericDialog.h \ + ui_GDialogTest.h # GDialog moc files MOC_FILES_GDIALOG= \ GenericDialog_moc.cxx \ GDialogTest_moc.cxx -QDIALOG_TEMPLATES = __QDIALOG__.ui __QDIALOG__.hxx __QDIALOG__.cxx -GDIALOG_TEMPLATES = __GDIALOG__.ui __GDIALOG__.hxx __GDIALOG__.cxx +QDIALOG_TEMPLATES = __QDIALOG__.ui __QDIALOG__.h __QDIALOG__.cxx +GDIALOG_TEMPLATES = __GDIALOG__.ui __GDIALOG__.h __GDIALOG__.cxx +QDIALOG_FILES = QDialogTest.h QDialogTest.cxx QDialogTest.ui +GDIALOG_FILES = GDialogTest.h GDialogTest.cxx GDialogTest.ui # generated sources BUILT_SOURCES = $(UIC_FILES_QDIALOG) $(UIC_FILES_GDIALOG) @@ -59,14 +53,13 @@ BUILT_SOURCES = $(UIC_FILES_QDIALOG) $(UIC_FILES_GDIALOG) EXTRA_DIST += $(QDIALOG_TEMPLATES) $(GDIALOG_TEMPLATES) GenericDialog.ui README.txt dlgfactory.py mostlyclean-local: - rm @builddir@/QDialogTest* - rm @builddir@/GDialogTest* - rm -f @builddir@/*_moc.cxx @builddir@/ui_*.hxx + rm -f $(QDIALOG_FILES) $(GDIALOG_FILES) + rm -f @builddir@/*_moc.cxx @builddir@/ui_*.h -QDialogTest.hxx QDialogTest.cxx QDialogTest.ui: $(QDIALOG_TEMPLATES) dlgfactory.py +$(QDIALOG_FILES): $(QDIALOG_TEMPLATES) dlgfactory.py $(srcdir)/dlgfactory.py -s -n QDialogTest -t qdialog -GDialogTest.hxx GDialogTest.cxx GDialogTest.ui : $(GDIALOG_TEMPLATES) dlgfactory.py +$(GDIALOG_FILES): $(GDIALOG_TEMPLATES) dlgfactory.py $(srcdir)/dlgfactory.py -s -n GDialogTest -t gdialog QT_CXXFLAGS=@QT_INCLUDES@ @QT_MT_INCLUDES@ @@ -89,7 +82,7 @@ qtester_LDFLAGS = \ gtester_SOURCES = \ gtester.cxx \ - GenericDialog.hxx \ + GenericDialog.h \ GenericDialog.cxx nodist_gtester_SOURCES = \ GDialogTest.cxx \ diff --git a/tools/dlgfactory/__GDIALOG__.cxx b/tools/dlgfactory/__GDIALOG__.cxx index 705c7213f..14dc63ac0 100644 --- a/tools/dlgfactory/__GDIALOG__.cxx +++ b/tools/dlgfactory/__GDIALOG__.cxx @@ -1,4 +1,4 @@ -#include "__CLASSNAME__.hxx" +#include "__CLASSNAME__.h" __CLASSNAME__::__CLASSNAME__(QDialog *parent) : GenericDialog(parent) { diff --git a/tools/dlgfactory/__GDIALOG__.h b/tools/dlgfactory/__GDIALOG__.h new file mode 100644 index 000000000..03132d9ec --- /dev/null +++ b/tools/dlgfactory/__GDIALOG__.h @@ -0,0 +1,20 @@ +#ifndef ___CLASSNAME___HXX +#define ___CLASSNAME___HXX + +#include +#include "ui___CLASSNAME__.h" +#include "GenericDialog.h" + +class __CLASSNAME__ : public GenericDialog +{ + Q_OBJECT + + public: + __CLASSNAME__(QDialog *parent = 0); + + private: + Ui___CLASSNAME__ ui; // instance of the class defined in ui___CLASSNAME__.hxx +}; + + +#endif // ___CLASSNAME___HXX diff --git a/tools/dlgfactory/__GDIALOG__.hxx b/tools/dlgfactory/__GDIALOG__.hxx deleted file mode 100644 index ab805a197..000000000 --- a/tools/dlgfactory/__GDIALOG__.hxx +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef ___CLASSNAME___HXX -#define ___CLASSNAME___HXX - -#include -#include "ui___CLASSNAME__.hxx" -#include "GenericDialog.hxx" - -class __CLASSNAME__ : public GenericDialog -{ - Q_OBJECT - - public: - __CLASSNAME__(QDialog *parent = 0); - - private: - Ui___CLASSNAME__ ui; // instance of the class defined in ui___CLASSNAME__.hxx -}; - - -#endif // ___CLASSNAME___HXX diff --git a/tools/dlgfactory/__QDIALOG__.cxx b/tools/dlgfactory/__QDIALOG__.cxx index 32134c395..97f1fadd4 100644 --- a/tools/dlgfactory/__QDIALOG__.cxx +++ b/tools/dlgfactory/__QDIALOG__.cxx @@ -1,4 +1,4 @@ -#include "__CLASSNAME__.hxx" +#include "__CLASSNAME__.h" __CLASSNAME__::__CLASSNAME__(QDialog *parent) : QDialog(parent) { diff --git a/tools/dlgfactory/__QDIALOG__.h b/tools/dlgfactory/__QDIALOG__.h new file mode 100644 index 000000000..b2cfd4f7f --- /dev/null +++ b/tools/dlgfactory/__QDIALOG__.h @@ -0,0 +1,23 @@ +#ifndef ___CLASSNAME___HXX +#define ___CLASSNAME___HXX + +#include +#include "ui___CLASSNAME__.h" + +class __CLASSNAME__ : public QDialog +{ + Q_OBJECT + + public: + __CLASSNAME__(QDialog *parent = 0); + + protected slots: + void accept(); + //void reject(); + + private: + Ui___CLASSNAME__ ui; // instance of the class defined in ui___CLASSNAME__.hxx +}; + + +#endif // ___CLASSNAME___HXX diff --git a/tools/dlgfactory/__QDIALOG__.hxx b/tools/dlgfactory/__QDIALOG__.hxx deleted file mode 100644 index 3865e170b..000000000 --- a/tools/dlgfactory/__QDIALOG__.hxx +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef ___CLASSNAME___HXX -#define ___CLASSNAME___HXX - -#include -#include "ui___CLASSNAME__.hxx" - -class __CLASSNAME__ : public QDialog -{ - Q_OBJECT - - public: - __CLASSNAME__(QDialog *parent = 0); - - protected slots: - void accept(); - //void reject(); - - private: - Ui___CLASSNAME__ ui; // instance of the class defined in ui___CLASSNAME__.hxx -}; - - -#endif // ___CLASSNAME___HXX diff --git a/tools/dlgfactory/dlgfactory.py b/tools/dlgfactory/dlgfactory.py index 5eca0eea4..8f3c57b96 100755 --- a/tools/dlgfactory/dlgfactory.py +++ b/tools/dlgfactory/dlgfactory.py @@ -22,7 +22,7 @@ import sys, os __descr_str = "" __descr_str += "This script generates a set of files to initiate a dialog Qt window " -__descr_str += "(i.e. MyDialog.ui, MyDialog.hxx and MyDialog.cxx files). " +__descr_str += "(i.e. MyDialog.ui, MyDialog.h and MyDialog.cxx files). " __descr_str += "The dialog window can be a self-consistent class (i.e. depends only " __descr_str += "on Qt classes) or a class that inherits class GenericDialog " __descr_str += "which implementation is provided in this package and " @@ -38,10 +38,10 @@ __msg_str = """ # and form source files from ui files # --------------------------------------------------------- -%_moc.cxx: %.hxx +%_moc.cxx: %.h $(MOC) $< -o $@ -ui_%.hxx: %.ui +ui_%.h: %.ui $(UIC) -o $@ $< @@ -51,7 +51,7 @@ ui_%.hxx: %.ui # --------------------------------------------------------- # UIC_FILES = \ - ui___CLASSNAME__.hxx + ui___CLASSNAME__.h # MOC_FILES = \ __CLASSNAME___moc.cxx @@ -70,7 +70,7 @@ BUILT_SOURCES = $(UIC_FILES) nodist__la_SOURCES += $(MOC_FILES) $(UIC_FILES) dist__la_SOURCES += __CLASSNAME__.cxx -salomeinclude_HEADERS += __CLASSNAME__.hxx +salomeinclude_HEADERS += __CLASSNAME__.h _la_CPPFLAGS = \\ $(QT_CXXFLAGS) @@ -100,7 +100,7 @@ if __name__ == "__main__": className = options.className classType = options.classType - for ext in [".cxx", ".hxx", ".ui"]: + for ext in [".cxx", ".h", ".ui"]: file_dest = className + ext if classType == "qdialog": file_src = os.path.join( tool_path, "__QDIALOG__" + ext ) diff --git a/tools/dlgfactory/dlgfactory.sh b/tools/dlgfactory/dlgfactory.sh index 0f127d515..0e17ae81f 100755 --- a/tools/dlgfactory/dlgfactory.sh +++ b/tools/dlgfactory/dlgfactory.sh @@ -29,7 +29,7 @@ # DESCRIPTION: # # This script generates a set of files to initiate a dialog qt window -# (i.e. MyDialog.ui, MyDialog.hxx and MyDialog.cxx files). +# (i.e. MyDialog.ui, MyDialog.h and MyDialog.cxx files). # # The dialog window can be a self-consistent class (i.e. depends only # on Qt classes) or a classe that inherits from the class @@ -83,11 +83,11 @@ fi if [ "$classType" = "qdialog" ]; then sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__QDIALOG__.ui > $className.ui - sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__QDIALOG__.hxx > $className.hxx + sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__QDIALOG__.h > $className.h sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__QDIALOG__.cxx > $className.cxx else sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__GDIALOG__.ui > $className.ui - sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__GDIALOG__.hxx > $className.hxx + sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__GDIALOG__.h > $className.h sed s/__CLASSNAME__/$className/g $TOOLDIRNAME/__GDIALOG__.cxx > $className.cxx fi @@ -107,10 +107,10 @@ displayMessage() ## and form source files from ui files ## --------------------------------------------------------- ## -#%_moc.cxx: %.hxx +#%_moc.cxx: %.h # $(MOC) $< -o $@ # -#ui_%.hxx: %.ui +#ui_%.h: %.ui # $(UIC) -o $@ $< # ## @@ -120,7 +120,7 @@ displayMessage() ## --------------------------------------------------------- ## #UIC_FILES = \ -# ui___CLASSNAME__.hxx +# ui___CLASSNAME__.h ## #MOC_FILES = \ # __CLASSNAME___moc.cxx @@ -139,7 +139,7 @@ displayMessage() #nodist__la_SOURCES += $(MOC_FILES) $(UIC_FILES) # #dist__la_SOURCES += __CLASSNAME__.cxx -#salomeinclude_HEADERS += __CLASSNAME__.hxx +#salomeinclude_HEADERS += __CLASSNAME__.h # #_la_CPPFLAGS = \ # $(QT_CXXFLAGS) diff --git a/tools/dlgfactory/gtester.cxx b/tools/dlgfactory/gtester.cxx index 0f636c240..aec951ad3 100644 --- a/tools/dlgfactory/gtester.cxx +++ b/tools/dlgfactory/gtester.cxx @@ -23,7 +23,7 @@ // #include #include -#include "GDialogTest.hxx" +#include "GDialogTest.h" void TEST_show() { GDialogTest * dialog = new GDialogTest(); diff --git a/tools/dlgfactory/qtester.cxx b/tools/dlgfactory/qtester.cxx index eeb15e5fd..dbb294352 100644 --- a/tools/dlgfactory/qtester.cxx +++ b/tools/dlgfactory/qtester.cxx @@ -23,7 +23,7 @@ // #include #include -#include "QDialogTest.hxx" +#include "QDialogTest.h" void TEST_show() { QDialogTest * dialog = new QDialogTest(); 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")