CMAKE_MINIMUM_REQUIRED(VERSION 3.19) PROJECT(TrackpointApp VERSION 0.0.1 LANGUAGES CXX) # Include modules INCLUDE(FetchContent) # Build TrackpointApp # Set C++ mode SET(CMAKE_CXX_STANDARD 20) SET(CMAKE_CXX_STANDARD_REQUIRED True) SET(CMAKE_CXX_FLAGS_DEBUG "-O0") SET(CMAKE_CXX_FLAGS_RELEASE "-O2") SET(CMAKE_AUTOUIC ON) SET(CMAKE_AUTOMOC ON) SET(CMAKE_AUTORCC ON) SET(CMAKE_INCLUDE_CURRENT_DIR ON) # OpenSceneGraph INCLUDE(thirdparty/openscenegraph.cmake) # lib3mf INCLUDE(thirdparty/lib3mf.cmake) # Json INCLUDE(thirdparty/json.cmake) # Qt #INCLUDE(thirdparty/qt.cmake) find_package(Qt6 COMPONENTS Widgets OpenGLWidgets REQUIRED) # The executable we want to build ADD_EXECUTABLE(TrackpointApp src/main.cpp src/MainWindow.cpp include/MainWindow.hpp gui/MainWindow.ui include/OSGWidget.hpp src/OSGWidget.cpp src/PickHandler.cpp src/StoreHandler.cpp src/TrackPoint.cpp src/ThreeMFWriter.cpp src/OpenScadRenderer.cpp ) INCLUDE_DIRECTORIES( ${${OPENSCENEGRAPH_PREFIX}_SOURCE_DIR}/include ${${LIB3MF_PREFIX}_BINARY_DIR}/Autogenerated/Bindings/Cpp ${${JSON_PREFIX}_SOURCE_DIR}/include include gui ) TARGET_LINK_LIBRARIES(TrackpointApp osg osgViewer osgDB osgGA osgText osgUtil lib3mf nlohmann_json::nlohmann_json Qt6::Core Qt6::Widgets Qt6::OpenGLWidgets ) # Header to have version number available in the code CONFIGURE_FILE(src/trackpointapp.hpp.in src/trackpointapp.hpp)