diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bb49d3668..c2a9720c99 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,10 +101,9 @@ option(ECAL_USE_CLOCKLOCK_MUTEX "Use native mutex with monotonic # -------------------------------------------------------- # ecal core configuration # -------------------------------------------------------- +set(ECAL_CORE_HAS_PROTOBUF ON) set(ECAL_CORE_BUILD_SAMPLES ${BUILD_SAMPLES}) -set(ECAL_CORE_BUILD_SAMPLES_PROTOBUF ${BUILD_SAMPLES}) set(ECAL_CORE_BUILD_TESTS ${BUILD_ECAL_TESTS}) -set(ECAL_CORE_BUILD_TESTS_PROTOBUF ${BUILD_ECAL_TESTS}) set(ECAL_CORE_CONFIG_INIFILE ON) set(ECAL_CORE_COMMAND_LINE ON) set(ECAL_CORE_REGISTRATION ON) diff --git a/ecal/CMakeLists.txt b/ecal/CMakeLists.txt index 96af1c7354..4726aeebb8 100644 --- a/ecal/CMakeLists.txt +++ b/ecal/CMakeLists.txt @@ -23,7 +23,7 @@ cmake_minimum_required(VERSION 3.13) # -------------------------------------------------------- add_subdirectory(core) -if(ECAL_CORE_BUILD_SAMPLES_PROTOBUF) +if(ECAL_CORE_HAS_PROTOBUF) add_subdirectory(core_pb) endif() diff --git a/ecal/ecal-core-options.cmake b/ecal/ecal-core-options.cmake index bcc6b7f4f1..60d20fdcef 100644 --- a/ecal/ecal-core-options.cmake +++ b/ecal/ecal-core-options.cmake @@ -1,10 +1,13 @@ +# ------------------------------------------------------------------------------------------------------------------------------------------------------------------ +# available (optional) thirdparty dependencies +# ------------------------------------------------------------------------------------------------------------------------------------------------------------------ +option(ECAL_CORE_HAS_PROTOBUF "Protobuf library is available, eCAL protobuf support will be enabled" ON) + # ------------------------------------------------------------------------------------------------------------------------------------------------------------------ # additional builds (adapt to your needs) # ------------------------------------------------------------------------------------------------------------------------------------------------------------------ option(ECAL_CORE_BUILD_SAMPLES "Build the eCAL samples" ON) -option(ECAL_CORE_BUILD_SAMPLES_PROTOBUF "Build the eCAL samples using google protobuf message definition" ON) option(ECAL_CORE_BUILD_TESTS "Build the eCAL google tests" ON) -option(ECAL_CORE_BUILD_TESTS_PROTOBUF "Build the eCAL google tests using google protobuf message definition" ON) # ------------------------------------------------------------------------------------------------------------------------------------------------------------------ # core internal feature configuration (adapt to your needs) diff --git a/ecal/samples/CMakeLists.txt b/ecal/samples/CMakeLists.txt index 2ee63b3091..a2ec6322a4 100644 --- a/ecal/samples/CMakeLists.txt +++ b/ecal/samples/CMakeLists.txt @@ -80,14 +80,14 @@ if(ECAL_CORE_MONITORING) add_subdirectory(cpp/monitoring/monitoring_get_services) add_subdirectory(cpp/monitoring/monitoring_get_topics) add_subdirectory(cpp/monitoring/monitoring_performance) - if(ECAL_CORE_BUILD_SAMPLES_PROTOBUF) + if(ECAL_CORE_HAS_PROTOBUF) add_subdirectory(cpp/monitoring/monitoring_rec) add_subdirectory(cpp/monitoring/monitoring_reg) endif() endif() # orchestration -if(ECAL_CORE_PUBLISHER AND ECAL_CORE_SUBSCRIBER AND ECAL_CORE_SERVICE AND ECAL_CORE_BUILD_SAMPLES_PROTOBUF) +if(ECAL_CORE_PUBLISHER AND ECAL_CORE_SUBSCRIBER AND ECAL_CORE_SERVICE AND ECAL_CORE_HAS_PROTOBUF) add_subdirectory(cpp/orchestration/component1) add_subdirectory(cpp/orchestration/component2) add_subdirectory(cpp/orchestration/orchestrator) @@ -99,7 +99,7 @@ if(ECAL_CORE_PUBLISHER) add_subdirectory(cpp/pubsub/binary/binary_zero_copy_snd) add_subdirectory(cpp/pubsub/binary/ping) add_subdirectory(cpp/pubsub/string/minimal_snd) - if(ECAL_CORE_BUILD_SAMPLES_PROTOBUF) + if(ECAL_CORE_HAS_PROTOBUF) add_subdirectory(cpp/pubsub/protobuf/person_events_snd) add_subdirectory(cpp/pubsub/protobuf/person_snd) endif() @@ -111,7 +111,7 @@ if(ECAL_CORE_SUBSCRIBER) add_subdirectory(cpp/pubsub/binary/pong) add_subdirectory(cpp/pubsub/string/minimal_rec) add_subdirectory(cpp/pubsub/string/minimal_rec_cb) - if(ECAL_CORE_BUILD_SAMPLES_PROTOBUF) + if(ECAL_CORE_HAS_PROTOBUF) add_subdirectory(cpp/pubsub/protobuf/person_events_rec) add_subdirectory(cpp/pubsub/protobuf/person_rec) add_subdirectory(cpp/pubsub/protobuf/proto_dyn_json_rec) @@ -123,7 +123,7 @@ if(ECAL_CORE_SUBSCRIBER) endif() if(ECAL_CORE_PUBLISHER AND ECAL_CORE_SUBSCRIBER) - if(ECAL_CORE_BUILD_SAMPLES_PROTOBUF) + if(ECAL_CORE_HAS_PROTOBUF) add_subdirectory(cpp/pubsub/protobuf/person_loopback) endif() endif() @@ -134,7 +134,7 @@ if(ECAL_CORE_SERVICE) add_subdirectory(cpp/services/latency_server) add_subdirectory(cpp/services/minimal_client) add_subdirectory(cpp/services/minimal_server) - if(ECAL_CORE_BUILD_SAMPLES_PROTOBUF) + if(ECAL_CORE_HAS_PROTOBUF) add_subdirectory(cpp/services/math_client) add_subdirectory(cpp/services/math_server) add_subdirectory(cpp/services/ping_client) diff --git a/ecal/tests/CMakeLists.txt b/ecal/tests/CMakeLists.txt index 7791c4b6b3..563d39a1c9 100644 --- a/ecal/tests/CMakeLists.txt +++ b/ecal/tests/CMakeLists.txt @@ -48,14 +48,14 @@ if(ECAL_CORE_REGISTRATION AND ECAL_CORE_PUBLISHER AND ECAL_CORE_SUBSCRIBER) if(ECAL_CORE_TRANSPORT_SHM OR ECAL_CORE_TRANSPORT_UDP) # this test is running for shm and udp layer only, needs to be fixed for tcp add_subdirectory(cpp/pubsub_test) endif() - if(ECAL_CORE_BUILD_TESTS_PROTOBUF) + if(ECAL_CORE_HAS_PROTOBUF) add_subdirectory(cpp/pubsub_proto_test) endif() endif() if(ECAL_CORE_SERVICE) add_subdirectory(cpp/clientserver_test) - if(ECAL_CORE_BUILD_TESTS_PROTOBUF) + if(ECAL_CORE_HAS_PROTOBUF) add_subdirectory(cpp/clientserver_proto_test) endif() endif()