On Sun, Jun 8, 2025 at 10:26 AM <br...@apache.org> wrote: > Author: brane > Date: Sun Jun 8 08:26:12 2025 > New Revision: 1926244 > > URL: http://svn.apache.org/viewvc?rev=1926244&view=rev > Log: > Teach the CMake build to find serf-2, and use the paths defined in the > GNUInstallDirs module, because that's where Serf's CMake build installs > the build artefacts. > > * build/cmake/FindSerf.cmake: Include and use GNUInstallDirs. > (Serf_INCLUDE_DIR): Look for headers in the serf-2 subdirectory. > (Serf_LIBRARY): Look for the serf-2 library first. > > Modified: > subversion/trunk/build/cmake/FindSerf.cmake > > Modified: subversion/trunk/build/cmake/FindSerf.cmake > URL: > http://svn.apache.org/viewvc/subversion/trunk/build/cmake/FindSerf.cmake?rev=1926244&r1=1926243&r2=1926244&view=diff > > ============================================================================== > --- subversion/trunk/build/cmake/FindSerf.cmake (original) > +++ subversion/trunk/build/cmake/FindSerf.cmake Sun Jun 8 08:26:12 2025 > @@ -19,16 +19,22 @@ > # FindSerf.cmake -- CMake module for Serf library > # > > +include(GNUInstallDirs) > + > find_path(Serf_INCLUDE_DIR > NAMES serf.h > PATH_SUFFIXES > include > + "${CMAKE_INSTALL_INCLUDEDIR}" > + include/serf-2 > + "${CMAKE_INSTALL_INCLUDEDIR}/serf-2" > include/serf-1 > + "${CMAKE_INSTALL_INCLUDEDIR}/serf-1" > ) > > find_library(Serf_LIBRARY > - NAMES serf-1 > - PATH_SUFFIXES lib > + NAMES serf-2 serf-1 > + PATH_SUFFIXES lib "${CMAKE_INSTALL_LIBDIR}" > ) > > mark_as_advanced( > > > What's the purpose of GNUInstallDirs in this module *only*?
By the way, I think it would be great to migrate the whole cmake to use its variables instead of constant strings. Also shouldn't this be committed separately from serf-2 support? -- Timofei Zhakov