summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-11-13 15:46:33 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-11-13 15:46:54 (GMT)
commit9fee70422783af120bdaeff62ba77a71226f611d (patch)
treefeb7f396c05120fb72385eeb5d270ce408711c72
parentfb93f7f23022254ca8a6c67a2abb39484176b803 (diff)
parentfe15a1029cc02ce67f8f050763aca444641510b2 (diff)
downloadCMake-9fee70422783af120bdaeff62ba77a71226f611d.zip
CMake-9fee70422783af120bdaeff62ba77a71226f611d.tar.gz
CMake-9fee70422783af120bdaeff62ba77a71226f611d.tar.bz2
Merge topic 'SelectLibraryConfigurations'
fe15a1029c Help: Revise documentation of SelectLibraryConfigurations Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2608
-rw-r--r--Modules/SelectLibraryConfigurations.cmake40
1 files changed, 24 insertions, 16 deletions
diff --git a/Modules/SelectLibraryConfigurations.cmake b/Modules/SelectLibraryConfigurations.cmake
index 8cb714d..4c0e9a8 100644
--- a/Modules/SelectLibraryConfigurations.cmake
+++ b/Modules/SelectLibraryConfigurations.cmake
@@ -5,33 +5,41 @@
SelectLibraryConfigurations
---------------------------
+.. code-block:: cmake
-
-select_library_configurations( basename )
+ select_library_configurations(basename)
This macro takes a library base name as an argument, and will choose
-good values for basename_LIBRARY, basename_LIBRARIES,
-basename_LIBRARY_DEBUG, and basename_LIBRARY_RELEASE depending on what
-has been found and set. If only basename_LIBRARY_RELEASE is defined,
-basename_LIBRARY will be set to the release value, and
-basename_LIBRARY_DEBUG will be set to basename_LIBRARY_DEBUG-NOTFOUND.
-If only basename_LIBRARY_DEBUG is defined, then basename_LIBRARY will
-take the debug value, and basename_LIBRARY_RELEASE will be set to
-basename_LIBRARY_RELEASE-NOTFOUND.
+good values for the variables
+
+::
+
+ basename_LIBRARY
+ basename_LIBRARIES
+ basename_LIBRARY_DEBUG
+ basename_LIBRARY_RELEASE
+
+depending on what has been found and set.
+
+If only ``basename_LIBRARY_RELEASE`` is defined, ``basename_LIBRARY`` will
+be set to the release value, and ``basename_LIBRARY_DEBUG`` will be set
+to ``basename_LIBRARY_DEBUG-NOTFOUND``. If only ``basename_LIBRARY_DEBUG``
+is defined, then ``basename_LIBRARY`` will take the debug value, and
+``basename_LIBRARY_RELEASE`` will be set to ``basename_LIBRARY_RELEASE-NOTFOUND``.
-If the generator supports configuration types, then basename_LIBRARY
-and basename_LIBRARIES will be set with debug and optimized flags
+If the generator supports configuration types, then ``basename_LIBRARY``
+and ``basename_LIBRARIES`` will be set with debug and optimized flags
specifying the library to be used for the given configuration. If no
build type has been set or the generator in use does not support
-configuration types, then basename_LIBRARY and basename_LIBRARIES will
-take only the release value, or the debug value if the release one is
-not set.
+configuration types, then ``basename_LIBRARY`` and ``basename_LIBRARIES``
+will take only the release value, or the debug value if the release one
+is not set.
#]=======================================================================]
# This macro was adapted from the FindQt4 CMake module and is maintained by Will
# Dicharry <wdicharry@stellarscience.com>.
-macro( select_library_configurations basename )
+macro(select_library_configurations basename)
if(NOT ${basename}_LIBRARY_RELEASE)
set(${basename}_LIBRARY_RELEASE "${basename}_LIBRARY_RELEASE-NOTFOUND" CACHE FILEPATH "Path to a library.")
endif()