vcpkg/ports/openblas/install-openblas.patch

62 lines
2.3 KiB
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
2017-08-08 05:25:26 +08:00
index a379f549..f95a872b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
2017-08-08 05:25:26 +08:00
@@ -16,7 +16,7 @@ enable_language(C)
include(GNUInstallDirs)
if(MSVC)
-set(OpenBLAS_LIBNAME libopenblas)
+set(OpenBLAS_LIBNAME openblas)
else()
set(OpenBLAS_LIBNAME openblas)
endif()
2017-08-08 05:25:26 +08:00
@@ -197,6 +197,10 @@ set_target_properties(${OpenBLAS_LIBNAME} PROPERTIES
SOVERSION ${OpenBLAS_MAJOR_VERSION}
)
+install(TARGETS ${OpenBLAS_LIBNAME}
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
# TODO: Why is the config saved here? Is this necessary with CMake?
#Save the config files for installation
2017-08-08 05:25:26 +08:00
diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake
index a7f98bfb..02ab7080 100644
--- a/cmake/prebuild.cmake
+++ b/cmake/prebuild.cmake
@@ -37,6 +37,10 @@
# CPUIDEMU = ../../cpuid/table.o
+if (NOT DEFINED BLASHELPER_BINARY_DIR)
+ set(BLASHELPER_BINARY_DIR "${PROJECT_BINARY_DIR}")
+endif ()
+
if (DEFINED CPUIDEMU)
set(EXFLAGS "-DCPUIDEMU -DVENDOR=99")
endif ()
@@ -95,8 +99,8 @@ endif ()
message(STATUS "Running getarch")
# use the cmake binary w/ the -E param to run a shell command in a cross-platform way
-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT)
-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT)
+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT)
+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT)
message(STATUS "GETARCH results:\n${GETARCH_MAKE_OUT}")
@@ -121,8 +125,8 @@ if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
endif ()
# use the cmake binary w/ the -E param to run a shell command in a cross-platform way
-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT)
-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT)
+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT)
+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT)
# append config data from getarch_2nd to the TARGET file and read in CMake vars
file(APPEND ${TARGET_CONF} ${GETARCH2_CONF_OUT})