add_library — CMake 3.23.0-rc4 Documentation
cmake.org › cmake › helpSource files may be listed directly in the add_library call or added later by calls to target_sources() with the PRIVATE or PUBLIC keywords. If an interface library has source files (i.e. the SOURCES target property is set), it will appear in the generated buildsystem as a build target much like a target defined by the add_custom_target() command.