External project is built by CMake and installed in a directory visible via CMAKE_PREFIX_PATH
. As it\'s CMake project, it installs proper .cmake
files.
Command target_compile_definitions
with INTERFACE keyword appends to property INTERFACE_COMPILE_DEFINITIONS but doesn't work with IMPORTED targets. You need to use a command which directly works with the target properties:
set_property(TARGET _external_lib_name_ APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS FOO_BAR)