void-packages/srcpkgs/lapack/patches/cmake-make-both-static-shared.patch
2017-06-29 02:29:29 +02:00

100 lines
3 KiB
Diff

--- BLAS/SRC/CMakeLists.txt.orig 2017-06-18 00:46:53.000000000 +0200
+++ BLAS/SRC/CMakeLists.txt 2017-06-28 13:04:20.081282712 +0200
@@ -98,9 +98,15 @@
list(REMOVE_DUPLICATES SOURCES)
add_library(blas ${SOURCES})
+add_library(blas_static STATIC ${SOURCES})
set_target_properties(
blas PROPERTIES
VERSION ${LAPACK_VERSION}
SOVERSION ${LAPACK_MAJOR_VERSION}
)
+set_target_properties(
+ blas_static PROPERTIES
+ OUTPUT_NAME blas
+ )
lapack_install_library(blas)
+lapack_install_library(blas_static)
--- CBLAS/src/CMakeLists.txt.orig 2017-06-18 00:46:53.000000000 +0200
+++ CBLAS/src/CMakeLists.txt 2017-06-28 13:16:16.072974557 +0200
@@ -114,11 +114,18 @@
list(REMOVE_DUPLICATES SOURCES)
add_library(cblas ${SOURCES})
+add_library(cblas_static STATIC ${SOURCES})
set_target_properties(
cblas PROPERTIES
LINKER_LANGUAGE C
VERSION ${LAPACK_VERSION}
SOVERSION ${LAPACK_MAJOR_VERSION}
)
+set_target_properties(
+ cblas_static PROPERTIES
+ OUTPUT_NAME cblas
+ )
target_link_libraries(cblas PRIVATE ${BLAS_LIBRARIES})
+target_link_libraries(cblas_static PRIVATE ${BLAS_LIBRARIES})
lapack_install_library(cblas)
+lapack_install_library(cblas_static)
--- LAPACKE/CMakeLists.txt.orig 2017-06-18 00:46:53.000000000 +0200
+++ LAPACKE/CMakeLists.txt 2017-06-28 13:20:33.292989852 +0200
@@ -54,19 +54,27 @@
list(APPEND SOURCES ${UTILS})
add_library(lapacke ${SOURCES})
+add_library(lapacke_static STATIC ${SOURCES})
set_target_properties(
lapacke PROPERTIES
LINKER_LANGUAGE C
VERSION ${LAPACK_VERSION}
SOVERSION ${LAPACK_MAJOR_VERSION}
)
+set_target_properties(
+ lapacke_static PROPERTIES
+ OUTPUT_NAME lapacke
+ )
if(LAPACKE_WITH_TMG)
target_link_libraries(lapacke PRIVATE tmglib)
+ target_link_libraries(lapacke_static PRIVATE tmglib)
endif()
target_link_libraries(lapacke PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(lapacke_static PRIVATE ${LAPACK_LIBRARIES})
lapack_install_library(lapacke)
+lapack_install_library(lapacke_static)
install(FILES ${LAPACKE_INCLUDE} ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
if(BUILD_TESTING)
--- SRC/CMakeLists.txt.orig 2017-06-18 00:46:53.000000000 +0200
+++ SRC/CMakeLists.txt 2017-06-28 13:24:03.571549842 +0200
@@ -487,16 +487,23 @@
list(REMOVE_DUPLICATES SOURCES)
add_library(lapack ${SOURCES})
+add_library(lapack_static STATIC ${SOURCES})
set_target_properties(
lapack PROPERTIES
VERSION ${LAPACK_VERSION}
SOVERSION ${LAPACK_MAJOR_VERSION}
)
+set_target_properties(
+ lapack_static PROPERTIES
+ OUTPUT_NAME lapack
+ )
if(USE_XBLAS)
target_link_libraries(lapack PRIVATE ${XBLAS_LIBRARY})
+ target_link_libraries(lapack_static PRIVATE ${XBLAS_LIBRARY})
endif()
target_link_libraries(lapack PRIVATE ${BLAS_LIBRARIES})
+target_link_libraries(lapack_static PRIVATE ${BLAS_LIBRARIES})
if (${CMAKE_BUILD_TYPE_UPPER} STREQUAL "COVERAGE")
target_link_libraries(lapack PRIVATE gcov)
@@ -504,3 +511,4 @@
endif()
lapack_install_library(lapack)
+lapack_install_library(lapack_static)