summarylogtreecommitdiffstats
path: root/0003-fix-superlu-target.patch
blob: 5876deb870654e44d1395e0af4056b93fd89ffa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/palace/CMakeLists.txt b/palace/CMakeLists.txt
index 2a3ffa391..7ee1720f9 100644
--- a/palace/CMakeLists.txt
+++ b/palace/CMakeLists.txt
@@ -520,6 +520,14 @@ if(ZLIB_FOUND)
   target_link_libraries(${LIB_TARGET_NAME} PUBLIC ZLIB::ZLIB)
 endif()
 
+# HYPRE depends on superlu:superlu target,
+# we need to find it using pkg-config
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(SUPERLU REQUIRED superlu)
+add_library(superlu::superlu INTERFACE IMPORTED)
+target_link_libraries(superlu::superlu INTERFACE ${SUPERLU_LIBRARIES})
+target_include_directories(superlu::superlu INTERFACE ${SUPERLU_INCLUDE_DIRS})
+
 # Link HYPRE
 find_package(HYPRE QUIET)
 if(TARGET HYPRE::HYPRE)