Skip to content

Commit

Permalink
Merge pull request #27 from boschrexroth/bugfix/buildMDDB
Browse files Browse the repository at this point in the history
fix: direct call to the mddb compiler
  • Loading branch information
ZmRZjFuDsDiR4qi5801F committed Sep 11, 2023
2 parents 2f13e1f + 96aed35 commit 7d59544
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions samples-cpp/datalayer.register.node/CMakeLists.txt
Expand Up @@ -23,10 +23,15 @@ set (USER_DEPENDENCY_DIR ${CMAKE_CURRENT_LIST_DIR}/../../)
#
# Metadata Database
#
include(${USER_DEPENDENCY_DIR}/cmake/BuildMDDB.cmake)
# use mdd_compiler from ctrlx-datalayer debian package
exec_program(mddb_compiler
ARGS "-in ${CMAKE_CURRENT_LIST_DIR}/metadata.csv -out ${CMAKE_CURRENT_LIST_DIR}/compiled/metadata.mddb"
RETURN_VALUE result
)

set(MDDB_FILES ${CMAKE_CURRENT_LIST_DIR}/metadata.csv)
build_mddb(registernodemddb "${MDDB_FILES}" ${CMAKE_CURRENT_LIST_DIR}/compiled "")
IF( ${result})
MESSAGE(FATAL_ERROR "mddb_compiler executable not found. Please install the ctrlx-datalayer-*.deb debian package.")
ENDIF()

#
# Option to Build the Snap
Expand Down Expand Up @@ -96,7 +101,7 @@ set( FLATBUFFERS_FLATC_SCHEMA_EXTRA_ARGS "--gen-object-api")
set( FLATBUFFERS_FLATC_SCHEMA_EXTRA_ARGS "--no-warnings")
set( FLATBUFFERS_FLATC_SCHEMA_EXTRA_ARGS "--gen-compare")

build_flatbuffers("sampleSchema.fbs" "" "registernodeflatbuffers" "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}/compiled" "")
build_flatbuffers("sampleSchema.fbs" "" "registernodeflatbuffers" "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}/compiled/" "")

#
# Set link directories
Expand All @@ -116,7 +121,6 @@ add_executable( ${TARGET_PROJECT_NAME}

add_dependencies(${TARGET_PROJECT_NAME}
registernodeflatbuffers
registernodemddb
)

#
Expand Down

0 comments on commit 7d59544

Please sign in to comment.