Skip to content

Commit

Permalink
ensure that grpc and protobuf aren't used
Browse files Browse the repository at this point in the history
Contributes to NP-5
  • Loading branch information
jellespijker committed Jan 24, 2024
1 parent 6f0e8fc commit dbfc66d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
14 changes: 8 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,23 @@ option(ENABLE_MORE_COMPILER_OPTIMIZATION_FLAGS "Enable more optimization flags"
option(USE_SYSTEM_LIBS "Use the system libraries if available" OFF)
option(OLDER_APPLE_CLANG "Apple Clang <= 13 used" OFF)

# Generate the plugin types
find_package(protobuf REQUIRED)
option(OLDER_APPLE_CLANG "Apple Clang <= 13 used" OFF)

MESSAGE(STATUS "Compiling with plugins support: ${ENABLE_PLUGINS}")
if (${ENABLE_ARCUS} OR ${ENABLE_PLUGINS})
find_package(protobuf REQUIRED)
endif ()

MESSAGE(STATUS "Building with plugins support: ${ENABLE_PLUGINS}")
if (${ENABLE_PLUGINS})
find_package(asio-grpc REQUIRED)
find_package(gRPC REQUIRED)
find_package(curaengine_grpc_definitions REQUIRED)
find_package(semver REQUIRED)
MESSAGE(STATUS "Plugin secure remotes allowed: ${ENABLE_REMOTE_PLUGINS}")
endif ()

if (ENABLE_ARCUS)
message(STATUS "Building with Arcus")
message(STATUS "Building with Arcus: ${ENABLE_ARCUS}")
if (${ENABLE_ARCUS})
find_package(arcus REQUIRED)
protobuf_generate_cpp(engine_PB_SRCS engine_PB_HEADERS Cura.proto)
endif ()
Expand Down Expand Up @@ -200,7 +203,6 @@ find_package(spdlog REQUIRED)
find_package(fmt REQUIRED)
find_package(range-v3 REQUIRED)
find_package(scripta REQUIRED)
find_package(semver REQUIRED)

if (ENABLE_SENTRY)
find_package(sentry REQUIRED)
Expand Down
3 changes: 2 additions & 1 deletion conandata.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: "5.7.0-alpha.1"
requirements:
- "arcus/5.3.1"
- "scripta/0.1.0@ultimaker/testing"
requirements_arcus:
- "arcus/5.3.1"
requirements_plugins:
- "curaengine_grpc_definitions/(latest)@ultimaker/testing"
12 changes: 6 additions & 6 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def config_options(self):
def configure(self):
self.options["boost"].header_only = True
self.options["clipper"].shared = True
self.options["protobuf"].shared = False
if self.options.enable_arcus or self.options.enable_plugins:
self.options["protobuf"].shared = False
if self.options.enable_arcus:
self.options["arcus"].shared = True
if self.settings.os == "Linux":
Expand Down Expand Up @@ -101,28 +102,27 @@ def build_requirements(self):

def requirements(self):
for req in self.conan_data["requirements"]:
if "arcus" in req and not self.options.enable_arcus:
continue
self.requires(req)
if self.options.enable_arcus:
for req in self.conan_data["requirements_arcus"]:
self.requires(req)
if self.options.get_safe("enable_sentry", False):
self.requires("sentry-native/0.6.5")
if self.options.enable_plugins:
self.requires("neargye-semver/0.3.0")
self.requires("asio-grpc/2.6.0")
self.requires("grpc/1.50.1")
for req in self.conan_data["requirements_plugins"]:
self.requires(req)
if self.options.enable_arcus or self.options.enable_plugins:
self.requires("protobuf/3.21.9")
self.requires("asio-grpc/2.6.0")
self.requires("grpc/1.50.1")
self.requires("clipper/6.4.2@ultimaker/stable")
self.requires("boost/1.82.0")
self.requires("rapidjson/1.1.0")
self.requires("stb/20200203")
self.requires("spdlog/1.12.0")
self.requires("fmt/10.1.1")
self.requires("range-v3/0.12.0")
self.requires("neargye-semver/0.3.0")
self.requires("zlib/1.2.12")
self.requires("openssl/3.2.0")

Expand Down

0 comments on commit dbfc66d

Please sign in to comment.