mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-17 20:07:50 +08:00
0bc3f04da6
Co-authored-by: Alexander Neumann <you@example.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
43 lines
2.5 KiB
CMake
43 lines
2.5 KiB
CMake
SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
set(BLA_STATIC ON)
|
|
else()
|
|
set(BLA_STATIC OFF)
|
|
endif()
|
|
|
|
# See explanation of which lapack implementation is chosen in portfile.cmake in the blas port
|
|
|
|
set(BLA_VENDOR Generic)
|
|
set(installed_wrapper "${CURRENT_INSTALLED_DIR}/share/lapack/vcpkg-cmake-wrapper.cmake")
|
|
set(installed_module "${CURRENT_INSTALLED_DIR}/share/lapack/FindLAPACK.cmake")
|
|
if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS)
|
|
# Use Apple's accelerate framework where available
|
|
set(BLA_VENDOR Apple)
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/lapack/vcpkg-cmake-wrapper.cmake" @ONLY)
|
|
set(libs "-framework Accelerate")
|
|
set(cflags "-framework Accelerate")
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/lapack.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/lapack.pc" @ONLY)
|
|
if(NOT VCPKG_BUILD_TYPE)
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/lapack.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/lapack.pc" @ONLY)
|
|
endif()
|
|
unset(installed_module)
|
|
elseif(VCPKG_TARGET_IS_UWP OR (VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE MATCHES "arm"))
|
|
configure_file("${CURRENT_INSTALLED_DIR}/share/clapack/wrapper/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/lapack/vcpkg-cmake-wrapper.cmake" COPYONLY)
|
|
configure_file("${CURRENT_INSTALLED_DIR}/share/clapack/FindLAPACK.cmake" "${CURRENT_PACKAGES_DIR}/share/lapack/FindLAPACK.cmake" COPYONLY)
|
|
set(libs "-llapack -llibf2c")
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/lapack.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/lapack.pc" @ONLY)
|
|
if(NOT VCPKG_BUILD_TYPE)
|
|
set(libs "-llapack -llibf2c")
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/lapack.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/lapack.pc" @ONLY)
|
|
endif()
|
|
else()
|
|
configure_file("${CURRENT_INSTALLED_DIR}/share/lapack-reference/wrapper/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/lapack/vcpkg-cmake-wrapper.cmake" COPYONLY)
|
|
configure_file("${CURRENT_INSTALLED_DIR}/share/lapack-reference/FindLAPACK.cmake" "${CURRENT_PACKAGES_DIR}/share/lapack/FindLAPACK.cmake" COPYONLY)
|
|
set(requires "lapack-reference")
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/lapack.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/lapack.pc" @ONLY)
|
|
if(NOT VCPKG_BUILD_TYPE)
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/lapack.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/lapack.pc" @ONLY)
|
|
endif()
|
|
endif()
|