Den tors 12 juni 2025 kl 00:34 skrev Timofei Zhakov <t...@chemodax.net>:

> Revert most of the changes in svn_utf.h from r1926293. Instead, tell the
>> CMake build to expose APR and APR-Util include paths everywhere.
>>
>> (...)
>
>>
>> * CMakeLists.txt: Add APR and APR-Util include paths to the top-level
>>    directory properties.
>>
>
> (...)
>
>
>> --- subversion/trunk/CMakeLists.txt (original)
>> +++ subversion/trunk/CMakeLists.txt Wed Jun 11 15:40:43 2025
>> @@ -289,6 +289,12 @@ else()
>>    endif()
>>  endif()
>>
>> +# APR and APR-Util include directories must be available to all our
>> souroces,
>> +# not just those that happen to link with one or the other of these
>> libraries.
>> +get_target_property(_apr_include external-apr
>> INTERFACE_INCLUDE_DIRECTORIES)
>> +get_target_property(_apu_include external-aprutil
>> INTERFACE_INCLUDE_DIRECTORIES)
>> +include_directories(${_apr_include} ${_apu_include})
>> +
>>
>
> This is wrong. You can't modify global include directories of the entire
> project to force it to use apr everywhere. This is a hack, not a fix.
>

As far as I understand CMake would add the include directories
automatically on targets that link APR (or APR-U... havn't wrapped my head
around what goes where yet), but the issue is that it doesn't do that when
not linking the libraries - is that correct?

What is the CMake-ish solution here?

Since we generate the CMake target code from build.conf - can we add a new
parameter that add these include directories only on the targets that
actually require them?

Cheers,
Daniel

Reply via email to