cmake install examples

Signatures

install(TARGETS <target>... [EXPORT <export-name>]
  [RUNTIME_DEPENDENCIES <arg>...|RUNTIME_DEPENDENCY_SET <set-name>]
  [<artifact-option>...]
  [<artifact-kind> <artifact-option>...]...
  [INCLUDES DESTINATION [<dir> ...]]
)

Examples

lightspark/lightspark src/CMakeLists.txt :565

install(RUNTIME_DEPENDENCY_SET spark_dependencies
      DIRECTORIES
        ${extraDirectories}
      DESTINATION ${BINDIR}
      PRE_EXCLUDE_REGEXES
        [[api-ms-win-.*]]
        [[ext-ms-.*]]
        [[kernel32\.dll]]
        [[user32\.dll]]
        [[msvcrt.*\.dll]]
      POST_EXCLUDE_REGEXES
        # For some reason some dependencies use forward slashes, some backward slashes
        [[.*[/\]system32/.*\.dll]]
    )

simbody/simbody SimTKcommon/CMakeLists.txt :177

install(IMPORTED_RUNTIME_ARTIFACTS SimTKcommon
        RUNTIME_DEPENDENCY_SET vendored-dlls
        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})