Prevent full rebuild each time CMake detects any changes
parent
31b81b2c05
commit
77746a648f
|
|
@ -34,6 +34,9 @@ target_include_directories(ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include
|
|||
|
||||
# <FS:Ansariel> Hotfix incorrect check in APR header
|
||||
file(READ ${LIBS_PREBUILT_DIR}/include/apr-1/apr.h APR_HEADER_CONTENTS)
|
||||
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}")
|
||||
# </FS:Ansariel>
|
||||
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()
|
||||
# </FS:Ansariel>
|
||||
|
|
|
|||
Loading…
Reference in New Issue