Skip to content

Conversation

@ShamrockLee
Copy link

CMAKE_BUILD_TYPE supports more values than Debug and Release according to its CMake documentation, and so does the Meson buildtype.

This PR adds a function meson_build_type_from_cmake to set corresponding Meson buildtype for each typical CMAKE_BUILD_TYPE value and make DAVID_MESON_BUILDTYPE overridable.

@agruzdev
Copy link
Owner

agruzdev commented Aug 9, 2025

Hello!
The build type mapping looks fine, but seems to be not used. When I try to build MinSizeRel

cmake --build . --config MinSizeRel

The dav1d library is still compiled as debug and release only:
image

Seems it should be adjusted further

Using MSVC 2022

@ShamrockLee
Copy link
Author

Thank you for testing and sorry for late response.

Unlike the if (UNIX) block, the --buildtype of the if (MSVC) block is hard-coded to debug and release, which are then used to specify DAVID_LIBRARY and DAVID_DEBUG_LIBRARY.

Considering than only DAVID_LIBRARY is used when building LibHEIF, should we align the align its behavior with the UNIX one and respect the global CMAKE_BUILD_TYPE specification?

@ShamrockLee
Copy link
Author

The MSVC build now produces build_debug and build_${DAVID_MESON_BUILDTYPE} when DAVID_MESON_BUILDTYPE is not "debug".

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