Rewrote the log initialization functions, logs are now saved in rotating files, implemented configurable log levels
This commit is contained in:
@ -3,13 +3,20 @@ cmake_minimum_required(VERSION 3.8)
|
||||
project(game CXX)
|
||||
|
||||
file(GLOB_RECURSE sources
|
||||
src/*.cpp src/*.h
|
||||
src/*.cpp src/*.h
|
||||
)
|
||||
|
||||
# Add the src directory to the include path
|
||||
include_directories(src)
|
||||
|
||||
add_executable(${PROJECT_NAME} ${sources})
|
||||
|
||||
# Set the default log level based on the build type
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
message(STATUS "This is a debug build. Log level will be set to 'trace' for target '${PROJECT_NAME}'.")
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE)
|
||||
endif()
|
||||
|
||||
# Find dependencies
|
||||
|
||||
#
|
||||
@ -43,10 +50,6 @@ endif (LZO_FOUND)
|
||||
find_package(effolkronium_random CONFIG REQUIRED)
|
||||
target_link_libraries(${PROJECT_NAME} effolkronium_random)
|
||||
|
||||
# fmt
|
||||
find_package(fmt CONFIG REQUIRED)
|
||||
target_link_libraries(${PROJECT_NAME} fmt::fmt)
|
||||
|
||||
#
|
||||
# System-provided dependencies
|
||||
#
|
||||
|
Reference in New Issue
Block a user