Commit 6a095314 authored by Brad King's avatar Brad King Committed by Code Review
Browse files

Merge topic 'fix-find-external-3p' into master

a982cf46 Support third-party modules that use CamelCase
parents 63f3421f a982cf46
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment