File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ endif()
3939verify_package(Threads REQUIRED)
4040verify_package(Eigen3 REQUIRED)
4141verify_package(CodeSynthesis REQUIRED)
42- verify_package(Protobuf REQUIRED )
42+ verify_package(Protobuf QUIET )
4343
4444if (Biogears_BUILD_PYTHON_BINDINGS)
4545 verify_package(pybind11 REQUIRED)
@@ -77,6 +77,9 @@ set_source_files_properties(${XSD_FILES} PROPERTIES
7777 TRUE FOLDER schema
7878)
7979
80+
81+ option (Biogears_USE_PROTO "Enable very experimental PROTOBUFF Support [DEVELOPER ONLY]" OFF )
82+ if (Biogears_USE_PROTO)
8083# Proto Buffs
8184file (GLOB_RECURSE PROTO_FILES CMAKE_CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR} /share/proto/*.proto)
8285
@@ -103,6 +106,7 @@ set_source_files_properties(${PROTO_FILES} PROPERTIES
103106 HEADER_FILE_ONLY
104107 TRUE FOLDER schema)
105108
109+ endif ()
106110# Version Source Code
107111set_target_properties (xsd_bindings PROPERTIES FOLDER "Code Generators" )
108112
Original file line number Diff line number Diff line change @@ -43,8 +43,10 @@ set(LIBBIO_CDM_SOURCES ${CDM_PUBLIC_SRCS} ${CDM_XSD_SRCS} ${CDM_PROTO_SRCS})
4343 CXX_STANDARD 20
4444 )
4545 set_target_properties (libbiogears_cdm PROPERTIES SOVERSION "${Biogears_LIB_VERSION} " )
46- add_dependencies (libbiogears_cdm xsd_bindings proto_bindings)
47-
46+ add_dependencies (libbiogears_cdm xsd_bindings )
47+ if (Biogears_USE_PROTO)
48+ add_dependencies (libbiogears_cdm proto_bindings>)
49+ endif ()
4850 ###############################################################################
4951 # libBiogears_cdm COMPILATION & LINKAGE MODIFICATIONS
5052 ###############################################################################
@@ -62,7 +64,7 @@ set(LIBBIO_CDM_SOURCES ${CDM_PUBLIC_SRCS} ${CDM_XSD_SRCS} ${CDM_PROTO_SRCS})
6264
6365 set (BIO_cdm_LIBS
6466 CodeSynthesis::XSD
65- protobuf::libprotobuf
67+ $<$< BOOL : ${Biogears_USE_PROTO} >: protobuf::libprotobuf>
6668 Eigen3::Eigen
6769 )
6870 target_link_libraries (libbiogears_cdm PUBLIC ${BIO_cdm_LIBS} )
You can’t perform that action at this time.
0 commit comments