Skip to content

Commit 99165f2

Browse files
authored
[Bug Fix] fix win examples build error (#855)
* Update CMakeLists.txt * Update infer_rkyolo.cc
1 parent 8e13a38 commit 99165f2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

examples/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ function(add_fastdeploy_executable FIELD CC_FILE)
5151
if(TARGET gflags)
5252
if(UNIX AND (NOT APPLE) AND (NOT ANDROID))
5353
target_link_libraries(${TEMP_TARGET_NAME} PRIVATE gflags pthread)
54+
elseif(WIN32)
55+
target_link_libraries(${TEMP_TARGET_NAME} PRIVATE gflags)
56+
if (HAVE_SHLWAPI)
57+
target_link_libraries(${TEMP_TARGET_NAME} PRIVATE shlwapi.lib)
58+
endif()
5459
else()
5560
target_link_libraries(${TEMP_TARGET_NAME} PRIVATE gflags)
5661
endif()

examples/vision/detection/rkyolo/cpp/infer_rkyolo.cc

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#include "fastdeploy/vision.h"
1515

1616
void RKNPU2Infer(const std::string& model_file, const std::string& image_file) {
17-
struct timeval start_time, stop_time;
18-
1917
auto option = fastdeploy::RuntimeOption();
2018
option.UseRKNPU2();
2119

0 commit comments

Comments
 (0)