[Bug Fix] fix win examples build error (#855)

* Update CMakeLists.txt

* Update infer_rkyolo.cc
This commit is contained in:
DefTruth
2022-12-12 09:46:55 +08:00
committed by GitHub
parent 8e13a38bf5
commit 99165f2149
2 changed files with 5 additions and 2 deletions

View File

@@ -51,6 +51,11 @@ function(add_fastdeploy_executable FIELD CC_FILE)
if(TARGET gflags)
if(UNIX AND (NOT APPLE) AND (NOT ANDROID))
target_link_libraries(${TEMP_TARGET_NAME} PRIVATE gflags pthread)
elseif(WIN32)
target_link_libraries(${TEMP_TARGET_NAME} PRIVATE gflags)
if (HAVE_SHLWAPI)
target_link_libraries(${TEMP_TARGET_NAME} PRIVATE shlwapi.lib)
endif()
else()
target_link_libraries(${TEMP_TARGET_NAME} PRIVATE gflags)
endif()

View File

@@ -14,8 +14,6 @@
#include "fastdeploy/vision.h"
void RKNPU2Infer(const std::string& model_file, const std::string& image_file) {
struct timeval start_time, stop_time;
auto option = fastdeploy::RuntimeOption();
option.UseRKNPU2();