1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- 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_AUTOMOC 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
- include/MainWindow.hpp
- src/MainWindow.cpp
- include/OSGWidget.hpp
- src/OSGWidget.cpp
- src/PickHandler.cpp
- src/main.cpp
- )
- INCLUDE_DIRECTORIES(
- ${${OPENSCENEGRAPH_PREFIX}_SOURCE_DIR}/include
- ${${LIB3MF_PREFIX}_BINARY_DIR}/Autogenerated/Bindings/Cpp
- ${${JSON_PREFIX}_SOURCE_DIR}/include
- include
- )
- TARGET_LINK_LIBRARIES(TrackpointApp
- 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)
|