From 4a9b658141308ac0c7a26cd98c463466217ff162 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Wed, 26 Aug 2020 03:55:54 +0200 Subject: [lapack-reference] fix cblas feature (#12929) --- ports/lapack-reference/CONTROL | 1 + ports/lapack-reference/portfile.cmake | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ports/lapack-reference/CONTROL b/ports/lapack-reference/CONTROL index 493e7f50e..0ac1c8d0e 100644 --- a/ports/lapack-reference/CONTROL +++ b/ports/lapack-reference/CONTROL @@ -1,5 +1,6 @@ Source: lapack-reference Version: 3.8.0 +Port-Version: 1 Description: LAPACK — Linear Algebra PACKage http://www.netlib.org/lapack/ Default-Features: blas-select Build-Depends: vcpkg-gfortran (windows) diff --git a/ports/lapack-reference/portfile.cmake b/ports/lapack-reference/portfile.cmake index dcdce397a..6a3ad6982 100644 --- a/ports/lapack-reference/portfile.cmake +++ b/ports/lapack-reference/portfile.cmake @@ -24,6 +24,9 @@ endif() set(CBLAS OFF) if("cblas" IN_LIST FEATURES) set(CBLAS ON) + if("noblas" IN_LIST FEATURES) + message(FATAL_ERROR "Cannot built feature 'cblas' together with feature 'noblas'. cblas requires blas!") + endif() endif() set(USE_OPTIMIZED_BLAS OFF) @@ -91,6 +94,20 @@ if(NOT USE_OPTIMIZED_BLAS) file(WRITE "${pcfile}" "${_contents}") endif() endif() +if("cblas" IN_LIST FEATURES) + set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/cblas.pc") + if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") + endif() + set(pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/cblas.pc") + if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}/debug\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") + endif() +endif() vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() -- cgit v1.2.3