Skip to content

Commit

Permalink
v1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Allen committed Jul 10, 2019
1 parent 46620c7 commit f9b43c3
Show file tree
Hide file tree
Showing 17 changed files with 227 additions and 171 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Cepton ROS Release Notes

## Version 1.14 2019-06-10
* Update sdk.

## Version 1.13 2019-05-01
* Update sdk.

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.1)
project(cepton_ros
VERSION 1.13.0
VERSION 1.14.0
LANGUAGES C CXX)

# ------------------------------------------------------------------------------
Expand Down
7 changes: 3 additions & 4 deletions third_party/cepton_sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,21 @@ project(cepton_sdk
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include("CeptonCommon")

create_option(BOOL CEPTON_SDK_USE_STATIC TRUE
create_option(BOOL CEPTON_SDK_USE_STATIC FALSE
"Use static cepton sdk libraries.")

if(NOT TARGET cepton_sdk::cepton_sdk)
if(CEPTON_SDK_USE_STATIC)
cepton_get_static_library(CEPTON_SDK_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}" "cepton_sdk")
add_library(cepton_sdk::cepton_sdk STATIC IMPORTED GLOBAL)
cepton_import_static_library(cepton_sdk::cepton_sdk "${CMAKE_CURRENT_SOURCE_DIR}" "cepton_sdk")
set_target_properties(cepton_sdk::cepton_sdk PROPERTIES
INTERFACE_COMPILE_DEFINITIONS CEPTON_SDK_STATIC
)
else()
cepton_get_shared_library(CEPTON_SDK_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}" "cepton_sdk")
add_library(cepton_sdk::cepton_sdk SHARED IMPORTED GLOBAL)
cepton_import_shared_library(cepton_sdk::cepton_sdk "${CMAKE_CURRENT_SOURCE_DIR}" "cepton_sdk")
endif()
set_target_properties(cepton_sdk::cepton_sdk PROPERTIES
IMPORTED_LOCATION ${CEPTON_SDK_LIBRARY}
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include"
)
endif()
92 changes: 48 additions & 44 deletions third_party/cepton_sdk/cmake/CeptonCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -131,24 +131,6 @@ macro(ADD_EXTERNAL_SUBDIRECTORY source_dir)
message(STATUS "--------------------------------------------------------------------------------")
endmacro()

macro(CEPTON_GET_SHARED_LIBRARY result root lib_name)
if(WINDOWS)
set(${result} "${root}/bin/${OS_NAME}/${lib_name}.dll")
elseif(APPLE)
set(${result} "${root}/lib/${OS_NAME}/${lib_name}.dylib")
elseif(LINUX)
set(${result} "${root}/lib/${OS_NAME}/lib${lib_name}.so")
endif()
endmacro()

macro(CEPTON_GET_STATIC_LIBRARY result root lib_name)
if(WINDOWS)
set(${result} "${root}/lib/${OS_NAME}/${lib_name}.lib")
elseif(APPLE OR LINUX)
set(${result} "${root}/lib/${OS_NAME}/lib${lib_name}.a")
endif()
endmacro()

# ------------------------------------------------------------------------------
# Variables
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -237,31 +219,53 @@ endif()
# ------------------------------------------------------------------------------
set(CMAKE_CXX_STANDARD 11)

if(MSVC)
list(APPEND CEPTON_FLAGS
/wd4996 # Disable depricated warning
/wd4100 # Disable unused warnings
/wd4800 /wd4267 /wd4244 /wd4018 /wd4309 /wd4305 # Disable type conversion warnings
)
elseif(GCC OR CLANG)
list(APPEND CEPTON_FLAGS
-Wall # Enable warnings
-Wno-sign-compare # Disable type conversion warnings
-Wno-missing-field-initializers # Disable struct initialization warning
-Wno-unused-parameter -Wno-unused-function -Wno-unused-variable -Wno-unused-local-typedefs # Disable unused warnings
-Wno-attributes
)
if(CLANG)
list(APPEND CEPTON_FLAGS
-Wno-unused-private-field # Disable unused warnings
-Wno-unused-command-line-argument # Disable extra arguments warning
-Wno-inconsistent-missing-override
-Wno-missing-braces # Bug in clang
-Wno-unused-lambda-capture # Disable unused warning
)
elseif(GCC)
list(APPEND CEPTON_FLAGS
-Wno-terminate
# ------------------------------------------------------------------------------
# Libraries
# ------------------------------------------------------------------------------
if(WINDOWS)
set(CEPTON_SHARED_LIBRARY_EXTENSION ".dll")
set(CEPTON_STATIC_LIBRARY_EXTENSION ".lib")
elseif(APPLE)
set(CEPTON_SHARED_LIBRARY_EXTENSION ".dylib")
set(CEPTON_STATIC_LIBRARY_EXTENSION ".a")
elseif(LINUX)
set(CEPTON_SHARED_LIBRARY_EXTENSION ".so")
set(CEPTON_STATIC_LIBRARY_EXTENSION ".a")
endif()

macro(CEPTON_GET_SHARED_LIBRARY result root lib_name)
if(WINDOWS)
set(${result} "${root}/bin/${OS_NAME}/${lib_name}")
elseif(APPLE)
set(${result} "${root}/lib/${OS_NAME}/${lib_name}")
elseif(LINUX)
set(${result} "${root}/lib/${OS_NAME}/lib${lib_name}")
endif()
endmacro()

macro(CEPTON_GET_STATIC_LIBRARY result root lib_name)
if(WINDOWS)
set(${result} "${root}/lib/${OS_NAME}/${lib_name}")
elseif(APPLE OR LINUX)
set(${result} "${root}/lib/${OS_NAME}/lib${lib_name}")
endif()
endmacro()

macro(CEPTON_IMPORT_SHARED_LIBRARY lib root lib_name)
cepton_get_shared_library(cepton_import_shared_library_path "${root}" "${lib_name}")
set_target_properties(${lib} PROPERTIES
IMPORTED_LOCATION "${cepton_import_shared_library_path}${CEPTON_SHARED_LIBRARY_EXTENSION}"
)
if(WINDOWS)
set_target_properties(${lib} PROPERTIES
IMPORTED_IMPLIB "${cepton_import_shared_library_path}.imp.lib"
)
endif()
endif()
endmacro()

macro(CEPTON_IMPORT_STATIC_LIBRARY lib root lib_name)
cepton_get_static_library(cepton_import_static_library_path "${root}" "${lib_name}")
set_target_properties(${lib} PROPERTIES
IMPORTED_LOCATION "${cepton_import_static_library_path}${CEPTON_STATIC_LIBRARY_EXTENSION}"
)
endmacro()
Loading

0 comments on commit f9b43c3

Please sign in to comment.