From 37f555189dbb43b2989c3a095074bb84ad22e05b Mon Sep 17 00:00:00 2001 From: "timo.jyrinki@canonical.com" <> Date: Thu, 21 Jun 2012 16:40:10 +0100 Subject: Fix building on ARM without OpenGL (only EGL + OpenGL ES). A successful build also needed the -fPIC addition for arm. (bzr r2434.3.1) --- unity-standalone/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'unity-standalone') diff --git a/unity-standalone/CMakeLists.txt b/unity-standalone/CMakeLists.txt index 6ebe4cc21..fba9322b4 100644 --- a/unity-standalone/CMakeLists.txt +++ b/unity-standalone/CMakeLists.txt @@ -10,13 +10,17 @@ set (CFLAGS "-I${CMAKE_CURRENT_BINARY_DIR}" ) -if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") +if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") set (CFLAGS ${CFLAGS} "-fPIC") endif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") add_definitions (${CFLAGS}) -set (LIBS ${CACHED_UNITY_DEPS_LIBRARIES} "-lunity-core-${UNITY_API_VERSION} -lm -lGL -lGLU") +if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") + set (LIBS ${CACHED_UNITY_DEPS_LIBRARIES} "-lunity-core-${UNITY_API_VERSION} -lm") +else() + set (LIBS ${CACHED_UNITY_DEPS_LIBRARIES} "-lunity-core-${UNITY_API_VERSION} -lm -lGL -lGLU") +endif() link_libraries (${LIBS}) set (LIB_PATHS ${CACHED_UNITY_DEPS_LIBRARY_DIRS}) -- cgit v1.2.3