diff --git a/cmake/FindHelper.cmake b/cmake/FindHelper.cmake index b84b0a2a4..457a7a371 100644 --- a/cmake/FindHelper.cmake +++ b/cmake/FindHelper.cmake @@ -40,12 +40,12 @@ macro(FIND_HELPER prefix pkg_name header lib) ENV ${prefix}_PATH ) include(FindPackageHandleStandardArgs) - if (NOT "${prefix}_INCLUDE_DIRS") - set(${prefix}_INCLUDE_DIRS "-I/usr/include") + if ("${${prefix}_INCLUDE_DIRS}" STREQUAL "") + set(${prefix}_INCLUDE_DIRS "/usr/include") endif () FIND_PACKAGE_HANDLE_STANDARD_ARGS(${prefix} DEFAULT_MSG ${prefix}_LIBRARIES ${prefix}_INCLUDE_DIRS) if(NOT "${PC_${prefix}_INCLUDE_DIRS}" STREQUAL "") - SET(${prefix}_INCLUDE_DIRS "${${prefix}_INCLUDE_DIRS};${PC_${prefix}_INCLUDE_DIRS}") + set(${prefix}_INCLUDE_DIRS "${${prefix}_INCLUDE_DIRS};${PC_${prefix}_INCLUDE_DIRS}") endif() endif() endmacro()