Support building debug version on Windows (#583)
This commit is contained in:
@@ -69,7 +69,13 @@ function(download_onnxruntime)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
include(onnxruntime-win-x86)
|
||||
else()
|
||||
include(onnxruntime-win-x86-static)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
include(onnxruntime-win-x86-static)
|
||||
elseif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
include(onnxruntime-win-x86-static-debug)
|
||||
else()
|
||||
message(STATUS "Support only CMAKE_BUILD_TYPE Release or Debug. Given: ${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SHERPA_ONNX_ENABLE_GPU)
|
||||
@@ -87,7 +93,13 @@ function(download_onnxruntime)
|
||||
else()
|
||||
# static libraries for windows x64
|
||||
message(STATUS "Use static onnxruntime libraries")
|
||||
include(onnxruntime-win-x64-static)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
include(onnxruntime-win-x64-static)
|
||||
elseif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
include(onnxruntime-win-x64-static-debug)
|
||||
else()
|
||||
message(STATUS "Support only CMAKE_BUILD_TYPE Release or Debug. Given: ${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user