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.
This commit is contained in:
parent
9ff137f5cb
commit
cf8f189be2
1 changed files with 3 additions and 0 deletions
|
@ -61,6 +61,9 @@ if (lcms2_FOUND AND NOT TARGET lcms2::lcms2)
|
||||||
set_target_properties(lcms2::lcms2 PROPERTIES
|
set_target_properties(lcms2::lcms2 PROPERTIES
|
||||||
IMPORTED_LOCATION "${lcms2_LIBRARY}"
|
IMPORTED_LOCATION "${lcms2_LIBRARY}"
|
||||||
INTERFACE_COMPILE_OPTIONS "${lcms2_DEFINITIONS}"
|
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}"
|
INTERFACE_INCLUDE_DIRECTORIES "${lcms2_INCLUDE_DIR}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue