Skip to content

Update CMakeLists and model enum #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ out
# Other
build
build_imx
build_*
16 changes: 15 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,21 @@ protobuf_generate_python(PROTO_PY ${ProtoFiles})

add_library(blueyeprotocol SHARED ${ProtoSources} ${ProtoHeaders})

target_link_libraries(blueyeprotocol PUBLIC ${PROTOBUF_LIBRARIES})
set(EXT_LIBS
${PROTOBUF_LIBRARIES}
)

# For protobuf linking. Should rather user find_package(protobuf CONFIG REQUIRED) but that fails in yocto
find_package(absl QUIET)

if(absl_FOUND)
list(APPEND EXT_LIBS
absl::log_internal_message
absl::log_internal_check_op
)
endif()

target_link_libraries(blueyeprotocol PUBLIC ${EXT_LIBS})
target_include_directories(blueyeprotocol PUBLIC ${PROTOBUF_INCLUDE_DIRS})

install(TARGETS blueyeprotocol
Expand Down
8 changes: 7 additions & 1 deletion cmake/blueyeprotocolConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ set_and_check(blueyeprotocol_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
set_and_check(blueyeprotocol_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIR@")
set_and_check(blueyeprotocol_LIB_DIR "@PACKAGE_LIB_INSTALL_DIR@")
set_and_check(blueyeprotocol_LIB_DIRS "@PACKAGE_LIB_INSTALL_DIR@")
set(blueyeprotocol_LIBRARIES blueyeprotocol)
set(blueyeprotocol_LIBRARIES blueyeprotocol)

find_package(absl QUIET)

if(absl_FOUND)
link_libraries(absl::log_internal_message absl::log_internal_check_op)
endif()
1 change: 1 addition & 0 deletions protobuf_definitions/message_formats.proto
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ enum Model {
MODEL_PRO = 2; // Blueye Pro, features camera tilt
MODEL_X1 = 4; // Blueye X1, features camera tilt and one guest port
MODEL_X3 = 3; // Blueye X3, features support for peripherals
MODEL_X3_ULTRA = 6; // Blueye X3 Ultra
MODEL_NEXT = 5; // Blueye ?
}

Expand Down