Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Build error when using a local copy of ZNN SDK #33

Open
sol-znn opened this issue Sep 17, 2023 · 0 comments
Open

Windows: Build error when using a local copy of ZNN SDK #33

sol-znn opened this issue Sep 17, 2023 · 0 comments

Comments

@sol-znn
Copy link
Contributor

sol-znn commented Sep 17, 2023

I saw a vague error in the Flutter build logs when sourcing the ZNN SDK from disk.
The build process works well if the package is sourced from Github, but fails otherwise.

Creating this ticket to track the issue. Should confirm behavior on Linux, as well.

Repro
Update pubspec.yaml reference for znn_sdk_dart

  znn_sdk_dart:
    path:
      ../znn_sdk_dart

Current solution: syrius/windows/CMakeLists.txt

# Leveraging flutter to identify dependency locations
file(STRINGS "${SYRIUS_PROJECT_DIRECTORY}/.dart_tool/package_config.json"
  ZNN_SDK_DART_PATH REGEX "(rootUri).*(znn_sdk_dart).*(\/|)\"," )

string(REPLACE "\"rootUri\": \"" "" ZNN_SDK_DART_PATH "${ZNN_SDK_DART_PATH}")
string(REPLACE "file:\/\/\/" "" ZNN_SDK_DART_PATH "${ZNN_SDK_DART_PATH}")
string(REPLACE "/\"," "" ZNN_SDK_DART_PATH "${ZNN_SDK_DART_PATH}")
string(REPLACE "\"," "" ZNN_SDK_DART_PATH "${ZNN_SDK_DART_PATH}")
string(STRIP "${ZNN_SDK_DART_PATH}" ZNN_SDK_DART_PATH)

I tried to combine some of these REPLACE lines with more complex regex but cmake wasn't producing the expected result.

KingGorrin pushed a commit to KingGorrin/syrius that referenced this issue Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant