Browse Source

For CI - attempt to fix broken multiarch support in older CMake.
This should be a non-issue when we have migrated to CMake 3.2.3 (now under development in refactor-buildsystem branch).

Yao Wei Tjong 姚伟忠 9 years ago
parent
commit
2f4ed29be8
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Source/ThirdParty/SDL/CMakeLists.txt

+ 4 - 0
Source/ThirdParty/SDL/CMakeLists.txt

@@ -488,6 +488,10 @@ if(LIBC)
     set(STDC_HEADERS 1)
   else()
     set(HAVE_LIBC TRUE)
+    # Urho3D - temporary bug fix - starting since Raspbian Jessie some of the headers are installed in the arch-specific directory and it seems that older CMake (prior to release 3.2.3) does not include this directory by default yet, so we have to do that manually
+    if (RPI AND CMAKE_LIBRARY_ARCHITECTURE)
+      include_directories (${SYSROOT}/usr/include/${CMAKE_LIBRARY_ARCHITECTURE})    # SYSROOT is empty when we are not cross-compiling
+    endif ()
     # Urho3D - bug fix - when cross-compiling the headers are rooted, either use "--sysroot" compiler flag or use CMAKE_REQUIRED_INCLUDES (e.g. on RPI) to cater for it
     set (CMAKE_REQUIRED_INCLUDES_SYS_TYPES_SAVED ${CMAKE_REQUIRED_INCLUDES})
     if (CMAKE_CROSSCOMPILING AND NOT "${CMAKE_C_FLAGS} ${CMAKE_REQUIRED_FLAGS}" MATCHES sysroot)