summaryrefslogtreecommitdiffstats
path: root/Modules/FindGTK2.cmake
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <daniele.domenichelli@iit.it>2013-09-17 13:04:45 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-08 14:30:12 (GMT)
commitb69720d9ad08290d85eb2a71f9e7d194ad1755c8 (patch)
treef6efd9398a904abcdeffe014470e20d514dac603 /Modules/FindGTK2.cmake
parent425ec4080d6a01ef1d2b278666ea60c5627b543c (diff)
downloadCMake-b69720d9ad08290d85eb2a71f9e7d194ad1755c8.zip
CMake-b69720d9ad08290d85eb2a71f9e7d194ad1755c8.tar.gz
CMake-b69720d9ad08290d85eb2a71f9e7d194ad1755c8.tar.bz2
FindGTK2: Add libraries to the GTK2_LIBRARIES variable only when found
Some libraries (e.g. gio) are not necessary, and often not available with older GTK2 versions, therefore GTK_LIBRARIES should not contain GTK2_XXX-NOT_FOUND for these libraries.
Diffstat (limited to 'Modules/FindGTK2.cmake')
-rw-r--r--Modules/FindGTK2.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index 738e022..2020c06 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -370,8 +370,10 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version)
set(GTK2_${_var}_LIBRARY ${GTK2_${_var}_LIBRARY} PARENT_SCOPE)
set(GTK2_${_var}_FOUND ${GTK2_${_var}_FOUND} PARENT_SCOPE)
- set(GTK2_LIBRARIES ${GTK2_LIBRARIES} ${GTK2_${_var}_LIBRARY})
- set(GTK2_LIBRARIES ${GTK2_LIBRARIES} PARENT_SCOPE)
+ if(GTK2_${_var}_FOUND)
+ set(GTK2_LIBRARIES ${GTK2_LIBRARIES} ${GTK2_${_var}_LIBRARY})
+ set(GTK2_LIBRARIES ${GTK2_LIBRARIES} PARENT_SCOPE)
+ endif()
if(GTK2_DEBUG)
message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "