File tree Expand file tree Collapse file tree 4 files changed +26
-16
lines changed Expand file tree Collapse file tree 4 files changed +26
-16
lines changed Original file line number Diff line number Diff line change @@ -227,3 +227,12 @@ install (FILES ${INCLUDE_FILES} DESTINATION include)
227
227
if (NOT MSVC )
228
228
install (TARGETS ${OpenBLAS_LIBNAME} _static DESTINATION lib )
229
229
endif ()
230
+
231
+ include (FindPkgConfig QUIET )
232
+ if (PKG_CONFIG_FOUND )
233
+ set (prefix ${CMAKE_INSTALL_PREFIX} )
234
+ set (libdir ${CMAKE_INSTALL_PREFIX} /lib )
235
+ set (includedir ${CMAKE_INSTALL_PREFIX} /include )
236
+ configure_file (${PROJECT_SOURCE_DIR} /cmake/openblas.pc.in ${PROJECT_BINARY_DIR} /openblas.pc @ONLY )
237
+ install (FILES ${PROJECT_BINARY_DIR} /openblas.pc DESTINATION lib/pkgconfig/ )
238
+ endif ()
Original file line number Diff line number Diff line change @@ -98,23 +98,14 @@ endif
98
98
endif
99
99
100
100
101
- #Generating blas .pc
102
- @echo Generating blas .pc in $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)
103
- @echo 'libdir='$(OPENBLAS_LIBRARY_DIR) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/blas .pc
104
- @echo 'includedir='$(OPENBLAS_INCLUDE_DIR) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/blas .pc
105
- @echo 'version='$(VERSION) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/blas .pc
106
- @echo 'extralib='$(EXTRALIB) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/blas .pc
107
- @cat blas .pc.in >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/blas .pc
101
+ #Generating openblas .pc
102
+ @echo Generating openblas .pc in $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)
103
+ @echo 'libdir='$(OPENBLAS_LIBRARY_DIR) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas .pc
104
+ @echo 'includedir='$(OPENBLAS_INCLUDE_DIR) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas .pc
105
+ @echo 'version='$(VERSION) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas .pc
106
+ @echo 'extralib='$(EXTRALIB) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas .pc
107
+ @cat openblas .pc.in >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas .pc
108
108
109
- ifndef NO_CBLAS
110
- @echo Generating cblas.pc in $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)
111
- @cp $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/blas.pc $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/cblas.pc
112
- endif
113
-
114
- ifndef NO_LAPACKE
115
- @echo Generating lapack.pc in $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)
116
- @cp $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/blas.pc $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/lapack.pc
117
- endif
118
109
119
110
#Generating OpenBLASConfig.cmake
120
111
@echo Generating $(OPENBLAS_CMAKE_CONFIG) in $(DESTDIR)$(OPENBLAS_CMAKE_DIR)
Original file line number Diff line number Diff line change
1
+ prefix=@prefix@
2
+ libdir=@libdir@
3
+ includedir=@includedir@
4
+
5
+ Name: OpenBLAS
6
+ Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version
7
+ Version: @OPENBLAS_VERSION@
8
+ URL: https://github.com/xianyi/OpenBLAS
9
+ Libs: -L${libdir} -lopenblas
10
+ Cflags: -I${includedir}
File renamed without changes.
You can’t perform that action at this time.
0 commit comments