Skip to content

Commit 80f42c9

Browse files
committed
fix cmake script
1 parent 1eef839 commit 80f42c9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/opencv_core/src/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ endmacro()
1616
function(_parse_dartcv_cmake_vars)
1717
# Generate module config from pubspec.yaml using Dart script
1818
# The step should not be mendatary for better user experience
19-
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
20-
find_program(DART_EXECUTABLE dart.bat)
21-
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
22-
find_program(DART_EXECUTABLE dart)
19+
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
20+
find_program(DART_EXECUTABLE NAMES "dart.bat" NO_CACHE)
21+
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|Darwin")
22+
find_program(DART_EXECUTABLE NAMES dart NO_CACHE)
2323
else()
2424
message(FATAL_ERROR "Current host system ${CMAKE_HOST_SYSTEM_NAME} is not supported!")
2525
endif()

packages/opencv_dart/src/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ endmacro()
1616
function(_parse_dartcv_cmake_vars)
1717
# Generate module config from pubspec.yaml using Dart script
1818
# The step should not be mendatary for better user experience
19-
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
20-
find_program(DART_EXECUTABLE dart.bat)
21-
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
22-
find_program(DART_EXECUTABLE dart)
19+
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
20+
find_program(DART_EXECUTABLE NAMES "dart.bat" NO_CACHE)
21+
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|Darwin")
22+
find_program(DART_EXECUTABLE NAMES dart NO_CACHE)
2323
else()
2424
message(FATAL_ERROR "Current host system ${CMAKE_HOST_SYSTEM_NAME} is not supported!")
2525
endif()

0 commit comments

Comments
 (0)