mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-21 14:35:27 -04:00
45 lines
1.3 KiB
CMake
45 lines
1.3 KiB
CMake
@PACKAGE_INIT@
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/OpenMCConfigVersion.cmake")
|
|
include(CMakeFindDependencyMacro)
|
|
|
|
# Explicitly calculate prefix if it was not generated above
|
|
if(NOT DEFINED PACKAGE_PREFIX_DIR)
|
|
get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../.." ABSOLUTE)
|
|
endif()
|
|
|
|
find_dependency(fmt CONFIG REQUIRED HINTS ${PACKAGE_PREFIX_DIR})
|
|
find_dependency(pugixml CONFIG REQUIRED HINTS ${PACKAGE_PREFIX_DIR})
|
|
|
|
if(@OPENMC_USE_DAGMC@)
|
|
find_dependency(DAGMC REQUIRED HINTS @DAGMC_DIR@)
|
|
endif()
|
|
|
|
if(@OPENMC_USE_LIBMESH@)
|
|
include(FindPkgConfig)
|
|
list(APPEND CMAKE_PREFIX_PATH @LIBMESH_PREFIX@)
|
|
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH True)
|
|
pkg_check_modules(LIBMESH REQUIRED @LIBMESH_PC_FILE@>=1.7.0 IMPORTED_TARGET)
|
|
endif()
|
|
|
|
if("@PNG_FOUND@")
|
|
find_dependency(PNG)
|
|
endif()
|
|
|
|
if(@OPENMC_USE_MPI@)
|
|
find_dependency(MPI REQUIRED)
|
|
endif()
|
|
|
|
if(@OPENMC_USE_OPENMP@)
|
|
find_dependency(OpenMP REQUIRED)
|
|
endif()
|
|
|
|
if(@OPENMC_USE_UWUW@ AND NOT ${DAGMC_BUILD_UWUW})
|
|
message(FATAL_ERROR "UWUW is enabled in OpenMC but the DAGMC installation discovered was not configured with UWUW.")
|
|
endif()
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/OpenMCTargets.cmake")
|
|
|
|
if(NOT OpenMC_FIND_QUIETLY)
|
|
message(STATUS "Found OpenMC: ${PACKAGE_VERSION} (found in ${PACKAGE_PREFIX_DIR})")
|
|
endif()
|