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

PICO_EXTRAS_FETCH_FROM_GIT does not work #24

Closed
ali1234 opened this issue Sep 12, 2021 · 1 comment · Fixed by #25 or 32blit/32blit-sdk#713
Closed

PICO_EXTRAS_FETCH_FROM_GIT does not work #24

ali1234 opened this issue Sep 12, 2021 · 1 comment · Fixed by #25 or 32blit/32blit-sdk#713
Assignees
Milestone

Comments

@ali1234
Copy link
Contributor

ali1234 commented Sep 12, 2021

Steps to reproduce:

  1. Make a new directory.
  2. Put pico_extras_import.cmake in it.
  3. Create CMakeLists.txt with the following contents:
include(pico_extras_import.cmake)
  1. Create a build directory and enter it.
  2. Run cmake -DPICO_EXTRAS_FETCH_FROM_GIT=1 ..

Expected result:

The pico extras repository should be downloaded and added as a subdirectory of the current project.

Actual result:

The pico extras repository is downloaded and then ${CMAKE_BINARY_DIR} is added as a subdirectory. This directory contains no CMakeLists.txt so cmake errors out, and the project cannot be built.

@ali1234
Copy link
Contributor Author

ali1234 commented Sep 12, 2021

Observations:

This happens because PICO_EXTRAS_PATH is set to an empty string here and then later made relative to CMAKE_BINARY_DIR here.

The virtually identical code for fetching pico sdk works as expected. The variable PICO_SDK_PATH is set to the actual place where the code was downloaded, even though the code that does it looks identical.

Also note that this isn't because I didn't download the SDK first. Adding the include for it causes it to download 2.2GB of data, and then fail on the extras in the exact same way. I left that step out because downloading 2.2GB is slow and unnecessary to reproduce the problem.

ali1234 added a commit to ali1234/pico-extras that referenced this issue Sep 12, 2021
This brings the code in-line with what is done in the Pico SDK and
seems to be required in order for pico_extras_SOURCE_PATH to be set.

Fixes raspberrypi#24
ali1234 added a commit to ali1234/32blit-sdk that referenced this issue Sep 12, 2021
This fixes raspberrypi/pico-extras#24 so
that PICO_EXTRAS_FETCH_FROM_GIT works. A PR is pending.
ali1234 added a commit to ali1234/32blit-sdk that referenced this issue Sep 12, 2021
This fixes raspberrypi/pico-extras#24 so
that PICO_EXTRAS_FETCH_FROM_GIT works.
@kilograham kilograham self-assigned this Sep 16, 2021
@kilograham kilograham added this to the nextup milestone Sep 16, 2021
kilograham added a commit that referenced this issue Oct 22, 2021
This brings the code in-line with what is done in the Pico SDK and
seems to be required in order for pico_extras_SOURCE_PATH to be set.

Fixes #24

Co-authored-by: Graham Sanderson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants