The POSITION_INDEPENDENT_CODE property documentation states that its
default value depends on whether SHARED or MODULE is given to the
add_library call. Since these are options to the add_library command we
should document on the command how they affect the property.
While at it, add a missing space to the POSITION_INDEPENDENT_CODE
property documentation.
Describe the OBJECT library signature of add_library and the
$<TARGET_OBJECTS:...> expressions needed to use object libraries.
Also document the what is not allowed for object library targets.
Consider the case motivating commit e01cce28 (Allow add_dependencies()
on imported targets, 2010-11-19). An imported target references a file
generated at build time by a custom target on which it depends. Had the
file been built directly using add_library or add_executable its target
name would have been visible globally. Therefore the imported target
representing the file should be globally visible also.
Teach the IMPORTED signature of add_(executable|library) to accept a new
"GLOBAL" option to make the imported target visible globally.
This converts the CMake license to a pure 3-clause OSI-approved BSD
License. We drop the previous license clause requiring modified
versions to be plainly marked. We also update the CMake copyright to
cover the full development time range.
When creating an IMPORTED target for a library that has been found on
disk, it may not be known whether the library is STATIC or SHARED.
However, the library may still be linked using the file found from disk.
Use of an IMPORTED target is still important to allow per-configuration
files to be specified for the library.
This change creates an UNKNOWN type for IMPORTED library targets. The
IMPORTED_LOCATION property (and its per-config equivalents) specifies
the location of the library. CMake makes no assumptions about the
library that cannot be inferred from the file on disk. This will help
projects and find-modules import targets found on disk or specified by
the user.
- Error if imported target is involved in conflict
- Error for non-imported target conflict unless
CMAKE_BACKWARDS_COMPATIBILITY <= 2.4
- Include OUTPUT_NAME property in error message
- Update add_executable and add_library command documentation
- Created cmExportFileGenerator hierarchy to implement export file generation
- Installed exports use per-config import files loaded by a central one.
- Include soname of shared libraries in import information
- Renamed PREFIX to NAMESPACE in INSTALL(EXPORT) and EXPORT() commands
- Move addition of CMAKE_INSTALL_PREFIX to destinations to install generators
- Import files compute the installation prefix relative to their location when loaded
- Add mapping of importer configurations to importee configurations
- Rename IMPORT targets to IMPORTED targets to distinguish from windows import libraries
- Scope IMPORTED targets within directories to isolate them
- Place all properties created by import files in the IMPORTED namespace
- Document INSTALL(EXPORT) and EXPORT() commands.
- Document IMPORTED signature of add_executable and add_library
- Enable finding of imported targets in cmComputeLinkDepends