From b0bd0f82685b2917b8866f70c811dc43a1e7ced4 Mon Sep 17 00:00:00 2001 From: Link4Electronics Date: Thu, 23 Oct 2025 04:22:55 -0300 Subject: [PATCH 1/3] TestBigEndian got deprecated with this and the patch for BRender-v1.3.2 repo this matter should be done now. --- CMakeLists.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e86658c..b2e7dda8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,6 @@ endif() include(CheckCCompilerFlag) include(CMakeDependentOption) -include(TestBigEndian) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION") file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" DETHRACE_VERSION) @@ -86,7 +85,17 @@ function(add_compile_flags_if_supported TARGET) endforeach() endfunction() -test_big_endian(IS_BIGENDIAN) +#test_big_endian(IS_BIGENDIAN) +if(CMAKE_C_BYTE_ORDER STREQUAL "BIG_ENDIAN") + set(WORDS_BIGENDIAN TRUE) + add_definitions(-DBR_ENDIAN_BIG=1 -DBR_ENDIAN_LITTLE=0) +elseif(CMAKE_C_BYTE_ORDER STREQUAL "LITTLE_ENDIAN") + set(WORDS_BIGENDIAN FALSE) + add_definitions(-DBR_ENDIAN_BIG=0 -DBR_ENDIAN_LITTLE=1) +else() + set(WORDS_BIGENDIAN FALSE) + message(WARNING "Endianness could not be determined.") +endif() set(count_sdl_platforms 0) From bb26bf8c47f7367921e957bfbea81dfe21667668 Mon Sep 17 00:00:00 2001 From: Link4Electronics Date: Thu, 23 Oct 2025 04:43:17 -0300 Subject: [PATCH 2/3] Remove # comment --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b2e7dda8..5ae18291 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,6 @@ function(add_compile_flags_if_supported TARGET) endforeach() endfunction() -#test_big_endian(IS_BIGENDIAN) if(CMAKE_C_BYTE_ORDER STREQUAL "BIG_ENDIAN") set(WORDS_BIGENDIAN TRUE) add_definitions(-DBR_ENDIAN_BIG=1 -DBR_ENDIAN_LITTLE=0) From 9321934b92b97eb1f36aa2ccd229f48cd4541fd8 Mon Sep 17 00:00:00 2001 From: Link4Electronics Date: Thu, 23 Oct 2025 17:38:38 -0300 Subject: [PATCH 3/3] Update minimum required CMake version to 3.20 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ae18291..0465004d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.20) if(NOT DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE)