From f1096ae7c68f95dc7858905367efb34f4921e84c Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Fri, 16 Jun 2023 13:55:04 +0200 Subject: doc: Use C++ sources in tutorial ... as libssl.a is C++ as well. --- doc/being-consumed-by-cmake.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/being-consumed-by-cmake.md') diff --git a/doc/being-consumed-by-cmake.md b/doc/being-consumed-by-cmake.md index 8dd48ce..b4e0bc5 100644 --- a/doc/being-consumed-by-cmake.md +++ b/doc/being-consumed-by-cmake.md @@ -92,10 +92,10 @@ $ Example: Consume the installed `ssl` Library with CMake ------------------------------------------------------- -As an example, a minimal `main.c` file is created that depends on the +As an example, a minimal `main.cpp` file is created that depends on the `ssl` library. -``` {.c srcname="main.c"} +``` {.cpp srcname="main.cpp"} #include int main(int argc, char** argv) { @@ -116,7 +116,7 @@ project(test_ssl) find_package(PkgConfig REQUIRED) pkg_check_modules(SSL REQUIRED ssl) -add_executable(main main.c) +add_executable(main main.cpp) target_include_directories(main PRIVATE ${SSL_INCLUDE_DIRS}) target_compile_options(main PRIVATE ${SSL_CFLAGS_OTHER}) target_link_directories(main PRIVATE ${SSL_LIBRARY_DIRS}) @@ -152,7 +152,7 @@ $ cmake -DCMAKE_PREFIX_PATH=/tmp/just_ssl -S . -B /tmp/test_ssl -- Generating done -- Build files have been written to: /tmp/test_ssl $ cmake --build /tmp/test_ssl -[ 50%] Building CXX object CMakeFiles/main.dir/main.c.o +[ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o [100%] Linking CXX executable main [100%] Built target main $ -- cgit v1.2.3