summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 68d0a4fe64e..d5c7fd1c718 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -113,19 +113,20 @@ endif()
# cross compiling
##############################################################################
-if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- set(COMPILER_SUFFIX "linux-gnu")
-elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
- set(COMPILER_SUFFIX "freebsd")
-endif()
-
if(CMAKE_CROSSCOMPILING)
+ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(COMPILER_SUFFIX "linux-gnu")
+ elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+ set(COMPILER_SUFFIX "freebsd")
+ endif()
+
set(CMAKE_IGNORE_PATH
/usr/lib/${CMAKE_HOST_SYSTEM_PROCESSOR}-${COMPILER_SUFFIX}/
/usr/lib/${CMAKE_HOST_SYSTEM_PROCESSOR}-${COMPILER_SUFFIX}/lib/
)
-endif()
set(CMAKE_C_COMPILER_TARGET ${CMAKE_SYSTEM_PROCESSOR}-${COMPILER_SUFFIX})
+endif()
+
##############################################################################
# build config
##############################################################################