oe-sdk_cross.cmake: 'make install' now targets oe sysroot
[contrib/mraa.git] / cmake / Toolchains / oe-sdk_cross.cmake
1 # this toolchain file comes from gnuradio project
2
3 set( CMAKE_SYSTEM_NAME Linux )
4 #set( CMAKE_C_COMPILER  $ENV{CC} )
5 #set( CMAKE_CXX_COMPILER  $ENV{CXX} )
6 string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT})
7 string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
8 set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS}  CACHE STRING "" FORCE )
9 set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE ) #same flags for C sources
10 set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE ) #same flags for C sources
11 set( CMAKE_LIBRARY_PATH ${OECORE_TARGET_SYSROOT}/usr/lib )
12 set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} )
13 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
14 set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
15 set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
16 set( CMAKE_INSTALL_PREFIX $ENV{OECORE_TARGET_SYSROOT}/usr CACHE STRING "" FORCE)
17 set( ORC_INCLUDE_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/include/orc-0.4 )
18 set( ORC_LIBRARY_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/lib )
19