summaryrefslogtreecommitdiff
path: root/Modules/FindGTK2.cmake
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <daniele.domenichelli@iit.it>2013-08-09 10:46:10 +0200
committerBrad King <brad.king@kitware.com>2013-10-08 10:30:11 -0400
commit4b876de9745dc147490eb5346aa8a6ed5391a7a5 (patch)
tree9cd08c04fb0778abaa73c2333ec7fe5f290cde4e /Modules/FindGTK2.cmake
parent67e761fabcc3010f55eb2e508c62e2bad9c57fb3 (diff)
downloadcmake-4b876de9745dc147490eb5346aa8a6ed5391a7a5.tar.gz
FindGTK2: Link freetype libs to targets including freetype includes
Diffstat (limited to 'Modules/FindGTK2.cmake')
-rw-r--r--Modules/FindGTK2.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index 2fe5547657..fdd48b0a2b 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -478,6 +478,22 @@ function(_GTK2_ADD_TARGET_INCLUDE_DIRS _var)
endif()
endfunction()
+function(_GTK2_ADD_TARGET_LIBRARIES _var)
+ if(GTK2_DEBUG)
+ message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
+ "_GTK2_ADD_TARGET_LIBRARIES( ${_var} )")
+ endif()
+
+ string(TOLOWER "${_var}" _basename)
+
+ if(TARGET GTK2::${_basename})
+ set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${ARGN}")
+ foreach(_library ${ARGN})
+ set_property(TARGET GTK2::${_basename} APPEND PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_$ "${_library}")
+ endforeach()
+ endif()
+endfunction()
+
#=============================================================
#
@@ -638,6 +654,7 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
_GTK2_ADD_TARGET_DEPENDS(GMODULE glib)
_GTK2_ADD_TARGET_DEPENDS(GDK_PIXBUF gobject glib)
_GTK2_ADD_TARGET_INCLUDE_DIRS(CAIRO ${FREETYPE_INCLUDE_DIRS} ${GTK2_FONTCONFIG_INCLUDE_DIRS})
+ _GTK2_ADD_TARGET_LIBRARIES(CAIRO ${FREETYPE_LIBRARIES})
_GTK2_ADD_TARGET_DEPENDS(PANGO gobject glib)
_GTK2_ADD_TARGET_DEPENDS(PANGOCAIRO pango cairo gobject glib)
_GTK2_ADD_TARGET_DEPENDS(GDK pangocairo pango cairo gdk_pixbuf gobject glib)
@@ -691,8 +708,10 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
_GTK2_ADD_TARGET_DEPENDS(PANGOMM glibmm cairomm pangocairo sigc++ pango cairo gobject glib)
_GTK2_ADD_TARGET_DEPENDS(GDKMM giomm pangomm gtk glibmm cairomm sigc++ gdk atk gio pangoft2 pangocairo gdk_pixbuf cairo pango gobject glib)
_GTK2_ADD_TARGET_INCLUDE_DIRS(GDKMM ${FREETYPE_INCLUDE_DIRS} ${GTK2_FONTCONFIG_INCLUDE_DIRS})
+ _GTK2_ADD_TARGET_LIBRARIES(GDKMM ${FREETYPE_LIBRARIES})
_GTK2_ADD_TARGET_DEPENDS(GTKMM atkmm gdkmm giomm pangomm gtk glibmm cairomm sigc++ gdk atk gio pangoft2 pangocairo gdk_pixbuf cairo pango gthread gobject glib)
_GTK2_ADD_TARGET_INCLUDE_DIRS(GTKMM ${FREETYPE_INCLUDE_DIRS} ${GTK2_FONTCONFIG_INCLUDE_DIRS})
+ _GTK2_ADD_TARGET_LIBRARIES(GTKMM ${FREETYPE_LIBRARIES})
elseif(_GTK2_component STREQUAL "glade")
@@ -701,6 +720,7 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
_GTK2_ADJUST_LIB_VARS (GLADE)
_GTK2_ADD_TARGET_DEPENDS(GLADE gtk gdk atk gio pangoft2 pangocairo gdk_pixbuf cairo pango gobject glib)
_GTK2_ADD_TARGET_INCLUDE_DIRS(GLADE ${FREETYPE_INCLUDE_DIRS} ${GTK2_FONTCONFIG_INCLUDE_DIRS})
+ _GTK2_ADD_TARGET_LIBRARIES(GLADE ${FREETYPE_LIBRARIES})
elseif(_GTK2_component STREQUAL "glademm")
@@ -710,6 +730,7 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
_GTK2_ADJUST_LIB_VARS (GLADEMM)
_GTK2_ADD_TARGET_DEPENDS(GLADEMM gtkmm glade atkmm gdkmm giomm pangomm glibmm cairomm sigc++ gtk gdk atk gio pangoft pangocairo gdk_pixbuf cairo pango gthread gobject glib)
_GTK2_ADD_TARGET_INCLUDE_DIRS(GLADEMM ${FREETYPE_INCLUDE_DIRS} ${GTK2_FONTCONFIG_INCLUDE_DIRS})
+ _GTK2_ADD_TARGET_LIBRARIES(GLADEMM ${FREETYPE_LIBRARIES})
else()
message(FATAL_ERROR "Unknown GTK2 component ${_component}")