From 59adc92bf0aea92efd534abefb6221cb80f1219b Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 11 Nov 2013 11:59:34 +0000 Subject: [PATCH] Avoid using special object library, because some problems on WIN32 platform . --- src/PVGUI/CMakeLists.txt | 18 +++++++++++++++++- src/VTKWrapping/CMakeLists.txt | 16 +--------------- src/VTKWrapping/wrap.cmake | 12 ++++++------ 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/src/PVGUI/CMakeLists.txt b/src/PVGUI/CMakeLists.txt index 566015aa..5f95142b 100644 --- a/src/PVGUI/CMakeLists.txt +++ b/src/PVGUI/CMakeLists.txt @@ -143,9 +143,20 @@ SET(_other_SOURCES ) IF(NOT SALOME_PARAVIS_MINIMAL_CORBA) + # Generate headers and sources corresponding to the IDL implementations: + INCLUDE(${PROJECT_SOURCE_DIR}/src/VTKWrapping/wrap.cmake) + + ## From 2.8.10, we should use: + ## SET(CMAKE_POSITION_INDEPENDENT_CODE ON) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") + + # Make the list of wrapped files visible from the top directory (will be used in idl): + SET(WRAP_IDL_I_HH "${WRAP_IDL_I_HH}" PARENT_SCOPE) + SET(WRAP_IDL_I_CC "${WRAP_IDL_I_CC}" PARENT_SCOPE) + SET(_VTK_wrap_SOURCES PARAVIS_CreateClass.cxx - $ + ${WRAP_IDL_I_CC} ) ENDIF() @@ -188,6 +199,11 @@ IF(NOT SALOME_PARAVIS_MINIMAL_CORBA) ADD_DEPENDENCIES(PARAVIS PARAVIS_CreateClass.cxx) ENDIF() +IF(NOT SALOME_PARAVIS_MINIMAL_CORBA) + # Ensure .hh files corresponding to IDL have been generated first: + ADD_DEPENDENCIES(PARAVIS omniorb_module_SalomeIDLPARAVIS) +ENDIF() + TARGET_LINK_LIBRARIES(PARAVIS ${_link_LIBRARIES}) INSTALL(TARGETS PARAVIS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) diff --git a/src/VTKWrapping/CMakeLists.txt b/src/VTKWrapping/CMakeLists.txt index 254f08c8..8b2729dc 100644 --- a/src/VTKWrapping/CMakeLists.txt +++ b/src/VTKWrapping/CMakeLists.txt @@ -84,18 +84,4 @@ FOREACH(name ${_wrap_PROGRAMS}) ENDIF(CMAKE_BUILD_TOOL STREQUAL nmake) ENDIF(WIN32) INSTALL(FILES ${${name}_EXEFILE} DESTINATION bin/salome PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -ENDFOREACH(name ${_wrap_PROGRAMS}) - -# Generate headers and sources corresponding to the IDL implementations: -INCLUDE(wrap.cmake) - -## From 2.8.10, we should use: -## SET(CMAKE_POSITION_INDEPENDENT_CODE ON) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") -ADD_LIBRARY(VTK_IDL_Impl OBJECT ${WRAP_IDL_I_CC}) -# Ensure .hh files corresponding to IDL have been generated first: -ADD_DEPENDENCIES(VTK_IDL_Impl omniorb_module_SalomeIDLPARAVIS) - -# Make the list of wrapped files visible from the top directory (will be used in PVGUI and idl): -SET(WRAP_IDL_I_HH "${WRAP_IDL_I_HH}" PARENT_SCOPE) -SET(WRAP_IDL_I_CC "${WRAP_IDL_I_CC}" PARENT_SCOPE) \ No newline at end of file +ENDFOREACH(name ${_wrap_PROGRAMS}) \ No newline at end of file diff --git a/src/VTKWrapping/wrap.cmake b/src/VTKWrapping/wrap.cmake index adcd1581..4f0a7b0c 100755 --- a/src/VTKWrapping/wrap.cmake +++ b/src/VTKWrapping/wrap.cmake @@ -52,12 +52,12 @@ IF(EXISTS ${CMAKE_BINARY_DIR}/wrapfiles.txt) LIST(APPEND WRAP_IDL_I_HH PARAVIS_Gen_${VAL}_i.hh) LIST(APPEND WRAP_IDL_I_CC PARAVIS_Gen_${VAL}_i.cc) - SET(vtkWrapIDL_HH_EXEFILE ${CMAKE_CURRENT_BINARY_DIR}/vtkWrapIDL_HH) + SET(vtkWrapIDL_HH_EXEFILE ${CMAKE_BINARY_DIR}/src/VTKWrapping/vtkWrapIDL_HH) IF(WIN32) IF(CMAKE_BUILD_TOOL STREQUAL nmake) - SET(vtkWrapIDL_HH_EXEFILE ${CMAKE_CURRENT_BINARY_DIR}/vtkWrapIDL_HH.exe) + SET(vtkWrapIDL_HH_EXEFILE ${CMAKE_BINARY_DIR}/src/VTKWrapping/vtkWrapIDL_HH.exe) ELSE(CMAKE_BUILD_TOOL STREQUAL nmake) - SET(vtkWrapIDL_HH_EXEFILE ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/vtkWrapIDL_HH.exe) + SET(vtkWrapIDL_HH_EXEFILE ${CMAKE_BINARY_DIR}/src/VTKWrapping/${CMAKE_BUILD_TYPE}/vtkWrapIDL_HH.exe) ENDIF(CMAKE_BUILD_TOOL STREQUAL nmake) ENDIF(WIN32) @@ -67,12 +67,12 @@ IF(EXISTS ${CMAKE_BINARY_DIR}/wrapfiles.txt) DEPENDS vtkWrapIDL_HH ${PARAVIEW_INCLUDE_DIR0}/${VAL}.h ${CMAKE_BINARY_DIR}/idl/hints ${DEP_HH} ) - SET(vtkWrapIDL_CC_EXEFILE ${CMAKE_CURRENT_BINARY_DIR}/vtkWrapIDL_CC) + SET(vtkWrapIDL_CC_EXEFILE ${CMAKE_BINARY_DIR}/src/VTKWrapping/vtkWrapIDL_CC) IF(WIN32) IF(CMAKE_BUILD_TOOL STREQUAL nmake) - SET(vtkWrapIDL_CC_EXEFILE ${CMAKE_CURRENT_BINARY_DIR}/vtkWrapIDL_CC.exe) + SET(vtkWrapIDL_CC_EXEFILE ${CMAKE_BINARY_DIR}/src/VTKWrapping/vtkWrapIDL_CC.exe) ELSE(CMAKE_BUILD_TOOL STREQUAL nmake) - SET(vtkWrapIDL_CC_EXEFILE ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/vtkWrapIDL_CC.exe) + SET(vtkWrapIDL_CC_EXEFILE ${CMAKE_BINARY_DIR}/src/VTKWrapping/${CMAKE_BUILD_TYPE}/vtkWrapIDL_CC.exe) ENDIF(CMAKE_BUILD_TOOL STREQUAL nmake) ENDIF(WIN32) -- 2.39.2