Skip to content

Commit

Permalink
FindHelper.cmake small cleanup
Browse files Browse the repository at this point in the history
 - silence Policy CMP0054 warning
 - <XPREFIX>_INCLUDE_DIRS   ... the '-I' preprocessor flags (w/o the '-I')
 - coding style
  • Loading branch information
jeremyz committed Sep 19, 2017
1 parent aa01e64 commit 1bab373
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/FindHelper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 1bab373

Please sign in to comment.