-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OSDK 3.4: support for Matrice 210 and 210 RTK. Added cmake file
- Loading branch information
1 parent
428d9ff
commit af89ee0
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#Detecting target architecture to decide which precompiled library to link against | ||
|
||
if((CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64") AND (CMAKE_SIZEOF_VOID_P EQUAL 8)) | ||
set(TARGET_ARCH "x86_64") | ||
elseif((CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|x86|AMD64") AND (CMAKE_SIZEOF_VOID_P EQUAL 4)) | ||
set(TARGET_ARCH "x86") | ||
elseif((CMAKE_SYSTEM_PROCESSOR MATCHES "^arm*") OR (CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch*")) | ||
set(TARGET_ARCH "arm") | ||
if(CMAKE_SIZEOF_VOID_P EQUAL 4) | ||
set(PROC_VERSION "v7") | ||
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) | ||
set(PROC_VERSION "v8") | ||
endif() | ||
endif() | ||
|
||
#Detect platform - from https://gist.github.com/CoolerVoid/1781717 | ||
EXECUTE_PROCESS( | ||
COMMAND cat /etc/lsb-release | ||
COMMAND grep DISTRIB_RELEASE | ||
COMMAND awk -F= "{ print $2 }" | ||
COMMAND tr "\n" " " | ||
COMMAND sed "s/ //" | ||
OUTPUT_VARIABLE LSB_VER | ||
) | ||
|
||
if( ${LSB_VER} STREQUAL "16.04") | ||
set(DISTRO_VERSION 1604) | ||
elseif(${LSB_VER} STREQUAL "14.04") | ||
set(DISTRO_VERSION 1404) | ||
elseif(${LSB_VER} STREQUAL "18") | ||
set(DISTRO_VERSION 1604) | ||
else() | ||
set(DISTRO_VERSION UNKNOWN) | ||
endif() | ||
|