Commit cf8f189b authored by Alex Richardson's avatar Alex Richardson Committed by Alex Richardson
Browse files

Allow usage of lcms2 when compiling with Clang

Otherwise the build fails for me with the following error:
error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
Upstream does not appear willing to fix this issue, so we have to add a
define to avoid usage of this useless keyword.
See https://github.com/mm2/Little-CMS/issues/190 and
https://github.com/mm2/Little-CMS/issues/243.
parent 9ff137f5
Pipeline #176259 passed with stage
in 12 minutes and 33 seconds
......@@ -61,6 +61,9 @@ if (lcms2_FOUND AND NOT TARGET lcms2::lcms2)
set_target_properties(lcms2::lcms2 PROPERTIES
IMPORTED_LOCATION "${lcms2_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${lcms2_DEFINITIONS}"
# Don't use the register keyword to allow compiling in C++17 mode.
# See https://github.com/mm2/Little-CMS/issues/243
INTERFACE_COMPILE_DEFINITIONS "CMS_NO_REGISTER_KEYWORD=1"
INTERFACE_INCLUDE_DIRECTORIES "${lcms2_INCLUDE_DIR}"
)
endif()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment