I'm trying to compile MapServer 7 with:
- Proj 6
- Geos 3.7
- Gdal 2.4
- PostGIS 2.5
- PostgreSQL 10
But for some reason it complaining about pg_config
not found, I usually insert the path /usr/pgsql-10/bin/pg_config
to compile software that need the same file but with MapServer 7 I can't
Here my cmake :
cmake -DCMAKE_INSTALL_PREFIX=/opt \
-DCMAKE_PREFIX_PATH=/usr/pgsql-10/bin:/usr/local/src/postgis-2.5.2:/usr/local:/opt:/usr/local/src \
-DWITH_CLIENT_WFS=ON \
-DWITH_CLIENT_WMS=ON \
-DWITH_CURL=ON \
-DWITH_SOS=ON \
-DWITH_FCGI=0 \
-DWITH_PERL=0 \
-DWITH_RUBY=0 \
-DWITH_JAVA=0 \
-DWITH_CSHARP=0 \
-DWITH_PYTHON=0 \
-DWITH_SVGCAIRO=0 \
-DWITH_FRIBIDI=0 \
-DWITH_PROTOBUFC=0 \
-DWITH_CAIRO=0 \
-DWITH_HARFBUZZ=0 \
-DWITH_ORACLESPATIAL=0 \
-DWITH_MSSQL2008=0 \
../ >../configure.out.txt
I don't really understand why I can compile other software correctly and MapServer no, I don't even understand what should I put in the path as looking at this code (supposedly responsible for the check)
https://github.com/Kitware/CMake/blob/master/Modules/FindPostgreSQL.cmake
this is the first error that appear:
Cmake Warning at cmake/FindPostgreSQL.cmake:21 (message)
Pg_config not found, will try some defaults
Call stacks (most recent call first):
cMakeLists.txt:755 (find_package)
and the second one is:
cMake error at CmakeLists.txt:73 (messages)
POSTGIS library/components/dependency could not be found.
HINTS:
-disable postgis...
- add cmake_prefix_path...
Call stack (most recent call firsts)
CMakeLists.txt:590 (report_optional_not_found)
How can I compile it with PostGIS support?