Merge pull request #1096 from martin-frbg/pkg-config
Build only openblas.pc for pkg-config and install it from cmake as well
This commit is contained in:
commit
e2489c9a92
|
@ -227,3 +227,12 @@ install (FILES ${INCLUDE_FILES} DESTINATION include)
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
install (TARGETS ${OpenBLAS_LIBNAME}_static DESTINATION lib)
|
install (TARGETS ${OpenBLAS_LIBNAME}_static DESTINATION lib)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include(FindPkgConfig QUIET)
|
||||||
|
if(PKG_CONFIG_FOUND)
|
||||||
|
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||||
|
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
|
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
|
||||||
|
configure_file(${PROJECT_SOURCE_DIR}/cmake/openblas.pc.in ${PROJECT_BINARY_DIR}/openblas.pc @ONLY)
|
||||||
|
install (FILES ${PROJECT_BINARY_DIR}/openblas.pc DESTINATION lib/pkgconfig/)
|
||||||
|
endif()
|
||||||
|
|
|
@ -98,23 +98,14 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
#Generating blas.pc
|
#Generating openblas.pc
|
||||||
@echo Generating blas.pc in $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)
|
@echo Generating openblas.pc in $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)
|
||||||
@echo 'libdir='$(OPENBLAS_LIBRARY_DIR) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/blas.pc
|
@echo 'libdir='$(OPENBLAS_LIBRARY_DIR) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc
|
||||||
@echo 'includedir='$(OPENBLAS_INCLUDE_DIR) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/blas.pc
|
@echo 'includedir='$(OPENBLAS_INCLUDE_DIR) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc
|
||||||
@echo 'version='$(VERSION) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/blas.pc
|
@echo 'version='$(VERSION) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc
|
||||||
@echo 'extralib='$(EXTRALIB) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/blas.pc
|
@echo 'extralib='$(EXTRALIB) >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc
|
||||||
@cat blas.pc.in >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/blas.pc
|
@cat openblas.pc.in >> $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc
|
||||||
|
|
||||||
ifndef NO_CBLAS
|
|
||||||
@echo Generating cblas.pc in $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)
|
|
||||||
@cp $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/blas.pc $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/cblas.pc
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef NO_LAPACKE
|
|
||||||
@echo Generating lapack.pc in $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)
|
|
||||||
@cp $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/blas.pc $(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/lapack.pc
|
|
||||||
endif
|
|
||||||
|
|
||||||
#Generating OpenBLASConfig.cmake
|
#Generating OpenBLASConfig.cmake
|
||||||
@echo Generating $(OPENBLAS_CMAKE_CONFIG) in $(DESTDIR)$(OPENBLAS_CMAKE_DIR)
|
@echo Generating $(OPENBLAS_CMAKE_CONFIG) in $(DESTDIR)$(OPENBLAS_CMAKE_DIR)
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
prefix=@prefix@
|
||||||
|
libdir=@libdir@
|
||||||
|
includedir=@includedir@
|
||||||
|
|
||||||
|
Name: OpenBLAS
|
||||||
|
Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version
|
||||||
|
Version: @OPENBLAS_VERSION@
|
||||||
|
URL: https://github.com/xianyi/OpenBLAS
|
||||||
|
Libs: -L${libdir} -lopenblas
|
||||||
|
Cflags: -I${includedir}
|
Loading…
Reference in New Issue