nextgis-borsch/borsch

Disable find package GDAL

Closed this issue · 2 comments

Hi,
I'm trying to use the nextgis-borsch project in a Superbuild pattern:

message("cmake module path:"  ${CMAKE_MODULE_PATH})
include(FindAnyProject)
find_anyproject(GDAL REQUIRED DEFAULT ON)

I'm expecting borsch to automatically fetch and build the dependencies if not found on the system. For test purpose, I'm trying to deactivate the system search by using the -DCMAKE_DISABLE_FIND_PACKAGE_GDAL=ON but it seems that find_anyproject still looks on my system for GDAL:

-- Not found GDAL in packages. Try look in system.
and once gdal has been found on my system, the project runs correctly.

Is it the expected behavior ? Is there a way to force the superbuild ?
Thank you, borsch is great work !

We don't support CMAKE_DISABLE_FIND_PACKAGE_XXX flag.

As noted at https://github.com/nextgis-borsch/borsch/blob/master/README.md you need to add -DWITH_GDAL=ON flag. To fetch remote sources or prebuild binary package use -DWITH_GDAL_EXTERNAL=ON.
Current behaviour is to search all required installed packages in target OS. Also there are defaults here: https://github.com/nextgis-borsch/lib_gdal/blob/master/cmake/defaults.cmake. To override defaults use -DSKIP_DEFAULTS =ON. You can make similar file in your project.

You may look for CMAKE flags used in our build system here: https://github.com/nextgis/buildbot/blob/master/makeborsch.py

Awesome, thanks a lot for the information :)