PUBLIC compile definitions propagate to all link consumers
Goal Keep an internal compile definition available to a library target while preventing it from appearing in the compile commands of targets that link against the library. Constraint target_compile_definitions(lib PUBLIC INTERNAL_MACRO) adds the macro to lib and propagates it through target_link_libraries as part of INTERFACE_COMPILE_DEFINITIONS . CMake does