Skip to content
  • Jean-Christophe Fillion-Robin's avatar
    vtkModuleMacros: Fix build of vtkLocal as a standalone project · e67d72d0
    Jean-Christophe Fillion-Robin authored
    
    
    Without this commit, the following test was failing:
    
      VTK_SOURCE_DIR=~/Projects/VTK
      VTK_BUILD_DIR=/home/jcfr/Projects/VTK-Release
    
      rm -rf vtkLocalStandalone*
      cp -r $VTK_SOURCE_DIR/Examples/Build/vtkLocal/ vtkLocalStandalone
      pushd vtkLocalStandalone
      for file in $(ls -1); do
        updated_file=$(echo $file | sed -e 's/vtkLocal/vtkLocalStandalone/g');
        sed -e 's/vtkLocal/vtkLocalStandalone/g' -i $file
        sed -e 's/VTKLOCAL/VTKLOCALSTANDALONE/g' -i $file
        [[ $file != $updated_file ]] && mv $file $updated_file
      done
      popd
    
      mkdir vtkLocalStandalone-build
      pushd vtkLocalStandalone-build
    
      cmake -DVTK_DIR:PATH=$VTK_BUILD_DIR ../vtkLocalStandalone
      make -j4
    
      popd
    
    with error:
    
      CMake Error at /home/jcfr/Projects/VTK/CMake/vtkModuleMacros.cmake:505 (export):
        export FILE option given filename "" which does not have an extension of
        ".cmake".
    
      Call Stack (most recent call first):
        /home/jcfr/Projects/VTK/CMake/vtkModuleMacros.cmake:547 (vtk_target_export)
        /home/jcfr/Projects/VTK/CMake/vtkModuleMacros.cmake:624 (vtk_target)
        /home/jcfr/Projects/VTK/CMake/vtkModuleMacros.cmake:712 (vtk_add_library)
        CMakeLists.txt:28 (vtk_module_library)
    
    Suggested-by: default avatarUtkarsh Ayachit <utkarsh.ayachit@kitware.com>
    e67d72d0