On Fri, Jun 6, 2025 at 11:34 PM Peter Balogh <pe...@svnplus.com> wrote: > > Hi, > > I'm trying to build serf with vcpkg dependecies using this command > > cmake -B out > -DCMAKE_TOOLCHAIN_FILE=..\vcpkg\scripts\buildsystems\vcpkg.cmake > -DAPR_ROOT=..\vcpkg\packages\apr_x64-windows > -DAPRUtil_ROOT=..\vcpkg\packages\apr-util_x64-windows > cmake --build out > > Than I run python gen-make.py -t cmake > --with-serf=..\serf-serf-user-defined-authn in subversion and try to > build with this command > > cmake -B out -DSVN_ENABLE_RA_SERF=ON > -DCMAKE_TOOLCHAIN_FILE=..\vcpkg\scripts\buildsystems\vcpkg.cmake > -DCMAKE_PREFIX_PATH=..\serf-serf-user-defined-authn\out\Debug > -DCMAKE_PREFIX_PATH=..\serf-serf-user-defined-authn > > But Serf is not found, because there's no libserf-1 only libserf-2 > > -- Building for: Visual Studio 17 2022 > -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100. > -- The C compiler identification is MSVC 19.43.34810.0 > -- Detecting C compiler ABI info > -- Detecting C compiler ABI info - done > -- Check for working C compiler: C:/Program Files/Microsoft Visual > Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/cl.exe - > skipped > -- Detecting C compile features > -- Detecting C compile features - done > -- Found APR: > C:/Work/SVNPlus/Workspace/subversion/vcpkg/installed/x64-windows/debug/lib/libapr-1.lib > (found version "1.7.5") > -- Found APRUtil: > C:/Work/SVNPlus/Workspace/subversion/vcpkg/installed/x64-windows/debug/lib/libaprutil-1.lib > (found version "1.6.3") > -- Found ZLIB: > optimized;C:/Work/SVNPlus/Workspace/subversion/vcpkg/installed/x64-windows/lib/zlib.lib;debug;C:/Work/SVNPlus/Workspace/subversion/vcpkg/installed/x64-windows/debug/lib/zlibd.lib > (found version "1.3.1") > -- Found EXPAT: > optimized;C:/Work/SVNPlus/Workspace/subversion/vcpkg/installed/x64-windows/lib/libexpat.lib;debug;C:/Work/SVNPlus/Workspace/subversion/vcpkg/installed/x64-windows/debug/lib/libexpatd.lib > (found version "2.7.1") > -- Found SQLite3: > C:/Work/SVNPlus/Workspace/subversion/vcpkg/installed/x64-windows/include > (found version "3.49.1") > CMake Error at C:/Program Files/Microsoft Visual > Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 > (message): > Could NOT find Serf (missing: Serf_LIBRARY Serf_INCLUDE_DIR) > Call Stack (most recent call first): > C:/Program Files/Microsoft Visual > Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:603 > (_FPHSA_FAILURE_MESSAGE) > build/cmake/FindSerf.cmake:56 (find_package_handle_standard_args) > C:/Work/SVNPlus/Workspace/subversion/vcpkg/scripts/buildsystems/vcpkg.cmake:893 > (_find_package) > CMakeLists.txt:326 (find_package) > > Am I missing something, or doing something wrong? > Previously I just modified FindSerf.cmake to look for serf-2, but this > does not seem to do the trick anymore > > -- > Best regards, > Peter >
Subversion's cmake doesn't support build layout consuming dependencies. I think it's better to do `cmake install` for Serf, so it will create a directory with properly organised files. Also, I'm not sure, but I think cmake doesn't allow specifying one property multiple times. I think in your scenario, only the second `-DCMAKE_PREFIX_PATH=..\serf-serf-user-defined-authn` takes place. It's better to list all paths like `-DCMAKE_PREFIX_PATH=..\serf-serf-user-defined-authn\out\Debug;..\serf-serf-user-defined-authn`. -- Timofei Zhakov