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.
This commit is contained in:
parent
425ec4080d
commit
b69720d9ad
|
@ -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)
|
||||||
|
|
||||||
|
if(GTK2_${_var}_FOUND)
|
||||||
set(GTK2_LIBRARIES ${GTK2_LIBRARIES} ${GTK2_${_var}_LIBRARY})
|
set(GTK2_LIBRARIES ${GTK2_LIBRARIES} ${GTK2_${_var}_LIBRARY})
|
||||||
set(GTK2_LIBRARIES ${GTK2_LIBRARIES} PARENT_SCOPE)
|
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}] "
|
||||||
|
|
Loading…
Reference in New Issue