# Conflicts:
#	indra/cmake/APR.cmake
master
Ansariel 2025-10-20 23:16:15 +02:00
commit 1a58d3e023
2 changed files with 19 additions and 15 deletions

View File

@ -34,5 +34,9 @@ target_include_directories(ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include
# Fix erroneous check for __attribute__ definition introduced with APR 1.7.5, causing lots of "this declaration may not have extern 'C' linkage" errors in VS
file(READ ${LIBS_PREBUILT_DIR}/include/apr-1/apr.h APR_HEADER_CONTENTS)
string(FIND "${APR_HEADER_CONTENTS}" "#if !(defined(__attribute__) || defined(__has_attribute))" ATTRIBUTE_TYPEDEF_POS)
if (${ATTRIBUTE_TYPEDEF_POS} GREATER -1)
string(REPLACE "#if !(defined(__attribute__) || defined(__has_attribute))" "#if !defined(__attribute__)" APR_HEADER_CONTENTS "${APR_HEADER_CONTENTS}")
file(WRITE ${LIBS_PREBUILT_DIR}/include/apr-1/apr.h "${APR_HEADER_CONTENTS}")
endif()