Support MinSizeRel and RelWithDebInfo build on Windows. (#586)
This commit is contained in:
@@ -71,10 +71,10 @@ function(download_onnxruntime)
|
||||
else()
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
include(onnxruntime-win-x86-static)
|
||||
elseif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
elseif(CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo OR CMAKE_BUILD_TYPE STREQUAL MinSizeRel)
|
||||
include(onnxruntime-win-x86-static-debug)
|
||||
else()
|
||||
message(STATUS "Support only CMAKE_BUILD_TYPE Release or Debug. Given: ${CMAKE_BUILD_TYPE}")
|
||||
message(FATAL_ERROR "Support only CMAKE_BUILD_TYPE being Release, Debug, RelWithDebInfo, or MinSizeRel. Given: ${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -85,6 +85,7 @@ function(download_onnxruntime)
|
||||
# for 64-bit windows
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
message(STATUS "Use dynamic onnxruntime libraries")
|
||||
if(SHERPA_ONNX_ENABLE_GPU)
|
||||
include(onnxruntime-win-x64-gpu)
|
||||
else()
|
||||
@@ -95,10 +96,10 @@ function(download_onnxruntime)
|
||||
message(STATUS "Use static onnxruntime libraries")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
include(onnxruntime-win-x64-static)
|
||||
elseif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
elseif(CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo OR CMAKE_BUILD_TYPE STREQUAL MinSizeRel)
|
||||
include(onnxruntime-win-x64-static-debug)
|
||||
else()
|
||||
message(STATUS "Support only CMAKE_BUILD_TYPE Release or Debug. Given: ${CMAKE_BUILD_TYPE}")
|
||||
message(FATAL_ERROR "Support only CMAKE_BUILD_TYPE being Release, Debug, RelWithDebInfo, or MinSizeRel. Given: ${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user