build: Fix missing FreeSOLID includes error. #46

Open
apteryx wants to merge 2 commits from apteryx/speed-dreams-code:fix-feesolid-missing-include into main
Member
  • src/modules/simu/simuv4.1/CMakeLists.txt: Add ${SOLID_INCLUDE_DIR}
    to include directories of sumv4.1.
  • src/modules/simu/simuv4/CMakeLists.txt: Add ${SOLID_INCLUDE_DIR}
    to include directories of sumv4.
  • src/modules/simu/simuv5/CMakeLists.txt: Add ${SOLID_INCLUDE_DIR}
    to include directories of sumv5.

Fixes: #45

* src/modules/simu/simuv4.1/CMakeLists.txt: Add ${SOLID_INCLUDE_DIR} to include directories of sumv4.1. * src/modules/simu/simuv4/CMakeLists.txt: Add ${SOLID_INCLUDE_DIR} to include directories of sumv4. * src/modules/simu/simuv5/CMakeLists.txt: Add ${SOLID_INCLUDE_DIR} to include directories of sumv5. Fixes: https://forge.a-lec.org/speed-dreams/speed-dreams-code/issues/45
apteryx added 1 commit 2025-01-30 15:38:15 +01:00
build: Add missing FreeSOLID include directories.
Some checks failed
/ build (debian-sd:stable) (pull_request) Has been cancelled
/ build (ubuntu-sd:jammy) (pull_request) Has been cancelled
/ build (pull_request) Has been cancelled
63c793e5f6
* src/modules/simu/simuv4.1/CMakeLists.txt: Add ${SOLID_INCLUDE_DIR}
to include directories of sumv4.1.
* src/modules/simu/simuv4/CMakeLists.txt: Add ${SOLID_INCLUDE_DIR}
to include directories of sumv4.
* src/modules/simu/simuv5/CMakeLists.txt: Add ${SOLID_INCLUDE_DIR}
to include directories of sumv5.

Fixes: #45
apteryx force-pushed fix-feesolid-missing-include from 63c793e5f6 to 8555176241 2025-01-30 17:10:37 +01:00 Compare
apteryx changed title from build: Add missing FreeSOLID include directories. to build: Fix missing FreeSOLID includes error. 2025-01-30 17:11:22 +01:00
xavi reviewed 2025-01-30 21:59:01 +01:00
CMakeLists.txt Outdated
@ -82,6 +82,14 @@ if(NOT SOLID_FOUND)
add_subdirectory(freesolid)
endif()
if(TARGET PkgConfig::SOLID)
Owner

Instead of assigning a SOLID_TARGET variable and assign its value based on the condition above, I would rather set up an ALIAS target on cmake/FindSOLID.cmake so that the solid target can be transparently used:

add_library(solid ALIAS PkgConfig::SOLID)

WDYT?

