* CMakeLists.txt: Set BINPATH for test executables.
@@ -589,6 +589,7 @@ IF(APR_BUILD_TESTAPR)
ADD_EXECUTABLE(testall ${APR_TEST_SOURCES})
TARGET_LINK_LIBRARIES(testall ${whichapr} ${XMLLIB_LIBRARIES} ${XLATE_LIBRARIES} ${APR_SYSTEM_LIBS})
+ SET_TARGET_PROPERTIES(testall PROPERTIES COMPILE_DEFINITIONS "BINPATH=$<TARGET_FILE_DIR:testall>")
IF(apiflag)
SET_TARGET_PROPERTIES(testall PROPERTIES COMPILE_FLAGS ${apiflag})
ENDIF()
@@ -634,6 +635,7 @@ IF(APR_BUILD_TESTAPR)
STRING(REGEX REPLACE ".*/([^\\]+)\\.c" "\\1" proggie ${sourcefile})
ADD_EXECUTABLE(${proggie} ${sourcefile})
TARGET_LINK_LIBRARIES(${proggie} ${whichapr} ${XMLLIB_LIBRARIES} ${XLATE_LIBRARIES} ${APR_SYSTEM_LIBS})
+ SET_TARGET_PROPERTIES(${proggie} PROPERTIES COMPILE_DEFINITIONS "BINPATH=$<TARGET_FILE_DIR:${proggie}>")
IF(apiflag)
SET_TARGET_PROPERTIES(${proggie} PROPERTIES COMPILE_FLAGS ${apiflag})
ENDIF()
