From 4586afc6c5dabe8f192f2b5ca9312330a0d08e9c Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Mon, 29 Dec 2014 17:23:54 -0800 Subject: [PATCH] Fix for new version of cmake --- cmake/macros/IncludeDependencyIncludes.cmake | 11 +++++++---- cmake/macros/LinkHifiLibraries.cmake | 8 +++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/cmake/macros/IncludeDependencyIncludes.cmake b/cmake/macros/IncludeDependencyIncludes.cmake index a375404164..cc2e5ca121 100644 --- a/cmake/macros/IncludeDependencyIncludes.cmake +++ b/cmake/macros/IncludeDependencyIncludes.cmake @@ -15,8 +15,11 @@ macro(INCLUDE_DEPENDENCY_INCLUDES) # include those in our own target include_directories(SYSTEM ${${TARGET_NAME}_DEPENDENCY_INCLUDES}) - endif () - - # set the property on this target so it can be retreived by targets linking to us - set_target_properties(${TARGET_NAME} PROPERTIES DEPENDENCY_INCLUDES "${${TARGET_NAME}_DEPENDENCY_INCLUDES}") + + list(LENGTH ${TARGET_NAME}_DEPENDENCY_INCLUDES NUM_DEPENDENCY_INCLUDES) + if(NUM_DEPENDENCY_INCLUDES STRGREATER 0) + # set the property on this target so it can be retreived by targets linking to us + set_target_properties(${TARGET_NAME} PROPERTIES DEPENDENCY_INCLUDES "${${TARGET_NAME}_DEPENDENCY_INCLUDES}") + endif () + endif() endmacro(INCLUDE_DEPENDENCY_INCLUDES) \ No newline at end of file diff --git a/cmake/macros/LinkHifiLibraries.cmake b/cmake/macros/LinkHifiLibraries.cmake index 646b680f27..7d3aff0e78 100644 --- a/cmake/macros/LinkHifiLibraries.cmake +++ b/cmake/macros/LinkHifiLibraries.cmake @@ -27,7 +27,13 @@ macro(LINK_HIFI_LIBRARIES) # ask the library what its include dependencies are and link them get_target_property(LINKED_TARGET_DEPENDENCY_INCLUDES ${HIFI_LIBRARY} DEPENDENCY_INCLUDES) - list(APPEND ${TARGET_NAME}_DEPENDENCY_INCLUDES ${LINKED_TARGET_DEPENDENCY_INCLUDES}) + + if(LINKED_TARGET_DEPENDENCY_INCLUDES) + list(LENGTH LINKED_TARGET_DEPENDENCY_INCLUDES NUM_DEPENDENCY_INCLUDES) + if(NUM_DEPENDENCY_INCLUDES STRGREATER 0) + list(APPEND ${TARGET_NAME}_DEPENDENCY_INCLUDES ${LINKED_TARGET_DEPENDENCY_INCLUDES}) + endif() + endif() endforeach() endmacro(LINK_HIFI_LIBRARIES) \ No newline at end of file