When more than one value is given to the NAMES option this command by
default will consider one name at a time and search every directory for
it. Add a NAMES_PER_DIR option to tell this command to consider one
directory at a time and search for all names in it.
In cmFindLibraryCommand::FindFrameworkLibrary drop use of the old
SystemTools::FindDirectory method. Replace it with a direct
implementation of the only code path we used.
Teach cmFindLibraryHelper to support multiple possible names and iterate
over all of them in each CheckDirectory call. For now we still only
ever configure one name.
When a search path contains multiple "lib/" instances we previously
converted all or none. This fails for cases where only some of the
multiple instances must be converted. Teach AddArchitecturePaths to
generate all combinations that exist. Uncomment these cases in the
CMakeOnly.find_library test now that they work.
Simplify cmFindLibraryCommand::AddArchitecturePaths logic to avoid
recording a separate 'found' status and populating an entire
vector<string> just to throw it away.
Previously methods AddArchitecturePaths and AddLib64Paths were almost
identical. Replace the latter with a call to the former. Fix the
AddArchitecturePaths implementation to add trailing slashes to all
tested paths.
This did not work because find_library() did only treat the given name as
complete filename if is matched "PREFIX.*SUFFIX":
find_library(MYLIB libfoo.so.2)
Now it is also taken as a whole if the name matches "PREFIX.*SUFFIX\..*".
Do not require the C language to be enabled to do lib->lib64 conversion.
The check was originally added by commit a5825cd1 (check in new find
stuff, 2006-03-02) to ensure that CMAKE_SIZEOF_VOID_P is set. Since
commit 3fdf1411 (FIND_LIBRARY should not require CMAKE_SIZEOF_VOID_P,
2008-02-11) the code following the check does not fail when the variable
is not set, so just remove the original check. This allows conversion
for any language that is enabled so long as the address size is known.
Reported-by: Christoph Höger <choeger@cs.tu-berlin.de>
Implement support for multiarch as specified here:
http://wiki.debian.org/Multiarchhttps://wiki.ubuntu.com/MultiarchSpec
Detect the <arch> part of <prefix>/lib/<arch> from the implicit library
search path from each compiler to set CMAKE_<lang>_LIBRARY_ARCHITECTURE.
Define CMAKE_LIBRARY_ARCHITECTURE using one of these values (they should
all be the same). Teach the find_library and find_package commands to
search <prefix>/lib/<arch> whenever they would search <prefix>/lib.
Delay computation of the command documentation until it is needed.
It is wasteful to do it in the constructor on every call.
Inspired-By: Christian Ehrlicher <Ch.Ehrlicher@gmx.de>
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.
Automatic generation of 64-bit library search paths must preserve
trailing slashes. This fixes a failure case exposed by the recent
rewrite of find_library, which assumes trailing slashes occur on all
search paths.
OpenBSD shared libraries use a ".so.<major>.<minor>" extension and do
not have a symlink with just a ".so" extension. Its "ld" is capable of
finding the library with the best version. This change adds support for
finding such libraries. See issue #3470.
Previously we searched for library files by enumerating every possible
combination of prefix and suffix. Now we load (and cache) directory
content from disk and search for matching file names. This should
reduce disk access. It will also allow more advanced matching rules in
the future. See issue #3470.
- CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE are supposed to specify
whether to find frameworks/appbundles FIRST, LAST, ONLY, or NEVER.
- Previously this affected only the placement of CMAKE_FRAMEWORK_PATH
and CMAKE_APPBUNDLE_PATH with respect to the other path specifiers.
- Now it behaves as documented. The entire search path is inspected for
each kind of program, library, or header before trying the next kind.
- Additionally the ONLY mode is now honored for headers so that users
do not end up with a library in framework and a header from elsewhere.
- Use CMAKE_PREFIX_PATH and CMAKE_SYSTEM_PREFIX_PATH among other means
to locate package configuration files.
- Create cmFindCommon as base for cmFindBase and cmFindPackageCommand
- Move common functionality up to cmFindCommon
- Improve documentation of FIND_* commands.
- Fix FIND_* commands to not add framework/app paths in wrong place.
CMAKE_FIND_PREFIX_PATH is both an environment variable and a cmake variable,
which is a list of base directories where FIND_PATH, FIND_FILE, FIND_PROGRAM
and FIND_LIBRARY will search in the respective subdirectories
Alex
write generators for IDE projects, which use already existing makefiles
(current the kdevelop generator)
-first stept of the export interface, iniitial export() command
-more replacements for the FIND_XXX docs
Alex