CMake/Help/release/dev/find_package-dir-sort.rst
Pierluigi Taddei 31be918b0b find_package: Optionally sort globbed directories in a meaningful order
Add `CMAKE_FIND_PACKAGE_SORT_{ORDER,DIRECTION}` variables to specify
sort order and direction.

When multiple package with the same name have been found in the same
location sorting option can be used to force a specific version to be
loaded (e.g. libA_1.12.0 instead of libA_1.1.0).  Currently sorting by
NAME and by NATURAL order have been implemented.

Natural ordering makes use of the `strverscmp(3)` ordering.
2016-09-15 13:35:25 -04:00

14 lines
582 B
ReStructuredText

find_package-dir-sort
---------------------
* The :command:`find_package` command gained the possibility of
sorting compatible libraries by ``NAME`` or by ``NATURAL`` sorting by
setting the two new variables :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER`
and :variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION`.
* Variable :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` was added to control
the sorting mode of the :command:`find_package` command.
* Variable :variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION` was added to control
the sorting direction the :command:`find_package` command.