残片纸堆
CMake Modifier Keywords
This text explains CMake target property modifiers and library type modifiers. For target attributes such as target_include_directories, target_link_libraries, target_compile_definitions, target_compile_options, and target_sources, the modifiers PRIVATE (property used only in the target), PUBLIC (used in the target and its dependents), and INTERFACE (used only in dependents) control visibility. Additionally, for the add_library command, library types are defined with STATIC (static library), SHARED (dynamic library), MODULE (plugin library not linked), and INTERFACE (header-only library propagating properties). Note that INTERFACE appears in both contexts but has different meanings.
Letter №17Read full note →