From 1fc6908e047cd6cc1a75a8adaa3fa0c7fbbc8d37 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 31 Oct 2015 19:11:45 -0700 Subject: [PATCH] compiling on arm? relocation is gonna fail unless position-independent --- src/libprojectM/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libprojectM/CMakeLists.txt b/src/libprojectM/CMakeLists.txt index 6d584f675..9dd11f912 100644 --- a/src/libprojectM/CMakeLists.txt +++ b/src/libprojectM/CMakeLists.txt @@ -234,6 +234,11 @@ else(MSVC) SET (MATH_LIBRARIES m) endif(MSVC) +# compiling on arm? relocation is gonna fail unless position-independent +IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l" ) + SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-fPIC") +ENDIF( CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l" ) + if(BUILD_PROJECTM_STATIC) TARGET_LINK_LIBRARIES(projectM Renderer ${IMAGE_LINK_TARGETS}