mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Updating build style for libmesh.
This commit is contained in:
parent
e79932e442
commit
a03d58cb59
2 changed files with 7 additions and 12 deletions
|
|
@ -71,9 +71,6 @@ else()
|
|||
#===============================================================================
|
||||
if(libmesh)
|
||||
find_package(LIBMESH REQUIRED)
|
||||
set(LIBMESH_LIBRARIES mesh_devel timpi_devel netcdf)
|
||||
set(LIBMESH_INCLUDE_DIRS "${LIBMESH}/../include/")
|
||||
link_directories(${LIBMESH})
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
||||
|
|
@ -377,6 +374,7 @@ target_include_directories(libopenmc
|
|||
$<INSTALL_INTERFACE:include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
${HDF5_INCLUDE_DIRS}
|
||||
${LIBMESH_INCLUDE_DIRECTORIES}
|
||||
)
|
||||
|
||||
# Set compile flags
|
||||
|
|
@ -415,9 +413,7 @@ if(dagmc)
|
|||
endif()
|
||||
|
||||
if(libmesh)
|
||||
target_compile_definitions(libopenmc PRIVATE LIBMESH)
|
||||
target_link_libraries(libopenmc ${LIBMESH_LIBRARIES})
|
||||
target_include_directories(libopenmc PRIVATE ${LIBMESH_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
||||
|
|
|
|||
|
|
@ -7,15 +7,14 @@
|
|||
# LIBMESH_LIBRARIES - Link these to use LIBMESH
|
||||
# LIBMESH_DEFINITIONS - Compiler switches required for using LIBMESH
|
||||
|
||||
find_path(LIBMESH NAMES libmesh_opt.so
|
||||
find_path(LIBMESH_PC NAMES libmesh-opt.pc
|
||||
HINTS ${LIBMESH_ROOT} $ENV{LIBMESH_ROOT}
|
||||
PATHS ENV LD_LIBRARY_PATH
|
||||
PATH_SUFFIXES lib Lib
|
||||
PATH_SUFFIXES lib/pkgconfig pkgconfig
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
if(DEFINED LIBMESH)
|
||||
set(LIBMESH_FOUND TRUE)
|
||||
endif()
|
||||
include(FindPkgConfig)
|
||||
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${LIBMESH_PC}")
|
||||
pkg_check_modules(LIBMESH REQUIRED libmesh IMPORTED_TARGET)
|
||||
|
||||
|
||||
message(STATUS "Found LIBMESH in ${LIBMESH}")
|
||||
message(STATUS "Found LIBMESH in ${LIBMESH_PC}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue