@@ -20,6 +20,7 @@ option(BUILD_WITHOUT_LAPACK "Without LAPACK and LAPACKE (Only BLAS or CBLAS)" ON
20
20
endif ()
21
21
option (BUILD_WITHOUT_CBLAS "Without CBLAS" OFF )
22
22
option (DYNAMIC_ARCH "Build with DYNAMIC_ARCH" OFF )
23
+ option (DYNAMIC_OLDER "Support older cpus with DYNAMIC_ARCH" OFF )
23
24
option (BUILD_RELAPACK "Build with ReLAPACK (recursive LAPACK" OFF )
24
25
#######
25
26
if (BUILD_WITHOUT_LAPACK )
@@ -208,6 +209,7 @@ set_target_properties(${OpenBLAS_LIBNAME} PROPERTIES
208
209
209
210
# Install libraries
210
211
install (TARGETS ${OpenBLAS_LIBNAME}
212
+ EXPORT "OpenBLASTargets"
211
213
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
212
214
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
213
215
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
@@ -267,3 +269,21 @@ if(PKG_CONFIG_FOUND)
267
269
configure_file (${PROJECT_SOURCE_DIR} /cmake/openblas.pc.in ${PROJECT_BINARY_DIR} /openblas.pc @ONLY )
268
270
install (FILES ${PROJECT_BINARY_DIR} /openblas.pc DESTINATION ${CMAKE_INSTALL_LIBDIR} /pkgconfig/ )
269
271
endif ()
272
+
273
+
274
+ # GNUInstallDirs "DATADIR" wrong here; CMake search path wants "share".
275
+ set (PN OpenBLAS )
276
+ set (CMAKECONFIG_INSTALL_DIR "share/cmake/${PN} " )
277
+ configure_package_config_file (cmake/${PN}Config.cmake.in
278
+ "${CMAKE_CURRENT_BINARY_DIR} /${PN} Config.cmake"
279
+ INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} )
280
+ write_basic_package_version_file (${CMAKE_CURRENT_BINARY_DIR} /${PN}ConfigVersion.cmake
281
+ VERSION ${${PN}_VERSION}
282
+ COMPATIBILITY AnyNewerVersion )
283
+ install (FILES ${CMAKE_CURRENT_BINARY_DIR} /${PN}Config.cmake
284
+ ${CMAKE_CURRENT_BINARY_DIR} /${PN}ConfigVersion.cmake
285
+ DESTINATION ${CMAKECONFIG_INSTALL_DIR} )
286
+ install (EXPORT "${PN} Targets"
287
+ NAMESPACE "${PN} ::"
288
+ DESTINATION ${CMAKECONFIG_INSTALL_DIR} )
289
+
0 commit comments