SOURCE_DIR target property should be whitelisted for INTERFACE libraries
I'm using the Catch2 testing framework in my project. It comes with a CMake module in a subdirectory /contrib, and I have multiple subprojects that would like to link to it and call the scripts in that module directory. I tried this bit of code to do that in my subproject's CMakeLists.txt files.
Instead of hardcoding the directory, I want to call
get_target_property(locationOfCatch Catch2::Catch2 SOURCE_DIR)
then append it to the CMAKE module path after a slight string edit.
This is what I get though:
CMake Error at extern/tuvok/tests/CMakeLists.txt:35 (get_target_property): INTERFACE_LIBRARY targets may only have whitelisted properties. The property "SOURCE_DIR" is not allowed.