mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-24 13:18:07 -05:00
Implemented spdlog library example (#150)
This commit is contained in:
19
examples/spdlog/CMakeLists.txt
Normal file
19
examples/spdlog/CMakeLists.txt
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
||||||
|
|
||||||
|
project(CPMSpdlogExample)
|
||||||
|
|
||||||
|
# ---- Dependencies ----
|
||||||
|
|
||||||
|
include(../../cmake/CPM.cmake)
|
||||||
|
|
||||||
|
CPMAddPackage(
|
||||||
|
NAME spdlog
|
||||||
|
GITHUB_REPOSITORY gabime/spdlog
|
||||||
|
VERSION 1.7.0
|
||||||
|
)
|
||||||
|
|
||||||
|
# ---- Executable ----
|
||||||
|
|
||||||
|
add_executable(CPMSpdlogExample "main.cpp")
|
||||||
|
set_target_properties(CPMSpdlogExample PROPERTIES CXX_STANDARD 17)
|
||||||
|
target_link_libraries(CPMSpdlogExample spdlog)
|
||||||
6
examples/spdlog/main.cpp
Normal file
6
examples/spdlog/main.cpp
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#include <spdlog/spdlog.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
spdlog::info("Hello, world!");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user