CMake 入門/常用屬性

全域屬性

编辑

資料夾屬性

编辑

Target 屬性

编辑
BUILD_WITH_INSTALL_RPATH
DEFINE_SYMBOL
ENABLE_EXPORTS
EXCLUDE_FROM_ALL
EchoString
FOLDER
FRAMEWORK
Fortran_MODULE_DIRECTORY
GENERATOR_FILE_NAME
HAS_CXX
IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
INSTALL_NAME_DIR
INSTALL_RPATH
INSTALL_RPATH_USE_LINK_PATH
INTERPROCEDURAL_OPTIMIZATION
INTERPROCEDURAL_OPTIMIZATION_<CONFIG>
LABELS


LINKER_LANGUAGE
LINK_SEARCH_END_STATIC
LOCATION
LOCATION_<CONFIG>
MACOSX_BUNDLE
MACOSX_BUNDLE_INFO_PLIST
MACOSX_FRAMEWORK_INFO_PLIST
MAP_IMPORTED_CONFIG_<CONFIG>
OSX_ARCHITECTURES
OSX_ARCHITECTURES_<CONFIG>
POST_INSTALL_SCRIPT
PREFIX
PRE_INSTALL_SCRIPT
PRIVATE_HEADER
PROJECT_LABEL
PUBLIC_HEADER
RESOURCE
RULE_LAUNCH_COMPILE
RULE_LAUNCH_CUSTOM
RULE_LAUNCH_LINK
SKIP_BUILD_RPATH
SOURCES
SOVERSION


TYPE
VERSION
VS_KEYWORD
VS_SCC_LOCALPATH
VS_SCC_PROJECTNAME
VS_SCC_PROVIDER
XCODE_ATTRIBUTE_<an-attribute>

輸出相關屬性

编辑

輸出位置

编辑
ARCHIVE_OUTPUT_DIRECTORY
ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
LIBRARY_OUTPUT_DIRECTORY
LIBRARY_OUTPUT_DIRECTORY_<CONFIG>
RUNTIME_OUTPUT_DIRECTORY
RUNTIME_OUTPUT_DIRECTORY_<CONFIG>

輸出名稱

编辑
OUTPUT_NAME
OUTPUT_NAME_<CONFIG>
<CONFIG>_OUTPUT_NAME
<CONFIG>_POSTFIX
ARCHIVE_OUTPUT_NAME
ARCHIVE_OUTPUT_NAME_<CONFIG>
LIBRARY_OUTPUT_NAME
LIBRARY_OUTPUT_NAME_<CONFIG>
RUNTIME_OUTPUT_NAME
RUNTIME_OUTPUT_NAME_<CONFIG>
SUFFIX
DEBUG_POSTFIX

編譯行為相關屬性

编辑
COMPILE_DEFINITIONS
COMPILE_DEFINITIONS_<CONFIG>
COMPILE_FLAGS
LINK_FLAGS
LINK_FLAGS_<CONFIG>
STATIC_LIBRARY_FLAGS
STATIC_LIBRARY_FLAGS_<CONFIG>
LINK_INTERFACE_LIBRARIES
LINK_INTERFACE_LIBRARIES_<CONFIG>
LINK_INTERFACE_MULTIPLICITY
LINK_INTERFACE_MULTIPLICITY_<CONFIG>
WIN32_EXECUTABLE

Imported

编辑
IMPORTED
IMPORTED_CONFIGURATIONS
IMPORTED_IMPLIB
IMPORTED_IMPLIB_<CONFIG>
IMPORTED_LINK_DEPENDENT_LIBRARIES
IMPORTED_LINK_DEPENDENT_LIBRARIES_<CONFIG>
IMPORTED_LINK_INTERFACE_LANGUAGES
IMPORTED_LINK_INTERFACE_LANGUAGES_<CONFIG>
IMPORTED_LINK_INTERFACE_LIBRARIES
IMPORTED_LINK_INTERFACE_LIBRARIES_<CONFIG>
IMPORTED_LINK_INTERFACE_MULTIPLICITY
IMPORTED_LINK_INTERFACE_MULTIPLICITY_<CONFIG>
IMPORTED_LOCATION
IMPORTED_LOCATION_<CONFIG>
IMPORTED_NO_SONAME
IMPORTED_NO_SONAME_<CONFIG>
IMPORTED_SONAME
IMPORTED_SONAME_<CONFIG>
IMPORT_PREFIX
IMPORT_SUFFIX

程式碼屬性

编辑