Honestly fuck if i know atp

This commit is contained in:
NaifBanana
2026-10-19 03:09:35 -05:00
parent 416446206f
commit 97aed4e5ca
7 changed files with 137 additions and 98 deletions
+16 -29
View File
@@ -28,45 +28,32 @@ function(toAbsolutePath SETVAR PATHS)
set(${SETVAR} ${RET_VAL} PARENT_SCOPE)
endfunction()
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug")
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Release")
message(STATUS "Targeting Release build")
add_compile_definitions(_NB_BUILD_RELEASE)
elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
message(STATUS "Targeting Debug build")
set(NB_DEBUG_BUILD ON)
add_compile_definitions(_NB_BUILD_DEBUG)
endif()
message(STATUS "Targeting ${CMAKE_BUILD_TYPE} build")
if (NB_DEBUG_BUILD)
set(NB_LOGGING ON)
set(NB_BUILD_TESTS ON)
set(NB_BUILD_DOCS ON)
set(NB_MONITOR_OPENGL_CALLS ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
endif()
cmake_dependent_option(NB_LOGGING
"Creates a default logger and automatically logs with code locations."
ON
NB_DEBUG_BUILD
OFF
)
cmake_dependent_option(NB_BUILD_TESTS
"Build unit tests"
ON
NB_DEBUG_BUILD
OFF
)
cmake_dependent_option(NB_BUILD_DOCS
"Build documentation"
ON
NB_DEBUG_BUILD
OFF
)
cmake_dependent_option(NBENGINE_INSTALL
"Install NBEngine"
ON
NB_DEBUG_BUILD
OFF
)
cmake_dependent_option(NB_MONITOR_OPENGL_CALLS
"Monitors every OpenGL call for errors"
ON
NB_DEBUG_BUILD
OFF
)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
message(STATUS "Building for Windows")
@@ -106,13 +93,13 @@ endif()
get_filename_component(NBENGINE_ROOT ${CMAKE_CURRENT_LIST_DIR} ABSOLUTE)
add_subdirectory(./engine ${PROJECT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
add_subdirectory(./engine)
# Toggle
set(NB_REBUILD_DOCS)
if (NB_BUILD_DOCS)
add_subdirectory(./docs)
add_subdirectory(./docs)
endif()
include(CMakePackageConfigHelpers)