Skip to content

Commit

Permalink
Merge pull request #6134 from joebonrichie/cmake-boog-empty-var
Browse files Browse the repository at this point in the history
PCLConfig.cmake.in: Handle potentially empty ${LIB} variable
  • Loading branch information
larshg authored Sep 19, 2024
2 parents d231dde + f13d576 commit 9f6b2dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PCLConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -302,17 +302,17 @@ function(find_external_library _component _lib _is_optional)

string(TOUPPER "${_component}" COMPONENT)
string(TOUPPER "${_lib}" LIB)
string(REGEX REPLACE "[.-]" "_" LIB ${LIB})
string(REGEX REPLACE "[.-]" "_" LIB "${LIB}")
if(${LIB}_FOUND)
list(APPEND PCL_${COMPONENT}_INCLUDE_DIRS ${${LIB}_INCLUDE_DIRS})
set(PCL_${COMPONENT}_INCLUDE_DIRS ${PCL_${COMPONENT}_INCLUDE_DIRS} PARENT_SCOPE)

if(${LIB} MATCHES "VTK")
if(${${LIB}_VERSION_MAJOR} GREATER_EQUAL 9)
set(ISVTK9ORGREATER TRUE)
endif()
endif()

if(${LIB}_USE_FILE AND NOT ISVTK9ORGREATER )
include(${${LIB}_USE_FILE})
else()
Expand Down

0 comments on commit 9f6b2dc

Please sign in to comment.