X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FParaMEDCorba%2FCMakeLists.txt;h=1fedca98e9a5d4a3de929615a091559abe4970eb;hb=93f9011ebff68493d86553f994ceb4c46bf7b310;hp=50333c3dc3f5abfb55ba6011a080668fc105411a;hpb=b72346ef0cb0dafafebe30ccb12d57e2652864bb;p=modules%2Fparavis.git diff --git a/src/Plugins/ParaMEDCorba/CMakeLists.txt b/src/Plugins/ParaMEDCorba/CMakeLists.txt index 50333c3d..1fedca98 100644 --- a/src/Plugins/ParaMEDCorba/CMakeLists.txt +++ b/src/Plugins/ParaMEDCorba/CMakeLists.txt @@ -1,9 +1,9 @@ -# Copyright (C) 2010-2012 CEA/DEN, EDF R&D +# Copyright (C) 2010-2019 CEA/DEN, EDF R&D # # 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. +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -20,6 +20,10 @@ PROJECT( ParaMEDCorba ) CMAKE_MINIMUM_REQUIRED( VERSION 2.8.7 ) + IF(WIN32) + CMAKE_POLICY(SET CMP0020 OLD) # disable automatic linking to qtmain.lib + ENDIF(WIN32) + ## !!! This definition corrupts wrapping process #SET( LIBRARY_OUTPUT_PATH ${ParaMEDCorba_BINARY_DIR}/bin CACHE INTERNAL "Single place for output" ) #SET( EXECUTABLE_OUTPUT_PATH ${ParaMEDCorba_BINARY_DIR}/bin CACHE INTERNAL "Single place for output" ) @@ -33,8 +37,8 @@ PROJECT( ParaMEDCorba ) IF( ParaView_FOUND ) INCLUDE( ${PARAVIEW_USE_FILE} ) - - FIND_PACKAGE( VTK 6.0 COMPONENTS vtkClientServer NO_MODULE) + + FIND_PACKAGE( VTK COMPONENTS vtkClientServer NO_MODULE NO_DEFAULT_PATH) INCLUDE( ${VTK_USE_FILE} ) SET( PARACORBAPLUG_SRCS @@ -46,29 +50,37 @@ PROJECT( ParaMEDCorba ) ADD_PARAVIEW_PLUGIN( ParaMEDCorbaPlugin "1.0" SERVER_MANAGER_XML ParaMEDCorbaServerManager.xml - GUI_RESOURCE_FILES - ParaMEDCorbaUserInterfaceSources.xml SERVER_MANAGER_SOURCES ${PARACORBAPLUG_SRCS} ) - INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIRS} ${MED_ROOT_DIR}/include/salome ${KERNEL_ROOT_DIR}/include/salome) - SET_TARGET_PROPERTIES(ParaMEDMEM2VTK PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") - SET_TARGET_PROPERTIES(ParaMEDCorbaPlugin PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") + INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${FIELDS_ROOT_DIR}/include/salome ${KERNEL_ROOT_DIR}/include/salome) + ADD_DEFINITIONS(${OMNIORB_DEFINITIONS}) TARGET_LINK_LIBRARIES(ParaMEDMEM2VTK #vtkCommon #vtkFiltering #vtkGraphics vtkClientServer + vtkPVVTKExtensionsRendering pqCore ${OMNIORB_LIBRARIES} - ${SalomeIDLMED} - ${SalomeIDLKernel} - ${QT_LIBS} + ${FIELDS_SalomeIDLMED} + ${KERNEL_SalomeIDLKernel} ) TARGET_LINK_LIBRARIES(ParaMEDCorbaPlugin ParaMEDMEM2VTK ) + #Build library with a static runtime and ignore MSVCRT.lib on WINDOWS + IF(WIN32) + IF(CMAKE_BUILD_TYPE STREQUAL Debug) + SET_TARGET_PROPERTIES(ParaMEDMEM2VTK PROPERTIES LINK_FLAGS "/NODEFAULTLIB:MSVCRTD") + SET_TARGET_PROPERTIES(ParaMEDMEM2VTK PROPERTIES COMPILE_FLAGS "/MTd") + ELSE() + SET_TARGET_PROPERTIES(ParaMEDMEM2VTK PROPERTIES LINK_FLAGS "/NODEFAULTLIB:MSVCRT") + SET_TARGET_PROPERTIES(ParaMEDMEM2VTK PROPERTIES COMPILE_FLAGS "/MT") + ENDIF() + ENDIF(WIN32) + INSTALL(TARGETS ParaMEDCorbaPlugin DESTINATION lib/paraview) INSTALL(TARGETS ParaMEDMEM2VTK DESTINATION lib/salome) @@ -77,9 +89,11 @@ PROJECT( ParaMEDCorba ) ${ParaMEDCorba_SOURCE_DIR}/testParaMEDCorba.cxx ) # SET_TARGET_PROPERTIES(testCorbaPlugin PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") - + + # RNV: ${vtkgl2ps_LIBRARIES} was added for Fedora 26 OS TARGET_LINK_LIBRARIES( testParaMEDCorba ParaMEDCorbaPlugin + ${vtkgl2ps_LIBRARIES} ) INSTALL(FILES ParaMEDCorbaServerManager.xml DESTINATION share)