I think I found the problem. Where is APR_INCLUDE_DIR set from APR_INCLUDE_DIR_INT?? All I find is:
EXEC_PROGRAM(${APR_CONFIG} ARGS "--includedir" OUTPUT_VARIABLE APR_INCLUDE_DIR_INT)
which works to set APR_INCLUDE_DIR_INT, but I can't find anywhere that there is a:
SET(APR_INCLUDE_DIR ${APR_INCLUDE_DIR_INT})
I believe cmake generates the variable when the pkg config test is performed. cmake generates many internal variables.
Darrell