Add cmake install commands

This commit is contained in:
2025-11-10 22:58:37 +10:00
parent 7c1612be63
commit fd7cf5d457
4 changed files with 69 additions and 4 deletions

View File

@@ -17,8 +17,11 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build (Debug, Release, RelWithDebInfo, MinSizeRel)" FORCE)
endif()
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
set(NOVA_SANITIZERS "" CACHE STRING "Sanitizers to enable (address, undefined, leak)")
set(NOVA_WERROR OFF CACHE BOOL "Treat compiler warnings as errors")
set(NOVA_LIBRARY_INSTALL OFF CACHE BOOL "Enable library installation targets")
add_compile_definitions(
NOVA_VERSION_MAJOR=${PROJECT_VERSION_MAJOR}
@@ -87,5 +90,10 @@ else()
message(FATAL_ERROR "Unsupported platform")
endif()
if (NOVA_LIBRARY_INSTALL)
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
endif()
add_subdirectory(engine)
add_subdirectory(editor)