11#Copyright (c) 2020 Ultimaker B.V.
2- #CuraEngine is released under the terms of the AGPLv3 or higher.
2+ #LunarSlicer is released under the terms of the AGPLv3 or higher.
33
44cmake_minimum_required (VERSION 3.6.0)
55
6- project (CuraEngine )
6+ project (LunarSlicer VERSION 1.0.0 )
77
88list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake" )
99
10- option (ENABLE_ARCUS "Enable support for ARCUS" ON )
10+ option (ENABLE_ARCUS "Enable support for ARCUS" OFF )
1111
1212if (MSVC )
1313 option (MSVC_STATIC_RUNTIME "Link the MSVC runtime statically" OFF )
@@ -62,7 +62,7 @@ option(BUILD_TESTS OFF)
6262
6363# Add a compiler flag to check the output for insane values if we are in debug mode.
6464if (CMAKE_BUILD_TYPE_UPPER MATCHES "DEBUG" OR CMAKE_BUILD_TYPE_UPPER MATCHES "RELWITHDEBINFO" )
65- message (STATUS "Building debug release of CuraEngine ." )
65+ message (STATUS "Building debug release of LunarSlicer ." )
6666 if (NOT MSVC )
6767 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -O0 -g -fno-omit-frame-pointer" )
6868 endif ()
@@ -263,27 +263,27 @@ if (ENABLE_ARCUS)
263263 protobuf_generate_cpp(engine_PB_SRCS engine_PB_HEADERS Cura.proto)
264264endif ()
265265
266- # Compiling CuraEngine itself.
267- add_library (_CuraEngine STATIC ${engine_SRCS} ${engine_PB_SRCS} ) #First compile all of CuraEngine as library, allowing this to be re-used for tests.
266+ # Compiling LunarSlicer itself.
267+ add_library (_LunarSlicer STATIC ${engine_SRCS} ${engine_PB_SRCS} ) #First compile all of LunarSlicer as library, allowing this to be re-used for tests.
268268
269269if (CuraEngine_Download_Stb)
270- add_dependencies (_CuraEngine stb)
270+ add_dependencies (_LunarSlicer stb)
271271endif ()
272272if (USE_SYSTEM_LIBS)
273- target_link_libraries (_CuraEngine ${Polyclipping_LIBRARIES} )
273+ target_link_libraries (_LunarSlicer ${Polyclipping_LIBRARIES} )
274274else ()
275- target_link_libraries (_CuraEngine clipper)
275+ target_link_libraries (_LunarSlicer clipper)
276276endif ()
277277
278278if (ENABLE_ARCUS)
279- target_link_libraries (_CuraEngine Arcus)
279+ target_link_libraries (_LunarSlicer Arcus)
280280endif ()
281281
282- set_target_properties (_CuraEngine PROPERTIES COMPILE_DEFINITIONS "VERSION=\" ${CURA_ENGINE_VERSION} \" " )
282+ set_target_properties (_LunarSlicer PROPERTIES COMPILE_DEFINITIONS "VERSION=\" ${CURA_ENGINE_VERSION} \" " )
283283
284284if (WIN32 )
285285 message (STATUS "Using windres" )
286- set (RES_FILES "CuraEngine .rc" )
286+ # set(RES_FILES "LunarSlicer .rc")
287287 ENABLE_LANGUAGE (RC)
288288 if (NOT MSVC )
289289 SET (CMAKE_RC_COMPILER_INIT windres)
@@ -294,17 +294,17 @@ if(WIN32)
294294endif (WIN32 )
295295
296296if (UNIX )
297- target_link_libraries (_CuraEngine pthread)
297+ target_link_libraries (_LunarSlicer pthread)
298298endif ()
299299
300300if (NOT WIN32 )
301- add_executable (CuraEngine src/main.cpp) # Then compile main.cpp as separate executable, and link the library to it.
301+ add_executable (LunarSlicer src/main.cpp) # Then compile main.cpp as separate executable, and link the library to it.
302302else ()
303- add_executable (CuraEngine src/main.cpp ${RES_FILES} ) # ..., but don't forget the glitter!
303+ add_executable (LunarSlicer src/main.cpp ${RES_FILES} ) # ..., but don't forget the glitter!
304304endif (NOT WIN32 )
305305
306- target_link_libraries (CuraEngine _CuraEngine )
307- set_target_properties (CuraEngine PROPERTIES COMPILE_DEFINITIONS "VERSION=\" ${CURA_ENGINE_VERSION} \" " )
306+ target_link_libraries (LunarSlicer _LunarSlicer )
307+ set_target_properties (LunarSlicer PROPERTIES COMPILE_DEFINITIONS "VERSION=\" ${CURA_ENGINE_VERSION} \" " )
308308
309309# Compiling the test environment.
310310if (BUILD_TESTS)
@@ -317,58 +317,58 @@ if (BUILD_TESTS)
317317 find_package (GMock REQUIRED)
318318 include_directories (${GTEST_INCLUDE_DIRS} )
319319 include_directories (${GMOCK_INCLUDE_DIRS} )
320- add_dependencies (_CuraEngine GTest::GTest GTest::Main GMock::GMock GMock::Main)
320+ add_dependencies (_LunarSlicer GTest::GTest GTest::Main GMock::GMock GMock::Main)
321321 add_definitions (-DBUILD_TESTS)
322322
323- target_compile_definitions (_CuraEngine PUBLIC BUILD_TESTS=1)
323+ target_compile_definitions (_LunarSlicer PUBLIC BUILD_TESTS=1)
324324
325325 #To make sure that the tests are built before running them, add the building of these tests as an additional test.
326326 add_custom_target (build_all_tests)
327327 add_test (BuildTests "${CMAKE_COMMAND} " --build "${CMAKE_CURRENT_BINARY_DIR} " --target build_all_tests)
328328
329329 foreach (test ${engine_TEST} )
330330 add_executable (${test} tests/main.cpp ${engine_TEST_HELPERS} tests/${test} .cpp)
331- target_link_libraries (${test} _CuraEngine ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES} )
331+ target_link_libraries (${test} _LunarSlicer ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES} )
332332 add_test (NAME ${test} COMMAND "${test} " WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} /tests/" )
333333 add_dependencies (build_all_tests ${test} ) #Make sure that this gets built as part of the build_all_tests target.
334334 endforeach ()
335335 foreach (test ${engine_TEST_INFILL} )
336336 add_executable (${test} tests/main.cpp tests/infill/${test} .cpp)
337- target_link_libraries (${test} _CuraEngine ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES} )
337+ target_link_libraries (${test} _LunarSlicer ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES} )
338338 add_test (NAME ${test} COMMAND "${test} " WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} /tests/" )
339339 add_dependencies (build_all_tests ${test} ) #Make sure that this gets built as part of the build_all_tests target.
340340 endforeach ()
341341 foreach (test ${engine_TEST_INTEGRATION} )
342342 add_executable (${test} tests/main.cpp tests/integration/${test} .cpp)
343- target_link_libraries (${test} _CuraEngine ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES} )
343+ target_link_libraries (${test} _LunarSlicer ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES} )
344344 add_test (NAME ${test} COMMAND "${test} " WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} /tests/" )
345345 add_dependencies (build_all_tests ${test} ) #Make sure that this gets built as part of the build_all_tests target.
346346 endforeach ()
347347 foreach (test ${engine_TEST_SETTINGS} )
348348 add_executable (${test} tests/main.cpp tests/settings/${test} .cpp)
349- target_link_libraries (${test} _CuraEngine ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES} )
349+ target_link_libraries (${test} _LunarSlicer ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES} )
350350 add_test (NAME ${test} COMMAND "${test} " WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} /tests/" )
351351 add_dependencies (build_all_tests ${test} ) #Make sure that this gets built as part of the build_all_tests target.
352352 endforeach ()
353353 if (ENABLE_ARCUS)
354354 foreach (test ${engine_TEST_ARCUS} )
355355 add_executable (${test} tests/main.cpp ${engine_TEST_ARCUS_HELPERS} tests/arcus/${test} .cpp)
356- target_link_libraries (${test} _CuraEngine ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES} )
356+ target_link_libraries (${test} _LunarSlicer ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES} )
357357 add_test (NAME ${test} COMMAND "${test} " WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} /tests/" )
358358 add_dependencies (build_all_tests ${test} ) #Make sure that this gets built as part of the build_all_tests target.
359359 endforeach ()
360360 endif ()
361361 foreach (test ${engine_TEST_UTILS} )
362362 add_executable (${test} tests/main.cpp tests/utils/${test} .cpp)
363- target_link_libraries (${test} _CuraEngine ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES} )
363+ target_link_libraries (${test} _LunarSlicer ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES} )
364364 add_test (NAME ${test} COMMAND "${test} " WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} /tests/" )
365365 add_dependencies (build_all_tests ${test} ) #Make sure that this gets built as part of the build_all_tests target.
366366 endforeach ()
367367endif ()
368368
369- # Installing CuraEngine .
369+ # Installing LunarSlicer .
370370include (GNUInstallDirs)
371- install (TARGETS CuraEngine DESTINATION "${CMAKE_INSTALL_BINDIR} " )
371+ install (TARGETS LunarSlicer DESTINATION "${CMAKE_INSTALL_BINDIR} " )
372372# For MinGW64 cross compiling on Debian, we create a ZIP package instead of a DEB
373373# Because it's the Windows build system that should install the files.
374374if (CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME MATCHES "Windows" )
0 commit comments