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

Use DEBUG_POSTFIX cmake property to distinguish between debug and release dll #2186

Merged
merged 1 commit into from
Nov 25, 2023

Conversation

chehrlic
Copy link
Contributor

Since it's not possible to mix debug and release msvc runtime on
windows, it's important to link against a mavsdk debug lib when
compiling the program for debug and later link against the mavsdk
release lib when deploying the program. But this did not work until now
because the name for the debug and release dll was the same. For this
purpose CMake invented the 'DEBUG_POSTFIX' property for a target.
The generated CMake files to find mavsdk are correctly filled with the
appropriate library name so no need to change anything else here.

Since it's not possible to mix debug and release msvc runtime on
windows, it's important to link against a mavsdk debug lib when
compiling the program for debug and later link against the mavsdk
release lib when deploying the program. But this did not work until now
because the name for the debug and release dll was the same. For this
purpose CMake invented the 'DEBUG_POSTFIX' property for a target.
The generated CMake files to find mavsdk are correctly filled with the
appropriate library name so no need to change anything else here.
@chehrlic chehrlic force-pushed the cmake_debug_postfix branch from 51ac725 to 3467929 Compare November 23, 2023 18:22
Copy link
Collaborator

@julianoes julianoes left a comment

Choose a reason for hiding this comment

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

Thanks!

@julianoes julianoes merged commit 9a6416b into mavlink:main Nov 25, 2023
26 checks passed
@chehrlic chehrlic deleted the cmake_debug_postfix branch December 3, 2023 09:59
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