Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuebel committed Aug 29, 2024
1 parent 93002af commit 3bd25bc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
16 changes: 8 additions & 8 deletions fri/fri/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.0.2)
project(fri)

find_package(catkin REQUIRED COMPONENTS nanopb)

catkin_package(
INCLUDE_DIRS include
LIBRARIES fri_lib
LIBRARIES ${PROJECT_NAME}_lib
CATKIN_DEPENDS nanopb
)
include_directories(${catkin_INCLUDE_DIRS} include ${CMAKE_CURRENT_SOURCE_DIR}/include)

# Define target
add_library(fri_lib
add_library(${PROJECT_NAME}_lib
src/friClientApplication.cpp
src/friCommandMessageEncoder.cpp
src/friLBRClient.cpp
Expand All @@ -26,15 +26,15 @@ add_library(fri_lib

# Add compile options
if(MSVC)
target_compile_options(fri_lib
target_compile_options(${PROJECT_NAME}_lib
PRIVATE -DPB_SYSTEM_HEADER=<nanopb/pb_syshdr_win.h>
-DPB_FIELD_16BIT
-DWIN32
-DHAVE_STDINT_H
-DHAVE_STDBOOL_H
)
else()
target_compile_options(fri_lib
target_compile_options(${PROJECT_NAME}_lib
PRIVATE
-O2
-Wall
Expand All @@ -49,15 +49,15 @@ else()
endif()

# Add include directories for target
target_include_directories(fri_lib PUBLIC include PRIVATE src)
target_include_directories(${PROJECT_NAME}_lib PUBLIC include PRIVATE src)

# Link against dependencies
target_link_libraries(fri_lib
target_link_libraries(${PROJECT_NAME}_lib
${catkin_LIBRARIES}
)

# Install
install(TARGETS fri_lib
install(TARGETS ${PROJECT_NAME}_lib
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
Expand Down
22 changes: 10 additions & 12 deletions fri/nanopb/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.0.2)
project(nanopb)

find_package(catkin REQUIRED)

catkin_package(
INCLUDE_DIRS include
LIBRARIES nanopb
LIBRARIES ${PROJECT_NAME}
)

include_directories(${catkin_INCLUDE_DIRS} include ${CMAKE_CURRENT_SOURCE_DIR}/include)
# Define target
add_library(nanopb
add_library(${PROJECT_NAME}
src/pb_decode.c
src/pb_encode.c
)



if(MSVC)
target_compile_options(nanopb
target_compile_options(${PROJECT_NAME}
PRIVATE
-DPB_SYSTEM_HEADER=<nanopb/pb_syshdr_win.h>
-DPB_SYSTEM_HEADER=<${PROJECT_NAME}/pb_syshdr_win.h>
-DPB_FIELD_16BIT
-DWIN32
-DHAVE_STDINT_H
-DHAVE_STDBOOL_H
)
else()
target_compile_options(nanopb
target_compile_options(${PROJECT_NAME}
PRIVATE
-O2
-Wall
-DHAVE_SOCKLEN_T
-DPB_SYSTEM_HEADER=<nanopb/pb_syshdr.h>
-DPB_SYSTEM_HEADER=<${PROJECT_NAME}/pb_syshdr.h>
-DPB_FIELD_16BIT
-DHAVE_STDINT_H
-DHAVE_STDDEF_H
Expand All @@ -43,12 +41,12 @@ else()
endif()

# Add include directories for target
target_include_directories(nanopb PUBLIC include PRIVATE src
target_include_directories(${PROJECT_NAME} PUBLIC include PRIVATE src
)
target_link_libraries(nanopb ${catkin_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})
# Install
install(
TARGETS nanopb
TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
Expand Down
Empty file modified lbrmed_msgs/config/lbrmed_impedance_fri.cfg
100644 → 100755
Empty file.

0 comments on commit 3bd25bc

Please sign in to comment.