| 1 | diff --git a/CMakeLists.txt b/CMakeLists.txt
|
| 2 | index 16af5a7e2..e519c36a8 100644
|
| 3 | |
| 4 | |
| 5 | @@ -4,8 +4,7 @@
|
| 6 | cmake_policy(SET CMP0091 NEW) # For MSVC flags, will be ignored on non-Windows OS's
|
| 7 | cmake_minimum_required(VERSION 3.20)
|
| 8 | project(CuraEngine)
|
| 9 | -find_package(standardprojectsettings REQUIRED) # imports the cmake module https://github.com/Ultimaker/conan-ultimaker-index/recipes/standardprojectsettings
|
| 10 | -AssureOutOfSourceBuilds()
|
| 11 | +list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
| 12 |
|
| 13 | option(ENABLE_ARCUS "Enable support for ARCUS" ON)
|
| 14 | option(ENABLE_TESTING "Build with unit tests" OFF)
|
| 15 | @@ -20,7 +19,7 @@ option(OLDER_APPLE_CLANG "Apple Clang <= 13 used" OFF)
|
| 16 | option(ENABLE_THREADING "Enable threading support" ON)
|
| 17 |
|
| 18 | if (${ENABLE_ARCUS} OR ${ENABLE_PLUGINS})
|
| 19 | - find_package(protobuf REQUIRED)
|
| 20 | + find_package(Protobuf REQUIRED)
|
| 21 | endif ()
|
| 22 |
|
| 23 | MESSAGE(STATUS "Building with plugins support: ${ENABLE_PLUGINS}")
|
| 24 | @@ -34,7 +33,7 @@ endif ()
|
| 25 |
|
| 26 | message(STATUS "Building with Arcus: ${ENABLE_ARCUS}")
|
| 27 | if (${ENABLE_ARCUS})
|
| 28 | - find_package(arcus REQUIRED)
|
| 29 | + find_package(Arcus REQUIRED)
|
| 30 | protobuf_generate_cpp(engine_PB_SRCS engine_PB_HEADERS Cura.proto)
|
| 31 | endif ()
|
| 32 |
|
| 33 | @@ -187,9 +186,7 @@ set(engine_SRCS # Except main.cpp.
|
| 34 | )
|
| 35 |
|
| 36 | add_library(_CuraEngine STATIC ${engine_SRCS} ${engine_PB_SRCS})
|
| 37 | -if (ENABLE_THREADING)
|
| 38 | - use_threads(_CuraEngine)
|
| 39 | -endif ()
|
| 40 | +target_compile_features(_CuraEngine PUBLIC cxx_std_20)
|
| 41 |
|
| 42 | target_include_directories(_CuraEngine
|
| 43 | PUBLIC
|
| 44 | @@ -215,20 +212,13 @@ target_compile_definitions(_CuraEngine
|
| 45 | $<$<CONFIG:Debug>:DEBUG>
|
| 46 | )
|
| 47 |
|
| 48 | -enable_sanitizers(_CuraEngine)
|
| 49 | -
|
| 50 | -if (${EXTENSIVE_WARNINGS})
|
| 51 | - set_project_warnings(_CuraEngine)
|
| 52 | -endif ()
|
| 53 | -
|
| 54 | if (ENABLE_ARCUS)
|
| 55 | - target_link_libraries(_CuraEngine PUBLIC arcus::arcus)
|
| 56 | + target_link_libraries(_CuraEngine PUBLIC Arcus)
|
| 57 | endif ()
|
| 58 |
|
| 59 | find_package(mapbox-wagyu REQUIRED)
|
| 60 | -find_package(clipper REQUIRED)
|
| 61 | +find_package(Clipper REQUIRED)
|
| 62 | find_package(RapidJSON REQUIRED)
|
| 63 | -find_package(stb REQUIRED)
|
| 64 | find_package(Boost REQUIRED)
|
| 65 | find_package(spdlog REQUIRED)
|
| 66 | find_package(fmt REQUIRED)
|
| 67 | @@ -252,14 +242,12 @@ target_link_libraries(_CuraEngine
|
| 68 | spdlog::spdlog
|
| 69 | range-v3::range-v3
|
| 70 | fmt::fmt
|
| 71 | - clipper::clipper
|
| 72 | + Clipper::Clipper
|
| 73 | mapbox-wagyu::mapbox-wagyu
|
| 74 | - rapidjson
|
| 75 | - stb::stb
|
| 76 | - boost::boost
|
| 77 | + Boost::boost
|
| 78 | scripta::scripta
|
| 79 | PNG::PNG
|
| 80 | - $<$<NOT:$<BOOL:${EMSCRIPTEN}>>:onetbb::onetbb>
|
| 81 | + $<$<NOT:$<BOOL:${EMSCRIPTEN}>>:TBB::tbb>
|
| 82 | $<$<TARGET_EXISTS:semver::semver>:semver::semver>
|
| 83 | $<$<TARGET_EXISTS:curaengine_grpc_definitions::curaengine_grpc_definitions>:curaengine_grpc_definitions::curaengine_grpc_definitions>
|
| 84 | $<$<TARGET_EXISTS:asio-grpc::asio-grpc>:asio-grpc::asio-grpc>
|
| 85 | @@ -291,10 +279,6 @@ else ()
|
| 86 | endif ()
|
| 87 | endif (NOT WIN32)
|
| 88 |
|
| 89 | -if (ENABLE_THREADING)
|
| 90 | - use_threads(CuraEngine)
|
| 91 | -endif ()
|
| 92 | -
|
| 93 | if (EMSCRIPTEN)
|
| 94 | message(STATUS "Building for Emscripten")
|
| 95 | target_link_options(_CuraEngine
|
| 96 | @@ -357,7 +341,7 @@ if (ENABLE_TESTING OR ENABLE_BENCHMARKS)
|
| 97 | $<$<TARGET_EXISTS:grpc::grpc>:grpc::grpc>
|
| 98 | $<$<TARGET_EXISTS:protobuf::libprotobuf>:protobuf::libprotobuf>)
|
| 99 | if (ENABLE_ARCUS)
|
| 100 | - target_link_libraries(test_helpers PUBLIC arcus::arcus)
|
| 101 | + target_link_libraries(test_helpers PUBLIC Arcus)
|
| 102 | endif ()
|
| 103 | endif ()
|
| 104 |
|
| 105 | @@ -372,3 +356,5 @@ if (ENABLE_TESTING)
|
| 106 | enable_testing()
|
| 107 | add_subdirectory(tests)
|
| 108 | endif ()
|
| 109 | +
|
| 110 | +install(TARGETS CuraEngine DESTINATION ${CMAKE_INSTALL_BINDIR})
|