Instead of assigning a `SOLID_TARGET` variable and assign its value based on the condition above, I would rather set up an [`ALIAS` target](https://cmake.org/cmake/help/latest/command/add_library.html#alias-libraries) on `cmake/FindSOLID.cmake` so that the `solid` target can be transparently used: ```cmake add_library(solid ALIAS PkgConfig::SOLID) ``` WDYT?
Author
Member

I didn't know about ALIAS; that sounds like a good idea indeed! I'll push a new revision shortly.

I didn't know about ALIAS; that sounds like a good idea indeed! I'll push a new revision shortly.
apteryx marked this conversation as resolved
xavi reviewed 2025-01-30 22:01:24 +01:00
@ -24,2 +23,3 @@
PKG_CHECK_MODULES(SOLID FreeSOLID IMPORTED_TARGET)
IF(NOT SOLID_FOUND)
PKG_CHECK_MODULES(SOLID SOLID)
PKG_CHECK_MODULES(SOLID SOLID IMPORTED_TARGET)
Owner

Related to this, add the following suggestion inside the IF(SOLID_FOUND) condition:

add_library(solid ALIAS PkgConfig::SOLID)
Related to [this](https://forge.a-lec.org/speed-dreams/speed-dreams-code/pulls/46/files#issuecomment-6694), add the following suggestion inside the `IF(SOLID_FOUND)` condition: ```cmake add_library(solid ALIAS PkgConfig::SOLID) ```
apteryx marked this conversation as resolved
xavi reviewed 2025-01-30 22:02:56 +01:00
@ -32,3 +32,3 @@
#SET_TARGET_PROPERTIES(simuv3 PROPERTIES VERSION ${VERSION} SOVERSION 0.0.0)
ADD_SDLIB_LIBRARY(simuv3 portability tgf robottools solid)
ADD_SDLIB_LIBRARY(simuv3 portability tgf robottools ${SOLID_TARGET})
Owner

This change should not be required if an ALIAS target is set.

This change should not be required if an `ALIAS` target is set.
apteryx marked this conversation as resolved
xavi reviewed 2025-01-30 22:20:22 +01:00
@ -32,3 +32,2 @@
#SET_TARGET_PROPERTIES(simuv2.1 PROPERTIES VERSION ${VERSION} SOVERSION 0.0.0)
ADD_SDLIB_LIBRARY(simuv4.1 portability tgf robottools solid)
ADD_SDLIB_LIBRARY(simuv4.1 portability tgf robottools ${SOLID_TARGET})
Owner

This change should not be required if an ALIAS target is set.

This change should not be required if an `ALIAS` target is set.
apteryx marked this conversation as resolved
xavi reviewed 2025-01-30 22:20:26 +01:00
@ -32,3 +32,3 @@
#SET_TARGET_PROPERTIES(simuv2.1 PROPERTIES VERSION ${VERSION} SOVERSION 0.0.0)
ADD_SDLIB_LIBRARY(simuv4 portability tgf robottools solid)
ADD_SDLIB_LIBRARY(simuv4 portability tgf robottools ${SOLID_TARGET})
Owner

This change should not be required if an ALIAS target is set.

This change should not be required if an `ALIAS` target is set.
apteryx marked this conversation as resolved
xavi reviewed 2025-01-30 22:20:28 +01:00
@ -32,3 +32,3 @@
#SET_TARGET_PROPERTIES(simuv2.1 PROPERTIES VERSION ${VERSION} SOVERSION 0.0.0)
ADD_SDLIB_LIBRARY(simuv5 portability tgf robottools solid)
ADD_SDLIB_LIBRARY(simuv5 portability tgf robottools ${SOLID_TARGET})
Owner

This change should not be required if an ALIAS target is set.

This change should not be required if an `ALIAS` target is set.
apteryx marked this conversation as resolved
apteryx force-pushed fix-feesolid-missing-include from 8555176241 to 49c039da64 2025-01-31 01:31:14 +01:00 Compare
Author
Member

I've implemented the suggestions; it's now a 3 lines change, thank you!

I've implemented the suggestions; it's now a 3 lines change, thank you!
xavi added the
bug
label 2025-01-31 07:28:49 +01:00
xavi approved these changes 2025-01-31 07:55:04 +01:00
xavi left a comment
Owner

LGTM, thank you!

I have just approved the workflows so that the artifacts are made available from the CI/CD.

LGTM, thank you! I have just approved the workflows so that the artifacts are made available from the CI/CD.
Author
Member

Yay! But it seems there's currently an issue with the workflow/CI (git clone fails).

Yay! But it seems there's currently an issue with the workflow/CI (git clone fails).
Owner

Yay! But it seems there's currently an issue with the workflow/CI (git clone fails).

This is a known issue: git clone fails when the PR comes from a forked repository. I wrote forgejo-clone and more specifically #44 to fix several issues, including this one.

> Yay! But it seems there's currently an issue with the workflow/CI (git clone fails). This is a known issue: `git clone` fails when the PR comes from a forked repository. I wrote [`forgejo-clone`](https://forge.a-lec.org/speed-dreams/forgejo-clone) and more specifically https://forge.a-lec.org/speed-dreams/speed-dreams-code/pulls/44 to fix several issues, including this one.
Owner

#44 has been merged. Please rebase against latest main so the workflows can work again.

https://forge.a-lec.org/speed-dreams/speed-dreams-code/pulls/44 has been merged. Please rebase against [latest `main`](https://forge.a-lec.org/speed-dreams/speed-dreams-code/commit/ebedf03e6b5054dcce7e4f47a7f974f5974bd24c) so the workflows can work again.
apteryx force-pushed fix-feesolid-missing-include from 49c039da64 to 3046331a70 2025-02-01 02:17:24 +01:00 Compare
Author
Member

You rock! Thanks for working both on this cool game and on the forge that hosts its development. I've now rebased and force pushed.

You rock! Thanks for working both on this cool game and on the forge that hosts its development. I've now rebased and force pushed.
Owner

I have just merged #52 to fix one last standing issue with the CI/CD on forked repositories. @apteryx could you please rebase again?

Thank you!

I have just merged https://forge.a-lec.org/speed-dreams/speed-dreams-code/pulls/52 to fix one last standing issue with the CI/CD on forked repositories. @apteryx could you please rebase again? Thank you!
Some checks failed
/ build (ubuntu-sd:jammy) (pull_request) Failing after 12m9s
/ build (debian-sd:stable) (pull_request) Failing after 14m39s
/ build (pull_request) Failing after 22m15s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix-feesolid-missing-include:apteryx-fix-feesolid-missing-include
git checkout apteryx-fix-feesolid-missing-include
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: speed-dreams/speed-dreams-code#46
No description provided.