update source for windows

This commit is contained in:
2021-08-26 21:27:06 +08:00
parent 83c03e5231
commit 2209673ee5
6 changed files with 94 additions and 43 deletions

View File

@@ -1,6 +1,8 @@
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
# 添加openblas库的地址
include_directories(D:/Library/include)
endif()
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
@@ -36,6 +38,11 @@ set_target_properties(magtess PROPERTIES VERSION 1.0 SOVERSION 1.0)
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
target_link_libraries(magtess PUBLIC openblas)
target_link_libraries(magtess PUBLIC m)
elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
#
find_library(OPENBLAS_LIBRARY libopenblas D:/Library/lib)
target_link_libraries(magtess PUBLIC ${OPENBLAS_LIBRARY})
target_link_libraries(magtess_static ${OPENBLAS_LIBRARY})
endif()
# 库的安装命令