On 9. 6. 25 18:39, Timofei Zhakov wrote:
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
    <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
    
<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/?

See above: "because that's where Serf's CMake build installs the build artefacts."

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?

This /is/ serf-2 support. No more and no less. And we'll this for serf-1 eventually, too, because the next Serf release will have the trunk CMake build, but it won't be called serf-2.

-- Brane

Reply via email to