Commit b69720d9 authored by Daniele E. Domenichelli's avatar Daniele E. Domenichelli Committed by Brad King
Browse files

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.
parent 425ec408
...@@ -370,8 +370,10 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version) ...@@ -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}_LIBRARY ${GTK2_${_var}_LIBRARY} PARENT_SCOPE)
set(GTK2_${_var}_FOUND ${GTK2_${_var}_FOUND} PARENT_SCOPE) set(GTK2_${_var}_FOUND ${GTK2_${_var}_FOUND} PARENT_SCOPE)
set(GTK2_LIBRARIES ${GTK2_LIBRARIES} ${GTK2_${_var}_LIBRARY}) if(GTK2_${_var}_FOUND)
set(GTK2_LIBRARIES ${GTK2_LIBRARIES} PARENT_SCOPE) set(GTK2_LIBRARIES ${GTK2_LIBRARIES} ${GTK2_${_var}_LIBRARY})
set(GTK2_LIBRARIES ${GTK2_LIBRARIES} PARENT_SCOPE)
endif()
if(GTK2_DEBUG) if(GTK2_DEBUG)
message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment