From 1054fd1992a8c4035d7a276a1d73e85c005cd33f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sat, 12 Jul 2014 13:50:12 +0300 Subject: [PATCH] Fix CMakeLists.txt to not unconditionally add include paths to native system headers in /usr/include and /usr/local/include, which contain include files for the host architecture, and not the target architecture that is being compiled for. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d9b5a4e5..b04f3f290 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -214,7 +214,7 @@ IF (USE_GLUT) ENDIF (GLUT_FOUND) ENDIF (MSVC) - IF(NOT WIN32 AND NOT APPLE) + IF(NOT WIN32 AND NOT APPLE AND NOT CMAKE_CROSSCOMPILING) # This is added for linux. This should always work if everything is installed and working fine. SET(GLUT_INCLUDE_DIR /usr/include /usr/local/include) ENDIF()