This commit is contained in:
CupWater
2026-08-17 11:29:05 +08:00
parent c196ffb6d8
commit 835c556a58
9 changed files with 43 additions and 9 deletions
+9 -8
View File
@@ -10,13 +10,13 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/shared")
# 定义源文件
set(${PROJECT_NAME}_SOURCES
include/log_manager.hpp
include/log_outputter.hpp
include/logger.hpp
include/log_formatter.hpp
include/log_level.hpp
include/log_message.hpp
src/featherlog/log_manager.cpp)
include/featherlog/log_manager.hpp
include/featherlog/log_outputter.hpp
include/featherlog/logger.hpp
include/featherlog/log_formatter.hpp
include/featherlog/log_level.hpp
include/featherlog/log_message.hpp
src/log_manager.cpp)
# 生成静态库
add_library(${PROJECT_NAME}_static STATIC ${${PROJECT_NAME}_SOURCES})
@@ -29,7 +29,8 @@ add_compile_definitions(FLOG_DLL_MODE)
add_compile_definitions(FLOG_BUILDING_DLL)
# 生成动态库
add_library(${PROJECT_NAME}_shared SHARED ${${PROJECT_NAME}_SOURCES})
add_library(${PROJECT_NAME}_shared SHARED ${${PROJECT_NAME}_SOURCES}
include/featherlog/flog_definitions.h)
target_include_directories(${PROJECT_NAME}_shared PUBLIC include)
set_target_properties(${PROJECT_NAME}_shared PROPERTIES
OUTPUT_NAME ${PROJECT_NAME}
+30
View File
@@ -0,0 +1,30 @@
#ifndef FEATHERLOG_FLOG_DEFINITIONS_H
#define FEATHERLOG_FLOG_DEFINITIONS_H
#ifndef FLOG_CALL
# define FLOG_CALL __stdcall
#endif
#ifndef FLOG_API
#if defined(__unix) || defined(__unix__)
#define FLOG_API
#elif defined(_WIN32) || defined(__WIN32__)
# ifdef FLOG_DLL_MODE
# ifdef FLOG_BUILDING_DLL
# define FLOG_API __declspec(dllexport)
# else
# define FLOG_API __declspec(dllimport)
# endif
# else
# define FLOG_API
# endif
#else
# error Unknow platform!
#endif
#endif
#endif
@@ -1,7 +1,10 @@
#ifndef FEATHERLOG_LOG_FORMATTER_HPP
#define FEATHERLOG_LOG_FORMATTER_HPP
#include <string>
#include
namespace flog
{
class LogFormatter
@@ -1,4 +1,4 @@
#include "../../include/log_manager.hpp"
#include "../include/featherlog/log_manager.hpp"
namespace flog
{