void-packages/srcpkgs/lapack/patches/cmake-make-both-static-shar...

78 lines
2.9 KiB
Diff

--- BLAS/SRC/CMakeLists.txt.orig 2016-12-24 00:01:32.000000000 +0100
+++ BLAS/SRC/CMakeLists.txt 2017-01-26 18:25:14.716987207 +0100
@@ -137,6 +137,7 @@
add_library(blas ${ALLOBJ})
+add_library(blas_static STATIC ${ALLOBJ})
#if(UNIX)
# target_link_libraries(blas m)
#endif()
@@ -145,5 +146,8 @@
VERSION ${LAPACK_VERSION}
SOVERSION ${LAPACK_MAJOR_VERSION}
)
+set_target_properties(blas_static PROPERTIES OUTPUT_NAME blas)
target_link_libraries(blas)
+target_link_libraries(blas_static)
lapack_install_library(blas)
+lapack_install_library(blas_static)
--- CBLAS/src/CMakeLists.txt.orig 2016-12-24 00:01:32.000000000 +0100
+++ CBLAS/src/CMakeLists.txt 2017-01-26 16:05:18.432375726 +0100
@@ -166,5 +166,9 @@
endif()
add_library(cblas ${ALLOBJ})
+add_library(cblas_static STATIC ${ALLOBJ})
+set_target_properties(cblas_static PROPERTIES OUTPUT_NAME cblas)
target_link_libraries(cblas ${BLAS_LIBRARIES})
+target_link_libraries(cblas_static ${BLAS_LIBRARIES})
lapack_install_library(cblas)
+lapack_install_library(cblas_static)
--- LAPACKE/CMakeLists.txt.orig 2016-12-24 00:01:32.000000000 +0100
+++ LAPACKE/CMakeLists.txt 2017-01-26 16:13:03.367980751 +0100
@@ -43,18 +43,26 @@
if(USE_XBLAS)
add_library(lapacke ${SRC_OBJ} ${SRCX_OBJ} ${UTILS_OBJ})
+ add_library(lapacke_static STATIC ${SRC_OBJ} ${SRCX_OBJ} ${UTILS_OBJ})
target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${XBLAS_LIBRARY})
+ target_link_libraries(lapacke_static ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${XBLAS_LIBRARY})
else()
if(LAPACKE_WITH_TMG)
add_library(lapacke ${SRC_OBJ} ${MATGEN_OBJ} ${UTILS_OBJ})
+ add_library(lapacke_static STATIC ${SRC_OBJ} ${MATGEN_OBJ} ${UTILS_OBJ})
target_link_libraries(lapacke tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+ target_link_libraries(lapacke_static tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
else()
add_library(lapacke ${SRC_OBJ} ${UTILS_OBJ})
+ add_library(lapacke_static STATIC ${SRC_OBJ} ${UTILS_OBJ})
target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+ target_link_libraries(lapacke_static ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
endif()
endif()
+set_target_properties(lapacke_static PROPERTIES OUTPUT_NAME lapacke)
lapack_install_library(lapacke)
+lapack_install_library(lapacke_static)
install(FILES ${LAPACKE_INCLUDE} ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h DESTINATION include)
if(BUILD_TESTING)
--- SRC/CMakeLists.txt.orig 2016-12-24 00:01:32.000000000 +0100
+++ SRC/CMakeLists.txt 2017-01-26 18:31:08.341883848 +0100
@@ -515,6 +515,7 @@
list(REMOVE_DUPLICATES ALLOBJ)
add_library(lapack ${ALLOBJ} ${ALLXOBJ})
+add_library(lapack_static STATIC ${ALLOBJ} ${ALLXOBJ})
target_link_libraries(lapack ${BLAS_LIBRARIES} ${XBLAS_LIBRARY})
set_target_properties(
@@ -523,4 +524,6 @@
SOVERSION ${LAPACK_MAJOR_VERSION}
)
+set_target_properties(lapack_static PROPERTIES OUTPUT_NAME lapack)
lapack_install_library(lapack)
+lapack_install_library(lapack_static)