I have a cmake build in which I'm searching for a bunch of dependencies, i.e. I have many instances of:
FIND_PACKAGE(SomePackage)
if(SOMEPACKAGE_FOUND)
include_directories(${SOMEPACKAGE_INCLUDE_DIR})
link_libraries(${SOMEPACKAGE_LIBRARIES})
endif(SOMEPACKAGE_FOUND)
Now, I want to add a custom command to build a precompiled header file, but to do this I need to know all of the paths added by my include_directories
calls. How can I get a list of these directories (preferably with the proper -I/path/to/directory format) so that I can add them to my custom command?