Definition of "main file" as used in cmake-generator-expressions(7)

Help page cmake-generator-expresions(7), section Target-Dependent Queries, depends heavily on the notion of a “main file”. What is meant by this?

I guess this “main file” is meant to be a top-level <target>. A top-level target is one created by one of the add_executable() , add_library() , or add_custom_target() commands (but not targets generated by CMake like install ).


@jwuttke that documentation could certainly use clarification. The use of “main file” refers to the runtime artifact for shared libraries and executables (.so, .dll, or .exe but not their .lib import library), and for static libraries it refers to the static library itself.

Thanks to all of you. See now