Skip to content

Fix cmake problem about MinGW-Compile. #5663

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

Merged
merged 1 commit into from
Apr 21, 2025

Conversation

RookieCLY
Copy link
Contributor

@RookieCLY RookieCLY commented Feb 24, 2025

Fix cmakelists problem about mingw-compile

Description

There are some thing wrong with the CmakeLists.txt on MinGW-Compile. The "target_link_libraries" appears in the wrong place where the "fastdds" was not decleared as a lib. I'm sorry about this because I didn't notice I used cmake cache last time.

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • N/A Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • N/A Any new/modified methods have been properly documented using Doxygen.
  • N/A Any new configuration API has an equivalent XML API (with the corresponding XSD extension)
  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.
  • Changes are API compatible.
  • N/A New feature has been added to the versions.md file (if applicable).
  • N/A New feature has been documented/Current behavior is correctly described in the documentation.
  • N/A Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • N/A If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • N/A Check CI results: failing tests are unrelated with the changes.

@RookieCLY
Copy link
Contributor Author

Hi, @Javgilavi . I'm sorry to trouble you, Could you please review this PR for me? so I can make up for the mistakes I made before.

@Javgilavi
Copy link
Contributor

Hi, @RookieCLY.

No worry at all.
We will review your PR as soon as we can.

@Javgilavi Javgilavi self-requested a review April 14, 2025 14:51
@Javgilavi
Copy link
Contributor

Hi @RookieCLY,

I was checking your changes, but could not understand why you need to wait and add the libraries after everything else.

Could you explain?
What do you mean with "where the "fastdds" was not decleared as a lib"?

@RookieCLY
Copy link
Contributor Author

RookieCLY commented Apr 16, 2025

Hi, @Javgilavi .
Let me explain what happened before. When I was using fastdds(MinGW) in a new environment, I encountered <Cannot specify link libraries for target "fastdds" which is not built by this project> problems during the cmake phase. After a careful look at CMakeLists, I know there are something wrong with my last PR.

Fastdds was decleared as a lib after add_library(${PROJECT_NAME} ${${PROJECT_NAME}_source_files}) in src/cpp/CMakeLists.txt. So I should put target_link_libraries after add_subdirectory(src/cpp) as officially recommended.

That's why I made this PR.

@Javgilavi
Copy link
Contributor

Hi @RookieCLY,

My bad, I didn't see the add_subdirectory(src/cpp).

Everything looks fine, and the CI has pass properly.

Copy link
Contributor

@Javgilavi Javgilavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with green CI

@Javgilavi Javgilavi added this to the v3.2.2 milestone Apr 16, 2025
@Javgilavi Javgilavi merged commit 54ebfc5 into eProsima:master Apr 21, 2025
17 checks passed
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

Successfully merging this pull request may close these issues.

2 participants