Re: [Paraview] ParaViewConfig.cmake created too late with ENABLE_paraviewpluginsexternal

2017-01-05 Thread Ben Boeckel
On Thu, Jan 05, 2017 at 13:07:32 +0100, Fabian Wein wrote:
> I think there is still an issue building plugins via 
> -DENABLE_paraviewpluginsexternal:BOOL=ON when building 
> paraview-superbuild.
> 
> cmake ../paraview-superbuild -DCMAKE_BUILD_TYPE:STRING=Release 
> -DBUILD_TESTING=OFF -DENABLE_cxx11=ON -DENABLE_qt5=ON 
> -DENABLE_boost:BOOL=ON -DENABLE_hdf5:BOOL=ON -DENABLE_zlib:BOOL=ON 
> -DENABLE_png:BOOL=ON 
> -Dsuperbuild_download_location=$HOME/code/cfsdepscache/paraview 
> -DENABLE_paraviewpluginsexternal:BOOL=ON 
> -Dparaview_PLUGINS_EXTERNAL:STRING=CFSReader 
> -Dparaview_PLUGIN_CFSReader_PATH:PATH=$METABUILD/../plugins/CFSReader
> 
> results in the error
> 
> CMake Error at ~/code/cfs_paraview/plugins/CFSReader/CMakeLists.txt:43 
> (FIND_PACKAGE):
>By not providing "FindParaView.cmake" in CMAKE_MODULE_PATH this 
> project has
>asked CMake to find a package configuration file provided by 
> "ParaView",
>but CMake did not find one.
> 
>Could not find a package configuration file provided by "ParaView" 
> with any
>of the following names:
> 
>  ParaViewConfig.cmake
>  paraview-config.cmake
> 
>Add the installation prefix of "ParaView" to CMAKE_PREFIX_PATH or set
>"ParaView_DIR" to a directory containing one of the above files.  If
>"ParaView" provides a separate development package or SDK, be sure 
> it has
>been installed.
> 
> And indeed ParaViewConfig.cmake does not exist yet in 
> ParaView_DIR=~/code/cfs_paraview/metabuild/build/superbuild/paraview/build
> 
> It works when I do the cmake ../paraview-superbuild first without 
> -DENABLE_paraviewpluginsexternal:BOOL=ON ...
> and then a second time with (as shown above).
> 
> However, we want to build the paraview-superbuild with our plugin 
> automatically (e.g. in our nightly builds) with an own cmake project 
> where paraview-superbuild is an external project.
> 
> Do I something wrong? Is this a bug? Any hint on how to do a workaround?

The external plugins bit builds the plugin as part of ParaView's build,
not after it is built. You can detect this the same way the PointSprite
plugin in ParaView itself does so:

if (ParaView_SOURCE_DIR)
  # Within the source tree already.
else ()
  find_package(ParaView REQUIRED)
  # ...
endif ()
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


[Paraview] ParaViewConfig.cmake created too late with ENABLE_paraviewpluginsexternal

2017-01-05 Thread Fabian Wein
I think there is still an issue building plugins via 
-DENABLE_paraviewpluginsexternal:BOOL=ON when building 
paraview-superbuild.


cmake ../paraview-superbuild -DCMAKE_BUILD_TYPE:STRING=Release 
-DBUILD_TESTING=OFF -DENABLE_cxx11=ON -DENABLE_qt5=ON 
-DENABLE_boost:BOOL=ON -DENABLE_hdf5:BOOL=ON -DENABLE_zlib:BOOL=ON 
-DENABLE_png:BOOL=ON 
-Dsuperbuild_download_location=$HOME/code/cfsdepscache/paraview 
-DENABLE_paraviewpluginsexternal:BOOL=ON 
-Dparaview_PLUGINS_EXTERNAL:STRING=CFSReader 
-Dparaview_PLUGIN_CFSReader_PATH:PATH=$METABUILD/../plugins/CFSReader


results in the error

CMake Error at ~/code/cfs_paraview/plugins/CFSReader/CMakeLists.txt:43 
(FIND_PACKAGE):
  By not providing "FindParaView.cmake" in CMAKE_MODULE_PATH this 
project has
  asked CMake to find a package configuration file provided by 
"ParaView",

  but CMake did not find one.

  Could not find a package configuration file provided by "ParaView" 
with any

  of the following names:

ParaViewConfig.cmake
paraview-config.cmake

  Add the installation prefix of "ParaView" to CMAKE_PREFIX_PATH or set
  "ParaView_DIR" to a directory containing one of the above files.  If
  "ParaView" provides a separate development package or SDK, be sure 
it has

  been installed.

And indeed ParaViewConfig.cmake does not exist yet in 
ParaView_DIR=~/code/cfs_paraview/metabuild/build/superbuild/paraview/build


It works when I do the cmake ../paraview-superbuild first without 
-DENABLE_paraviewpluginsexternal:BOOL=ON ...

and then a second time with (as shown above).

However, we want to build the paraview-superbuild with our plugin 
automatically (e.g. in our nightly builds) with an own cmake project 
where paraview-superbuild is an external project.


Do I something wrong? Is this a bug? Any hint on how to do a workaround?

Thanks!

Fabian
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview