Reputation: 1026
I am trying to add some directory finding abilities to a CMake script with
if(PCRE_FOUND)
if(IS_DIRECTORY "${PCRE_INCLUDE_DIRS}pcre")
set( HAVE_PCREINCDIR 1)
endif(IS_DIRECTORY "${PCRE_INCLUDE_DIRS}pcre")
endif(PCRE_FOUND)
And in a config.h file:
#cmakedefine PCRE_SUPPORT
#cmakedefine HAVE_PCREINCDIR
However HAVE_PCREINCDIR
never gets set, eve though that dir DOES exist
And message("${PCRE_INCLUDE_DIRS}pcre")
outputs: C:\pcre\include\pcre
Upvotes: 0
Views: 1104
Reputation: 1026
Turns out, I had put configure_file before this, and the reason it worked for options is of course, they were cached.
Moving configure_file as @Tsyvarev suggested corrected this.
Upvotes: 1