Skip to content

Commit

Permalink
Merge pull request #893 from chayleaf/gnu-install-dirs
Browse files Browse the repository at this point in the history
allow absolute GNU install dirs
  • Loading branch information
weslleyspereira authored Oct 31, 2023
2 parents 62e6bdf + ddca837 commit fa75a82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions CBLAS/cmake/cblas-config-install.cmake.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Compute locations from <prefix>/@{LIBRARY_DIR@/cmake/lapacke-<v>/<self>.cmake
get_filename_component(_CBLAS_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_CBLAS_PREFIX "${_CBLAS_SELF_DIR}" PATH)
get_filename_component(_CBLAS_PREFIX "${_CBLAS_PREFIX}" PATH)
get_filename_component(_CBLAS_PREFIX "${_CBLAS_PREFIX}" PATH)

# Load the LAPACK package with which we were built.
set(LAPACK_DIR "${_CBLAS_PREFIX}/@CMAKE_INSTALL_LIBDIR@/cmake/@LAPACKLIB@-@LAPACK_VERSION@")
set(LAPACK_DIR "@CMAKE_INSTALL_FULL_LIBDIR@/cmake/@LAPACKLIB@-@LAPACK_VERSION@")
find_package(LAPACK NO_MODULE)

# Load lapacke targets from the install tree.
Expand All @@ -14,10 +11,9 @@ if(NOT TARGET @CBLASLIB@)
endif()

# Report lapacke header search locations.
set(CBLAS_INCLUDE_DIRS ${_CBLAS_PREFIX}/include)
set(CBLAS_INCLUDE_DIRS @CMAKE_INSTALL_FULL_INCLUDEDIR@)

# Report lapacke libraries.
set(CBLAS_LIBRARIES @CBLASLIB@)

unset(_CBLAS_PREFIX)
unset(_CBLAS_SELF_DIR)
8 changes: 2 additions & 6 deletions LAPACKE/cmake/lapacke-config-install.cmake.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Compute locations from <prefix>/@{LIBRARY_DIR@/cmake/lapacke-<v>/<self>.cmake
get_filename_component(_LAPACKE_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_LAPACKE_PREFIX "${_LAPACKE_SELF_DIR}" PATH)
get_filename_component(_LAPACKE_PREFIX "${_LAPACKE_PREFIX}" PATH)
get_filename_component(_LAPACKE_PREFIX "${_LAPACKE_PREFIX}" PATH)

# Load the LAPACK package with which we were built.
set(LAPACK_DIR "${_LAPACKE_PREFIX}/@CMAKE_INSTALL_LIBDIR@/cmake/@LAPACKLIB@-@LAPACK_VERSION@")
set(LAPACK_DIR "@CMAKE_INSTALL_FULL_LIBDIR@/cmake/@LAPACKLIB@-@LAPACK_VERSION@")
find_package(LAPACK NO_MODULE)

# Load lapacke targets from the install tree.
Expand All @@ -17,10 +14,9 @@ endif()
set(LAPACKE_Fortran_COMPILER_ID ${LAPACK_Fortran_COMPILER_ID})

# Report lapacke header search locations.
set(LAPACKE_INCLUDE_DIRS ${_LAPACKE_PREFIX}/include)
set(LAPACKE_INCLUDE_DIRS @CMAKE_INSTALL_FULL_INCLUDEDIR@)

# Report lapacke libraries.
set(LAPACKE_LIBRARIES @LAPACKELIB@ ${LAPACK_LIBRARIES})

unset(_LAPACKE_PREFIX)
unset(_LAPACKE_SELF_DIR)

0 comments on commit fa75a82

Please sign in to comment.