1
1
message (STATUS "CBLAS enable" )
2
2
enable_language (C)
3
3
4
- set (LAPACK_INSTALL_EXPORT_NAME cblas -targets)
4
+ set (LAPACK_INSTALL_EXPORT_NAME ${CBLASLIB} -targets)
5
5
6
6
# Create a header file cblas.h for the routines called in my C programs
7
7
include (FortranCInterface)
@@ -42,15 +42,15 @@ if(BUILD_TESTING)
42
42
endif ()
43
43
44
44
if (NOT BLAS_FOUND)
45
- set (ALL_TARGETS ${ALL_TARGETS} blas )
45
+ set (ALL_TARGETS ${ALL_TARGETS} ${BLASLIB} )
46
46
endif ()
47
47
48
48
# Export cblas targets from the
49
49
# install tree, if any.
50
50
set (_cblas_config_install_guard_target "" )
51
51
if (ALL_TARGETS)
52
- install (EXPORT cblas -targets
53
- DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/cblas -${LAPACK_VERSION}
52
+ install (EXPORT ${CBLASLIB} -targets
53
+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/${CBLASLIB} -${LAPACK_VERSION}
54
54
COMPONENT Development
55
55
)
56
56
# Choose one of the cblas targets to use as a guard for
@@ -61,34 +61,34 @@ endif()
61
61
# Export cblas targets from the build tree, if any.
62
62
set (_cblas_config_build_guard_target "" )
63
63
if (ALL_TARGETS)
64
- export (TARGETS ${ALL_TARGETS} FILE cblas -targets.cmake)
64
+ export (TARGETS ${ALL_TARGETS} FILE ${CBLASLIB} -targets.cmake)
65
65
66
66
# Choose one of the cblas targets to use as a guard
67
67
# for cblas-config.cmake to load targets from the build tree.
68
68
list (GET ALL_TARGETS 0 _cblas_config_build_guard_target)
69
69
endif ()
70
70
71
71
configure_file (${CMAKE_CURRENT_SOURCE_DIR} /cmake/cblas-config-version .cmake.in
72
- ${LAPACK_BINARY_DIR} /cblas -config-version .cmake @ONLY)
72
+ ${LAPACK_BINARY_DIR} /${CBLASLIB} -config-version .cmake @ONLY)
73
73
configure_file (${CMAKE_CURRENT_SOURCE_DIR} /cmake/cblas-config-build .cmake.in
74
- ${LAPACK_BINARY_DIR} /cblas -config.cmake @ONLY)
74
+ ${LAPACK_BINARY_DIR} /${CBLASLIB} -config.cmake @ONLY)
75
75
76
76
77
- configure_file (${CMAKE_CURRENT_SOURCE_DIR} /cblas.pc.in ${CMAKE_CURRENT_BINARY_DIR} /cblas .pc @ONLY)
77
+ configure_file (${CMAKE_CURRENT_SOURCE_DIR} /cblas.pc.in ${CMAKE_CURRENT_BINARY_DIR} /${CBLASLIB} .pc @ONLY)
78
78
install (FILES
79
- ${CMAKE_CURRENT_BINARY_DIR} /cblas .pc
79
+ ${CMAKE_CURRENT_BINARY_DIR} /${CBLASLIB} .pc
80
80
DESTINATION ${PKG_CONFIG_DIR}
81
81
)
82
82
83
83
configure_file (${CMAKE_CURRENT_SOURCE_DIR} /cmake/cblas-config-install .cmake.in
84
- ${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/cblas -config.cmake @ONLY)
84
+ ${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${CBLASLIB} -config.cmake @ONLY)
85
85
install (FILES
86
- ${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/cblas -config.cmake
87
- ${LAPACK_BINARY_DIR} /cblas -config-version .cmake
88
- DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/cblas -${LAPACK_VERSION}
86
+ ${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${CBLASLIB} -config.cmake
87
+ ${LAPACK_BINARY_DIR} /${CBLASLIB} -config-version .cmake
88
+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/${CBLASLIB} -${LAPACK_VERSION}
89
89
)
90
90
91
- #install(EXPORT cblas -targets
92
- # DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cblas -${LAPACK_VERSION}
91
+ #install(EXPORT ${CBLASLIB} -targets
92
+ # DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CBLASLIB} -${LAPACK_VERSION}
93
93
# COMPONENT Development
94
94
# )
0 commit comments