Skip to content

Commit

Permalink
OSDK 3.4: support for Matrice 210 and 210 RTK. Added cmake file
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelWangDJI committed Nov 22, 2017
1 parent 428d9ff commit af89ee0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.

INPUT = osdk-core/api/src osdk-core/api/inc osdk-core/platform/linux/inc osdk-core/platform/linux/src doc/doxygen-resources/doxygen-mainpage.hpp
INPUT = osdk-core/api/src osdk-core/api/inc osdk-core/platform/linux/inc osdk-core/platform/linux/src osdk-core/hal/inc/dji_log.hpp osdk-core/hal/src/dji_log.cpp doc/doxygen-resources/doxygen-mainpage.hpp

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
35 changes: 35 additions & 0 deletions contrib/DJIConfig.cmake
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()

0 comments on commit af89ee0

Please sign in to comment.