2022年3月7日 星期一

spdlog with cmake 3.14 FetchContent

 Minimal code that spdlog can be used


main.cpp

#include <spdlog/spdlog.h>
int main() {
spdlog::info("Welcome to spdlog!");
}

CMakeLists.txt

cmake_minimum_required(VERSION 3.14)
project(untitled9)
set(CMAKE_CXX_STANDARD 17)
add_executable(untitled9 main.cpp)

include(FetchContent)
set(GITHUB_URL_ROOT https://github.com/)
FetchContent_Declare(spdlog URL ${GITHUB_URL_ROOT}/gabime/spdlog/archive/v1.8.1.tar.gz)
FetchContent_MakeAvailable(spdlog)
target_link_libraries(untitled9 PUBLIC spdlog)



End

沒有留言:

張貼留言

2023 Promox on Morefine N6000 16GB 512GB

2023 Promox on Morefine N6000 16GB 512GB Software Etcher 100MB (not but can be rufus-4.3.exe 1.4MB) Proxmox VE 7.4 ISO Installer (1st ISO re...