summaryrefslogtreecommitdiff
path: root/math/lapack/patches/patch-BLAS_SRC_CMakeLists.txt
blob: 206893b78879d9c9036704dfa8a000236cb4839a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-BLAS_SRC_CMakeLists.txt,v 1.1 2020/10/12 21:51:57 bacon Exp $

Support combined build of shared and static libraries.

--- BLAS/SRC/CMakeLists.txt.orig	2017-11-13 04:15:54.000000000 +0000
+++ BLAS/SRC/CMakeLists.txt
@@ -104,3 +104,11 @@ set_target_properties(
   SOVERSION ${LAPACK_MAJOR_VERSION}
   )
 lapack_install_library(blas)
+if(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS)
+  add_library(blas_static STATIC ${SOURCES})
+  set_target_properties(
+    blas_static PROPERTIES
+    OUTPUT_NAME blas
+    )
+  lapack_install_library(blas_static)
+endif()