Mercurial > hg > orthanc
changeset 7024:a412fcd67ae6 default
allow cross-compiling DCMTK to MIPS
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Wed, 08 Jul 2026 11:45:33 +0200 |
| parents | cb751bdccb15 |
| children | a998c3b34bf4 |
| files | OrthancFramework/Resources/CMake/DcmtkConfigurationStatic-3.7.0.cmake |
| diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/DcmtkConfigurationStatic-3.7.0.cmake Wed Jul 08 10:17:35 2026 +0200 +++ b/OrthancFramework/Resources/CMake/DcmtkConfigurationStatic-3.7.0.cmake Wed Jul 08 11:45:33 2026 +0200 @@ -110,10 +110,19 @@ # C_CHAR_UNSIGNED *must* be set before calling "GenerateDCMTKConfigure.cmake" IF (CMAKE_CROSSCOMPILING) + message(STATUS "Cross-compiling to CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME STREQUAL "Windows") # MinGW SET(C_CHAR_UNSIGNED 1 CACHE INTERNAL "Whether char is unsigned.") + elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(mips|mips64|mipsel|mips64el)$") + message(STATUS "Target architecture is MIPS, the char type should be unsigned (rough guess)") + SET(C_CHAR_UNSIGNED 0 CACHE INTERNAL "") + else() + SET(C_CHAR_UNSIGNED 1 CACHE INTERNAL "") + endif() + elseif(CMAKE_SYSTEM_NAME STREQUAL "Emscripten") # WebAssembly or asm.js # Check out "../WebAssembly/ArithmeticTests/" to regenerate the
