cmake_minimum_required(VERSION 3.20) project(Renderive VERSION 1.0.0 LANGUAGES CXX) include(GNUInstallDirs) set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>") set(CMAKE_EXPORT_COMPILE_COMMANDS ON) option(RENDERIVE_BUILD_2D "Build 2D renderer" ON) option(RENDERIVE_BUILD_QT "Build Qt integration" ON) option(RENDERIVE_BUILD_WEB "Build Web integration" ON) option(RENDERIVE_BUILD_TESTS "Build tests" ON) option(RENDERIVE_BUILD_3D "Build 3D renderer" ON) if (RENDERIVE_BUILD_QT AND NOT RENDERIVE_BUILD_2D) message(FATAL_ERROR "RENDERIVE_BUILD_QT requires RENDERIVE_BUILD_2D") endif () if (RENDERIVE_BUILD_WEB AND NOT RENDERIVE_BUILD_2D) message(FATAL_ERROR "RENDERIVE_BUILD_WEB requires RENDERIVE_BUILD_2D") endif () if (RENDERIVE_BUILD_WEB AND NOT RENDERIVE_BUILD_3D) message(FATAL_ERROR "RENDERIVE_BUILD_WEB requires RENDERIVE_BUILD_3D") endif () include("${CMAKE_CURRENT_LIST_DIR}/third_party/build_infra/start.cmake") if (RENDERIVE_BUILD_TESTS) enable_testing() endif () add_subdirectory(Kernel) if (RENDERIVE_BUILD_2D) add_subdirectory(render_2D) endif () if (RENDERIVE_BUILD_3D) add_subdirectory(render_3D) endif () if (RENDERIVE_BUILD_QT) add_subdirectory(Qt) endif () if (RENDERIVE_BUILD_WEB) add_subdirectory(web_server) endif () include("${CMAKE_CURRENT_LIST_DIR}/cmake/RenderivePackage.cmake") if (TARGET Renderive_Kernel) include("${CMAKE_CURRENT_LIST_DIR}/cmake/RenderiveInstall.cmake") endif () include("${CMAKE_CURRENT_LIST_DIR}/third_party/build_infra/end.cmake")