Skip to content
Snippets Groups Projects
Commit a982cf46 authored by Matthew Woehlke's avatar Matthew Woehlke
Browse files

Support third-party modules that use CamelCase

Add logic to third-party 'module' support to also work with external
packages that use CamelCase for their package "standard" variables (i.e.
<name>_{FOUND,LIBRARIES,INCLUDE_DIRS}). In particular, ParaView requires
this to use external QtTesting.

Change-Id: I645d2374ec2503eac7d226ef948f6f4b01f8de01
parent 673e42df
Branches
Tags
No related merge requests found
......@@ -631,15 +631,21 @@ macro(vtk_module_third_party _pkg)
endif()
endif()
find_package(${_pkg} REQUIRED ${__extra_args})
if(NOT ${_upper}_FOUND)
if(NOT ${_upper}_FOUND AND NOT ${_pkg}_FOUND)
message(FATAL_ERROR "VTK_USE_SYSTEM_${_upper} is ON but ${_pkg} is not found!")
endif()
if(${_upper}_INCLUDE_DIRS)
if(${_pkg}_INCLUDE_DIRS)
set(vtk${_lower}_SYSTEM_INCLUDE_DIRS ${${_pkg}_INCLUDE_DIRS})
elseif(${_upper}_INCLUDE_DIRS)
set(vtk${_lower}_SYSTEM_INCLUDE_DIRS ${${_upper}_INCLUDE_DIRS})
else()
set(vtk${_lower}_SYSTEM_INCLUDE_DIRS ${${_upper}_INCLUDE_DIR})
endif()
set(vtk${_lower}_LIBRARIES "${${_upper}_LIBRARIES}")
if(${_pkg}_LIBRARIES)
set(vtk${_lower}_LIBRARIES "${${_pkg}_LIBRARIES}")
else()
set(vtk${_lower}_LIBRARIES "${${_upper}_LIBRARIES}")
endif()
set(vtk${_lower}_INCLUDE_DIRS "")
else()
if(_nolibs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment