Hello all,

Thanks Christoph for sharing your cmake patches: they worked for me.

I use OpenSuSE Leap 15.0 with Proj 6.0.0 packages from the Application:Geo repository. They don't include the cmake files, so the latest source failed to configure (because Oliver's fix currently only detects the case of Debian distros).

Instead of trying to fix the fix (by treating OpenSuSE as Debian), I decided to go down your path, so I tried to manually apply your patches to the latest CMakeLists. I just got error messages (as expected) from the failing find(PROJ4) operation still not finding the cmake files, but this did not stop the configuration which completed successfully, and everything else went fine.

Thank you and best regards,

-Pierre.


Le 14/04/2019 à 18:08, Christoph Moench-Tegeder a écrit :
## Christoph Moench-Tegeder ([email protected]):
  Perhaps a better approach is to use
these (with cmake's pkg_check_modules) if we cannot find proj via
find_package? I'll check what could be done there.

OK, this works (for me). See attached - against 1.13.0 (the whole
cmake-patches-the-source can be reverted).
Explanations:
  - first, we need to load FindPkgConfig
    https://cmake.org/cmake/help/latest/module/FindPkgConfig.html
  - if proj cannot be found by find_package() (N.B. is it still PROJ4
    for proj >= 5.0?), check if proj can be found with pkg_search_module()
    (pkg-config), keeping the PROJ4 prefix for the variables
  - a few CMakeLists.txt have to be touched, as find_ppackage() will
    fill PROJ4_LIBRARIES with the full path to libproj.so (e.g.
    "/usr/local/lib/libproj.so") but pkg_search_module() gives us the
    linker-style "-lproj" and we need to pass extra LDFLAGS.

I don't have a system with cmake-built libproj, so please test...

Regards,
Christoph



_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users




_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users

Reply via email to