Commit 0abf803 1 parent cb6c24b commit 0abf803 Copy full SHA for 0abf803
File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,16 @@ if(${CMAKE_VERSION} VERSION_LESS 3.12.0)
5
5
message (FATAL_ERROR "OpenMC builds with libMesh support require CMake version 3.12.0 or greater." )
6
6
endif ()
7
7
8
+ set (LIBMESH_PC_FILE libmesh)
9
+
10
+ # if the METHOD variable is present, check specifically for
11
+ # the libMesh .pc file for that build type
12
+ if (DEFINED ENV{METHOD})
13
+ set (LIBMESH_PC_FILE libmesh-$ENV{METHOD} )
14
+ message (STATUS "Using environment variable METHOD to determine libMesh build: ${LIBMESH_PC_FILE} " )
15
+ endif ()
16
+
8
17
include (FindPkgConfig)
9
18
set (ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH} :${LIBMESH_PC} " )
10
19
set (PKG_CONFIG_USE_CMAKE_PREFIX_PATH True )
11
- pkg_check_modules(LIBMESH REQUIRED libmesh>=1.6.0 IMPORTED_TARGET)
12
-
13
- find_path (LIBMESH_PC NAMES libmesh.pc
14
- HINTS ${LIBMESH_LIBDIR}
15
- PATHS ENV LD_LIBRARY_PATH
16
- PATH_SUFFIXES lib/pkgconfig pkgconfig
17
- NO_DEFAULT_PATH)
20
+ pkg_check_modules(LIBMESH REQUIRED ${LIBMESH_PC_FILE} >=1.6.0 IMPORTED_TARGET)
You can’t perform that action at this time.
0 commit comments