From 76dc8affe9d7df579bc789b842bd69b628724ac8 Mon Sep 17 00:00:00 2001 From: hugy <504650082@qq.com> Date: Thu, 11 May 2023 10:04:21 +0800 Subject: [PATCH] chore: spdlog --- .gitmodules | 3 +++ CMakeLists.txt | 12 +++++++----- spdlog | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..0f4533c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "spdlog"] + path = spdlog + url = https://github.com/gabime/spdlog diff --git a/CMakeLists.txt b/CMakeLists.txt index dd68bbc..f92dd34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.0.0) +include(ExternalProject) project(wxhelper VERSION 1.0.0) @@ -15,14 +16,15 @@ file(GLOB CPP_FILES ${PROJECT_SOURCE_DIR}/src/*.cc ${PROJECT_SOURCE_DIR}/src/* include_directories(${VCPKG_INSTALLED_DIR}/x86-windows/include ${PROJECT_SOURCE_DIR}/spdlog/include) + + add_subdirectory(spdlog) -# add_subdirectory(3rd) # add_subdirectory(source) find_package(nlohmann_json CONFIG REQUIRED) find_package(unofficial-mongoose CONFIG REQUIRED) -# find_package(spdlog CONFIG REQUIRED) -# find_package(minhook CONFIG REQUIRED) +find_package(spdlog CONFIG REQUIRED) + add_library(wxhelper SHARED ${CPP_FILES} ) @@ -32,8 +34,8 @@ add_library(wxhelper SHARED ${CPP_FILES} ) target_link_libraries(wxhelper PRIVATE nlohmann_json::nlohmann_json) target_link_libraries(wxhelper PRIVATE unofficial::mongoose::mongoose) -target_include_directories(wxhelper PRIVATE spdlog ) -# target_link_libraries(wxhelper PRIVATE spdlog::spdlog spdlog::spdlog_header_only) +target_link_libraries(wxhelper PRIVATE spdlog::spdlog spdlog::spdlog_header_only) + # target_link_libraries(wxhelper PRIVATE minhook::minhook) SET_TARGET_PROPERTIES(wxhelper PROPERTIES LINKER_LANGUAGE C diff --git a/spdlog b/spdlog index e4f92be..ad0e89c 160000 --- a/spdlog +++ b/spdlog @@ -1 +1 @@ -Subproject commit e4f92bed4880e682c54bff5b5092b4968cb807b3 +Subproject commit ad0e89cbfb4d0c1ce4d097e134eb7be67baebb36