ports/devel/apitrace/files/patch-CMakeLists.txt
Adriaan de Groot 885cc329af devel/apitrace: fix build with CMake 3.20
Reported upstream as https://github.com/apitrace/apitrace/issues/727

An internal check that ends up defining HAVE_STDINT_H in CMake
is no longer done; do this explicitly instead.
2021-04-16 20:31:05 +02:00

13 lines
492 B
Text

--- CMakeLists.txt.orig 2021-04-07 12:23:46 UTC
+++ CMakeLists.txt
@@ -408,6 +408,10 @@ test_big_endian (HAVE_BIGENDIAN)
if (HAVE_BIGENDIAN)
add_definitions (-DHAVE_BIGENDIAN)
endif ()
+# CMake 3.20 doesn't do the tests internally in TestBigEndian
+# that end up setting HAVE_STDINT_H and similar.
+include(CheckTypeSize)
+CHECK_TYPE_SIZE("unsigned short" CMAKE_SIZEOF_UNSIGNED_SHORT LANGUAGE C)
# Force certain components to always be built as release
macro (force_release_build)