Skip to content

(generators) cmake : use a custom target to link prebuilt object files#6388

Merged
waruqi merged 1 commit intoxmake-io:devfrom
PierreEVEN:fix-cmake_generator-objectfiles
May 3, 2025
Merged

(generators) cmake : use a custom target to link prebuilt object files#6388
waruqi merged 1 commit intoxmake-io:devfrom
PierreEVEN:fix-cmake_generator-objectfiles

Conversation

@PierreEVEN
Copy link
Contributor

Using target_link_library(target PRIVATE my_obj.o) cause sometime issues with gcc, where my_obj.o was added after the libraries in the compile command, causing linking errors in my case.
The modern method of using a custom target solves this problem.

…BJECT IMPORTED ...) instead of just using the target_link_library to linnk prebuilt obj files
@waruqi waruqi merged commit ad208a2 into xmake-io:dev May 3, 2025
22 checks passed
@waruqi waruqi added this to the v3.0.0 milestone May 3, 2025
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