FindGTK2
FindGTK2.cmake
Этот модуль может найти библиотеки виджетов GTK2 и несколько его других необязательных компонентов, таких как gtkmm, glade и glademm.
ПРИМЕЧАНИЕ: Если вы планируете использовать проверку версий, требуется CMake 2.6.2 или более поздняя версия.
required.
Укажите один или несколько из следующих компонентов при вызове этого модуля поиска. См. пример ниже.
gtk gtkmm glade glademm
Следующие переменные будут определены для вашего использования
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_DEBUG - Enables verbose debugging of the module
GTK2_ADDITIONAL_SUFFIXES - Allows defining additional directories to
search for include files
================= Пример использования:
Call find_package() once, here are some examples to pick from:
Require GTK 2.6 or later
find_package(GTK2 2.6 REQUIRED gtk)
Require GTK 2.10 or later and Glade
find_package(GTK2 2.10 REQUIRED gtk glade)
Search for GTK/GTKMM 2.8 or later
find_package(GTK2 2.8 COMPONENTS gtk gtkmm)
if(GTK2_FOUND)
include_directories(${GTK2_INCLUDE_DIRS})
add_executable(mygui mygui.cc)
target_link_libraries(mygui ${GTK2_LIBRARIES})
endif()
© 2000–2019 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.11/module/FindGTK2.html