Commit f36be4d5 authored by gabime's avatar gabime

Moved lite source to folders|

parent c2b0e223
...@@ -89,8 +89,7 @@ if(SPDLOG_BUILD_BENCH) ...@@ -89,8 +89,7 @@ if(SPDLOG_BUILD_BENCH)
endif() endif()
if(SPDLOG_BUILD_LITE) if(SPDLOG_BUILD_LITE)
add_subdirectory(lite) add_subdirectory(spdlite)
add_subdirectory(lite-example)
endif() endif()
#--------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------
......
cmake_minimum_required(VERSION 3.1)
project(spdlog_lite)
add_library(spdlog_lite spdlite.cpp spdlite.h spdlite_global.cpp spdlite_global.h spdlite_macros.h)
target_link_libraries(spdlog_lite spdlog::spdlog)
cmake_minimum_required(VERSION 3.1)
project(spdlite)
include_directories(${PROJECT_SOURCE_DIR}/include)
file(GLOB SRC_FILES ${PROJECT_SOURCE_DIR}/src/*.cpp)
file(GLOB HEADER_FILES ${PROJECT_SOURCE_DIR}/include/*.h)
add_library(spdlite ${SRC_FILES} ${HEADER_FILES})
target_link_libraries(spdlite spdlog::spdlog)
add_subdirectory(example)
project(spdlog-lite-example CXX) project(spdlite-example CXX)
find_package(Threads REQUIRED)
set(LITE_SOURCES example.cpp create_logger.cpp) set(LITE_SOURCES example.cpp create_logger.cpp)
add_executable(${PROJECT_NAME} ${LITE_SOURCES}) add_executable(${PROJECT_NAME} ${LITE_SOURCES})
include_directories(../lite) find_package(Threads)
target_link_libraries(${PROJECT_NAME} PRIVATE Threads::Threads) target_link_libraries(${PROJECT_NAME} PRIVATE Threads::Threads)
target_link_libraries(${PROJECT_NAME} PRIVATE spdlog_lite) target_link_libraries(${PROJECT_NAME} PRIVATE spdlite)
// Copyright(c) 2015-present Gabi Melman. // Copyright(c) 2015-present Gabi Melman.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#include "spdlite.h" #include "spdlite/spdlite.h"
#include "spdlog/spdlog.h" #include "spdlog/spdlog.h"
#include "spdlog/sinks/basic_file_sink.h" #include "spdlog/sinks/basic_file_sink.h"
......
// Copyright(c) 2015-present Gabi Melman. // Copyright(c) 2015-present Gabi Melman.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#include "spdlite.h" #include "spdlite/spdlite.h"
#include "spdlite_global.h" #include "spdlite/spdlite_global.h"
#define SPDLITE_ACTIVE_LEVEL SPDLITE_LEVEL_TRACE #define SPDLITE_ACTIVE_LEVEL SPDLITE_LEVEL_TRACE
#include "spdlite_macros.h" #include "spdlite/spdlite_macros.h"
int main() int main()
{ {
SPDLITE_TRACE("SOME INFO {}", 123); SPDLITE_TRACE("SOME INFO {}", 123);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
// //
#include "spdlite.h" #include "spdlite/spdlite.h"
#include "spdlog/spdlog.h" #include "spdlog/spdlog.h"
static spdlog::level::level_enum to_spdlog_level(spdlite::level level) static spdlog::level::level_enum to_spdlog_level(spdlite::level level)
......
// Copyright(c) 2015-present Gabi Melman. // Copyright(c) 2015-present Gabi Melman.
// Distributed under the MIT License (http://opensource.org/licenses/MIT) // Distributed under the MIT License (http://opensource.org/licenses/MIT)
#include "spdlite_global.h" #include "spdlite/spdlite_global.h"
spdlite::logger &spdlite::default_logger() spdlite::logger &spdlite::default_logger()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment