message: cleanup find_package() config, add 'mpicommon' and 'maml' if built
diff: @@ -111,6 +111,7 @@ set(OSPRAY_COMPILER_MSVC @OSPRAY_COMPILER_MSVC@)
  set(OSPRAY_TASKING_TBB @OSPRAY_TASKING_TBB@)
  set(OSPRAY_ISPC_TARGET_LIST @OSPRAY_ISPC_TARGET_LIST@)
  +set(OSPRAY_MPI_ENABLED @OSPRAY_MODULE_MPI@)
  ###############################################################################
  # ospray dependencies
  @@ -163,45 +164,25 @@ set(CURRENT_ROOT_INSTALL_DIR ${OSPRAY_CURRENT_ROOT_INSTALL_DIR})
  ###############################################################################
  # Finish ospray
  -# Import exported ospray targets
  -# NOTE(jda) - Order matters below: targets which depend on other targets need to
  -# be after the INCLUDE() of the targets they depend upon.
  -# NOTE(jda) - Targets have been disabled now that we use Embree's root CMake
  -# list to configure and build Embree. When Embree exports targets,
  -# using them here should be re-enabled.
  -#IF(NOT TARGET ospray AND NOT OSPRAY_BINARY_DIR)
  -# INCLUDE(${CURRENT_CONFIG_INSTALL_DIR}/libsysTargets.cmake)
  -# INCLUDE(${CURRENT_CONFIG_INSTALL_DIR}/liblexersTargets.cmake)
  -# INCLUDE(${CURRENT_CONFIG_INSTALL_DIR}/libsimdTargets.cmake)
  -# IF (@OSPRAY_EMBREE_ENABLE_SSE@ OR @OSPRAY_EMBREE_ENABLE_AVX@ OR @OSPRAY_EMBREE_ENABLE_AVX2@)
  -# INCLUDE(${CURRENT_CONFIG_INSTALL_DIR}/libospray_embree_sse42Targets.cmake)
  -# ENDIF()
  -# IF (@OSPRAY_EMBREE_ENABLE_AVX@ OR @OSPRAY_EMBREE_ENABLE_AVX2@)
  -# INCLUDE(${CURRENT_CONFIG_INSTALL_DIR}/libospray_embree_avxTargets.cmake)
  -# ENDIF()
  -# IF (@OSPRAY_EMBREE_ENABLE_AVX2@)
  -# INCLUDE(${CURRENT_CONFIG_INSTALL_DIR}/libospray_embree_avx2Targets.cmake)
  -# ENDIF()
  -# IF (@OSPRAY_EMBREE_ENABLE_AVX512@)
  -# INCLUDE(${CURRENT_CONFIG_INSTALL_DIR}/libospray_embree_avx512Targets.cmake)
  -# ENDIF()
  -# INCLUDE(${CURRENT_CONFIG_INSTALL_DIR}/libospray_embreeTargets.cmake)
  -# INCLUDE(${CURRENT_CONFIG_INSTALL_DIR}/libosprayTargets.cmake)
  -#endif(NOT TARGET ospray AND NOT OSPRAY_BINARY_DIR)
  -
  # Remove duplicate entries from OSPRAY_INCLUDE_DIRS
  list(REMOVE_DUPLICATES OSPRAY_INCLUDE_DIRS)
  # Set expected OSPRAY_LIBRARIES variable for FindPackage().
  set(OSPRAY_LIBRARIES
  ${OSPRAY_DEPENDENCIES}
  - #ospray# NOTE(jda) - target disabled (see above)
  - #ospray_embree# NOTE(jda) - target disabled (see above)
  ${EMBREE_LIBRARY}
  ${LIBRARY_PATH_PREFIX}ospray${LIBRARY_SUFFIX}
  ${LIBRARY_PATH_PREFIX}ospray_common${LIBRARY_SUFFIX}
  )
  +if(OSPRAY_MPI_ENABLED)
  + set(OSPRAY_LIBRARIES
  + ${OSPRAY_LIBRARIES}
  + ${LIBRARY_PATH_PREFIX}ospray_mpi_common${LIBRARY_SUFFIX}
  + ${LIBRARY_PATH_PREFIX}ospray_mpi_maml${LIBRARY_SUFFIX}
  + )
  +endif()
  +
  # Reset CMake module path to its state when this script was called.
  set(CMAKE_MODULE_PATH ${OSPRAY_CALLERS_CMAKE_MODULE_PATH})
  