From 6645f50dd0211229c06a2ff7245dc1145902345c Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Tue, 5 Feb 2013 16:04:53 +0400 Subject: [PATCH] CUDA toolkit support added to crosscompilation toolchain. --- platforms/linux/arm-gnueabi-hardfp.toolchain.cmake | 7 +++++++ platforms/linux/arm-gnueabi-softfp.toolchain.cmake | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/platforms/linux/arm-gnueabi-hardfp.toolchain.cmake b/platforms/linux/arm-gnueabi-hardfp.toolchain.cmake index b307b137f0..dc7424e868 100644 --- a/platforms/linux/arm-gnueabi-hardfp.toolchain.cmake +++ b/platforms/linux/arm-gnueabi-hardfp.toolchain.cmake @@ -34,7 +34,14 @@ set(ARM_LINUX_SYSROOT /usr/arm-linux-gnueabihf CACHE PATH "ARM cross compilation set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${ARM_LINUX_SYSROOT}) +if(EXISTS ${CUDA_TOOLKIT_ROOT_DIR}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${CUDA_TOOLKIT_ROOT_DIR}) +endif() + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) +if (CARMA) + add_definitions(-DCARMA) +endif() diff --git a/platforms/linux/arm-gnueabi-softfp.toolchain.cmake b/platforms/linux/arm-gnueabi-softfp.toolchain.cmake index 73c14c3896..0c9fb3f58e 100644 --- a/platforms/linux/arm-gnueabi-softfp.toolchain.cmake +++ b/platforms/linux/arm-gnueabi-softfp.toolchain.cmake @@ -34,7 +34,14 @@ set(ARM_LINUX_SYSROOT /usr/arm-linux-gnueabi CACHE PATH "ARM cross compilation s set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${ARM_LINUX_SYSROOT}) +if(EXISTS ${CUDA_TOOLKIT_ROOT_DIR}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${CUDA_TOOLKIT_ROOT_DIR}) +endif() + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) +if (CARMA) + add_definitions(-DCARMA) +endif()