FindGTK2: Set INTERFACE_COMPILE_DEFINITIONS target property only if not empty

This commit is contained in:
Daniele E. Domenichelli 2013-08-14 10:46:42 +02:00 committed by Brad King
parent 4b47586a08
commit 56a79e1f8c
1 changed files with 3 additions and 1 deletions

View File

@ -418,7 +418,9 @@ function(_GTK2_ADJUST_LIB_VARS _var)
set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${GTK2_${_var}CONFIG_INCLUDE_DIR}") set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${GTK2_${_var}CONFIG_INCLUDE_DIR}")
endif() endif()
if(GTK2_DEFINITIONS)
set_property(TARGET GTK2::${_basename} PROPERTY INTERFACE_COMPILE_DEFINITIONS "${GTK2_DEFINITIONS}") set_property(TARGET GTK2::${_basename} PROPERTY INTERFACE_COMPILE_DEFINITIONS "${GTK2_DEFINITIONS}")
endif()
if(GTK2_USE_IMPORTED_TARGETS) if(GTK2_USE_IMPORTED_TARGETS)
set(GTK2_${_var}_LIBRARY GTK2::${_basename} PARENT_SCOPE) set(GTK2_${_var}_LIBRARY GTK2::${_basename} PARENT_SCOPE)