提交 6cc80bb3 编写于 作者: R Rémi Arnaud

Merge pull request #411 from juricast/master

Workaround enabling build on MIPS architecture.
EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE )
message( STATUS "Architecture: ${ARCHITECTURE}" )
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
if(NOT DEFINED WITH_IN_SOURCE_BUILD)
......@@ -63,6 +65,11 @@ macro(opencollada_add_lib
else()
target_link_libraries(${name}_static ${target_lib})
endif()
if( ${ARCHITECTURE} MATCHES "mips" )
if(TARGET OpenCOLLADASaxFrameworkLoader_static)
SET_TARGET_PROPERTIES(OpenCOLLADASaxFrameworkLoader_static PROPERTIES COMPILE_FLAGS "-Umips")
endif()
endif()
endforeach()
set(CMAKE_REQUIRED_LIBRARIES "${name}_static;${CMAKE_REQUIRED_LIBRARIES}" PARENT_SCOPE)
......@@ -84,6 +91,11 @@ macro(opencollada_add_lib
else()
target_link_libraries(${name}_shared ${target_lib})
endif()
if( ${ARCHITECTURE} MATCHES "mips" )
if(TARGET OpenCOLLADASaxFrameworkLoader_shared)
SET_TARGET_PROPERTIES(OpenCOLLADASaxFrameworkLoader_shared PROPERTIES COMPILE_FLAGS "-Umips")
endif()
endif()
endforeach()
set(CMAKE_REQUIRED_LIBRARIES "${name}_shared;${CMAKE_REQUIRED_LIBRARIES}" PARENT_SCOPE)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册