Skip to content

Commit 50aac50

Browse files
committed
Simplify Conan Example
1 parent 98d0f5b commit 50aac50

File tree

4 files changed

+16
-38
lines changed

4 files changed

+16
-38
lines changed
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
cmake_minimum_required(VERSION 3.15)
2-
project(compressor C)
1+
cmake_minimum_required(VERSION 3.24)
32

4-
find_package(ZLIB REQUIRED)
3+
project(FormatOutput LANGUAGES CXX C)
54

6-
add_executable(${PROJECT_NAME} src/main.c)
7-
target_link_libraries(${PROJECT_NAME} ZLIB::ZLIB)
5+
set(CMAKE_CXX_STANDARD 14)
6+
7+
find_package(fmt REQUIRED)
8+
9+
add_executable(main main.cpp)
10+
target_link_libraries(main PRIVATE fmt::fmt)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include "fmt/color.h"
2+
3+
int main()
4+
{
5+
fmt::print(fg(fmt::terminal_color::cyan), "Hello fmt {}!\n", FMT_VERSION);
6+
return 0;
7+
}

examples/conan_cmake/simple/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ provider-name = "conan"
2222
install-path = "install"
2323

2424
dependencies = [
25-
"zlib>=1.2.11",
25+
"fmt>=11.0.1",
2626
]
2727

2828
[tool.cppython.generator]

examples/conan_cmake/simple/src/main.c

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)