cmake: fix clang compilation

This commit is contained in:
Vaxry 2024-11-28 15:33:48 +00:00
parent 336b3c4885
commit 4d927a52be
3 changed files with 7 additions and 1 deletions

View file

@ -30,6 +30,10 @@ else()
message(STATUS "Configuring hyprgraphics in Release")
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_definitions(__cpp_concepts=202002L)
endif()
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp" "include/*.hpp")
file(GLOB_RECURSE PUBLIC_HEADERS CONFIGURE_DEPENDS "include/*.hpp")

View file

@ -64,6 +64,8 @@ class BmpHeader {
return "Unable to parse bitmap header: wrong image size";
file.seekg(dataOffset);
return std::nullopt;
};
};

View file

@ -50,7 +50,7 @@ std::expected<cairo_surface_t*, std::string> JXL::createSurfaceFromJXL(const std
.num_channels = 4,
.data_type = JXL_TYPE_UINT8,
.endianness = JXL_LITTLE_ENDIAN,
.align = cairo_image_surface_get_stride(cairoSurface),
.align = (size_t)cairo_image_surface_get_stride(cairoSurface),
};
const auto OUTPUTSIZE = basicInfo.xsize * basicInfo.ysize * format.num_channels;