Commit a03d58c 1 parent e79932e commit a03d58c Copy full SHA for a03d58c
File tree 2 files changed +7
-12
lines changed
2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change 71
71
#===============================================================================
72
72
if (libmesh)
73
73
find_package (LIBMESH REQUIRED)
74
- set (LIBMESH_LIBRARIES mesh_devel timpi_devel netcdf)
75
- set (LIBMESH_INCLUDE_DIRS "${LIBMESH} /../include/" )
76
- link_directories (${LIBMESH} )
77
74
endif ()
78
75
79
76
#===============================================================================
@@ -377,6 +374,7 @@ target_include_directories(libopenmc
377
374
$<INSTALL_INTERFACE:include >
378
375
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include >
379
376
${HDF5_INCLUDE_DIRS}
377
+ ${LIBMESH_INCLUDE_DIRECTORIES}
380
378
)
381
379
382
380
# Set compile flags
@@ -415,9 +413,7 @@ if(dagmc)
415
413
endif ()
416
414
417
415
if (libmesh)
418
- target_compile_definitions (libopenmc PRIVATE LIBMESH)
419
416
target_link_libraries (libopenmc ${LIBMESH_LIBRARIES} )
420
- target_include_directories (libopenmc PRIVATE ${LIBMESH_INCLUDE_DIRS} )
421
417
endif ()
422
418
423
419
#===============================================================================
Original file line number Diff line number Diff line change 7
7
# LIBMESH_LIBRARIES - Link these to use LIBMESH
8
8
# LIBMESH_DEFINITIONS - Compiler switches required for using LIBMESH
9
9
10
- find_path (LIBMESH NAMES libmesh_opt.so
10
+ find_path (LIBMESH_PC NAMES libmesh-opt.pc
11
11
HINTS ${LIBMESH_ROOT} $ENV{LIBMESH_ROOT}
12
12
PATHS ENV LD_LIBRARY_PATH
13
- PATH_SUFFIXES lib Lib
13
+ PATH_SUFFIXES lib/pkgconfig pkgconfig
14
14
NO_DEFAULT_PATH)
15
15
16
- if ( DEFINED LIBMESH )
17
- set (LIBMESH_FOUND TRUE )
18
- endif ( )
16
+ include (FindPkgConfig )
17
+ set (ENV{PKG_CONFIG_PATH} " $ENV{PKG_CONFIG_PATH} : ${LIBMESH_PC} " )
18
+ pkg_check_modules(LIBMESH REQUIRED libmesh IMPORTED_TARGET )
19
19
20
-
21
- message (STATUS "Found LIBMESH in ${LIBMESH} " )
20
+ message (STATUS "Found LIBMESH in ${LIBMESH_PC} " )
You can’t perform that action at this time.
0 commit comments