123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- 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
- LIST(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_LIST_DIR}/thirdparty/qt/install")
- FIND_PACKAGE(Qt6 COMPONENTS Widgets OpenGLWidgets REQUIRED NO_CMAKE_SYSTEM_PATH)
- # The executable we want to build
- QT_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 PRIVATE
- osg osgViewer osgDB osgGA osgText osgUtil
- lib3mf
- nlohmann_json::nlohmann_json
- Qt6::Widgets
- Qt6::OpenGLWidgets
- )
- # Header to have version number available in the code
- CONFIGURE_FILE(src/trackpointapp.hpp.in src/trackpointapp.hpp)
|