diff options
author | Brad King <brad.king@kitware.com> | 2020-01-21 17:05:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-01-21 17:05:45 (GMT) |
commit | 763beb5944faca1e4e9c08d37c817e0830d6ea49 (patch) | |
tree | 4b8a2f605f93e57ae3adf1df4c0871fc58978d42 /Modules/FindGTK2.cmake | |
parent | ba93119ac38fac2f2ee72e4db8c4f52fb452ca3c (diff) | |
download | CMake-763beb5944faca1e4e9c08d37c817e0830d6ea49.zip CMake-763beb5944faca1e4e9c08d37c817e0830d6ea49.tar.gz CMake-763beb5944faca1e4e9c08d37c817e0830d6ea49.tar.bz2 |
FindGTK2: Fix documentation formatting
Fixes: #20223
Diffstat (limited to 'Modules/FindGTK2.cmake')
-rw-r--r-- | Modules/FindGTK2.cmake | 117 |
1 files changed, 52 insertions, 65 deletions
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake index 9117321..565763d 100644 --- a/Modules/FindGTK2.cmake +++ b/Modules/FindGTK2.cmake @@ -5,96 +5,83 @@ FindGTK2 -------- -Find the GTK2 widget libraries and several of its -other optional components like ``gtkmm``, ``glade``, and ``glademm``. - -NOTE: If you intend to use version checking, CMake 2.6.2 or later is - -:: - - required. - - +Find the GTK2 widget libraries and several of its other optional components +like ``gtkmm``, ``glade``, and ``glademm``. Specify one or more of the following components as you call this find module. See example below. -:: - - gtk - gtkmm - glade - glademm - +* ``gtk`` +* ``gtkmm`` +* ``glade`` +* ``glademm`` +Result Variables +^^^^^^^^^^^^^^^^ The following variables will be defined for your use -:: - - GTK2_FOUND - Were all of your specified components found? - GTK2_INCLUDE_DIRS - All include directories - GTK2_LIBRARIES - All libraries - GTK2_TARGETS - All imported targets - GTK2_DEFINITIONS - Additional compiler flags - - - -:: - - GTK2_VERSION - The version of GTK2 found (x.y.z) - GTK2_MAJOR_VERSION - The major version of GTK2 - GTK2_MINOR_VERSION - The minor version of GTK2 - GTK2_PATCH_VERSION - The patch version of GTK2 - - +``GTK2_FOUND`` + Were all of your specified components found? +``GTK2_INCLUDE_DIRS`` + All include directories +``GTK2_LIBRARIES`` + All libraries +``GTK2_TARGETS`` + All imported targets +``GTK2_DEFINITIONS`` + Additional compiler flags +``GTK2_VERSION`` + The version of GTK2 found (x.y.z) +``GTK2_MAJOR_VERSION`` + The major version of GTK2 +``GTK2_MINOR_VERSION`` + The minor version of GTK2 +``GTK2_PATCH_VERSION`` + The patch version of GTK2 + +Input Variables +^^^^^^^^^^^^^^^ Optional variables you can define prior to calling this module: -:: - - GTK2_DEBUG - Enables verbose debugging of the module - GTK2_ADDITIONAL_SUFFIXES - Allows defining additional directories to - search for include files - - - -================= Example Usage: - -:: - - Call find_package() once, here are some examples to pick from: - - +``GTK2_DEBUG`` + Enables verbose debugging of the module +``GTK2_ADDITIONAL_SUFFIXES`` + Allows defining additional directories to search for include files -:: +Example Usage +^^^^^^^^^^^^^ - Require GTK 2.6 or later - find_package(GTK2 2.6 REQUIRED gtk) +Call :command:`find_package` once. Here are some examples to pick from: +Require GTK 2.6 or later: +.. code-block:: cmake -:: + find_package(GTK2 2.6 REQUIRED gtk) - Require GTK 2.10 or later and Glade - find_package(GTK2 2.10 REQUIRED gtk glade) +Require GTK 2.10 or later and Glade: +.. code-block:: cmake + find_package(GTK2 2.10 REQUIRED gtk glade) -:: +Search for GTK/GTKMM 2.8 or later: - Search for GTK/GTKMM 2.8 or later - find_package(GTK2 2.8 COMPONENTS gtk gtkmm) +.. code-block:: cmake + find_package(GTK2 2.8 COMPONENTS gtk gtkmm) +Use the results: -:: +.. code-block:: cmake - if(GTK2_FOUND) - include_directories(${GTK2_INCLUDE_DIRS}) - add_executable(mygui mygui.cc) - target_link_libraries(mygui ${GTK2_LIBRARIES}) - endif() + if(GTK2_FOUND) + include_directories(${GTK2_INCLUDE_DIRS}) + add_executable(mygui mygui.cc) + target_link_libraries(mygui ${GTK2_LIBRARIES}) + endif() #]=======================================================================] # Version 1.6 (CMake 3.0) |