<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Johannes,</p>
    <p>minimum or near-minimum builds are tricky because of inter-driver
      dependencies.<br>
    </p>
    <p>You also need to add -DOGR_ENABLE_DRIVER_PGDUMP=ON</p>
    <p>Cf 
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/blob/b2c689436208e72518f4cd60fb5e27d6d985a621/ogr/ogrsf_frmts/CMakeLists.txt#L87">https://github.com/OSGeo/gdal/blob/b2c689436208e72518f4cd60fb5e27d6d985a621/ogr/ogrsf_frmts/CMakeLists.txt#L87</a>:</p>
    <p>{{{<br>
    </p>
    <p>ogr_dependent_driver(pg PostGIS <span class="pl-s">"GDAL_USE_POSTGRESQL;OGR_ENABLE_DRIVER_PGDUMP"</span>)</p>
    <p>}}}<br>
    </p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 28/11/2022 à 15:55, Johannes Paul a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CACcmK9YbFQPStYQrBV8WsUwm=AaYZTYNh0M=WZq2JG9tW5G5Kw@mail.gmail.com">
      <div dir="ltr">Hello,
        <div>i'm having trouble getting GDAL compiled on Centos 7 and 8
          with OGR PostgreSQL driver.</div>
        <div>I used to compile GDAL using configure --with-pg=yes, which
          was working fine, however since v3.6.0 cmake shall be used,
          and I can't get OGR_PG driver enabled using the following
          cmake options:</div>
        <div><br>
        </div>
        <div>cmake3 .. -UGDAL_ENABLE_DRIVER_* -UOGR_ENABLE_DRIVER_*
          -DOGR_BUILD_OPTIONAL_DRIVERS=OFF
          -DGDAL_BUILD_OPTIONAL_DRIVERS=OFF
          -DCMAKE_INSTALL_PREFIX="${INSTALLDIR}"
          -DCMAKE_PREFIX_PATH="${INSTALLDIR}" -DCMAKE_BUILD_TYPE=Release
          -DGDAL_USE_INTERNAL_LIBS=WHEN_NO_EXTERNAL -DGDAL_USE_CURL=ON
          -DGDAL_USE_PNG=ON -DGDAL_USE_PNG_INTERNAL=OFF
          -DPostgreSQL_INCLUDE_DIR="${INSTALLDIR}"/include
          -DPostgreSQL_LIBRARY_RELEASE="${INSTALLDIR}"/lib/libpq.so
          -DGDAL_USE_POSTGRESQL=ON -DGDAL_USE_SQLITE3=ON
          -DGDAL_USE_ZLIB=ON -DGDAL_USE_ZLIB_INTERNAL=OFF
          -DBUILD_TESTING=OFF -DBUILD_PYTHON_BINDINGS=OFF
          -DBUILD_JAVA_BINDINGS=OFF -DBUILD_CSHARP_BINDINGS=OFF
          -DOGR_ENABLE_DRIVER_GPKG=ON -DOGR_ENABLE_DRIVER_SQLITE=ON
          -DOGR_ENABLE_DRIVER_PG=ON -DGDAL_ENABLE_DRIVER_PNG=ON<br>
        </div>
        <div><br>
        </div>
        <div>I do get -- Found PostgreSQL: /opt/i4d/lib/libpq.so (found
          version "13.3"), however OGR_PG is still disabled.</div>
        <div>If I remove -UGDAL_ENABLE_DRIVER_* -UOGR_ENABLE_DRIVER_*
          -DOGR_BUILD_OPTIONAL_DRIVERS=OFF
          -DGDAL_BUILD_OPTIONAL_DRIVERS=OFF, I do get the driver enabled
          however I'm expecting a minimal GDAL configuration, only with
          the drivers I need for the build.</div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>Johannes</div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>