summaryrefslogtreecommitdiff
path: root/unity-standalone
diff options
authortimo.jyrinki@canonical.com <>2012-06-21 16:40:10 +0100
committertimo.jyrinki@canonical.com <>2012-06-21 16:40:10 +0100
commit37f555189dbb43b2989c3a095074bb84ad22e05b (patch)
treece0fbb2bf550f61ad820032130b95ea81ae0428d /unity-standalone
parent5afe62f748eaba7827cb6982618148431af7795a (diff)
Fix building on ARM without OpenGL (only EGL + OpenGL ES). A successful build also needed the -fPIC addition for arm.
(bzr r2434.3.1)
Diffstat (limited to 'unity-standalone')
-rw-r--r--unity-standalone/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
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})