Add cmake install commands
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user