Skip to content

cnruby/w3h1_cmake

 
 

Repository files navigation

Hello, Third Party Library!

Using Third Party Library For C++ Sources



@Gitter :gitter.im/cnruby
Code ID: basic_121
Code Name: Hello, Third Party Library!

Youtube Video

TABLE of CONTENTS

About The Project

About The Project

Requirements

Install The Library libpng

# For MacOS 10.11+
brew install libpng
# For Ubuntu 20.04+
sudo apt-get install libpng-dev

Install The Library 'libpng' with 'brew' on MacOS

_image

Get The Code with Shell Commands

git clone https://github.com/cnruby/w3h1_cmake.git basic_121
cd basic_121
git checkout basic_121
code .
#<!-- markdown-exec(cmd:cat docs/output/tree.txt) -->#
.
├── cmake
│  ├── CMakeLists.txt
│  └── config.h.in
├── CMakeLists.txt
├── config
│  └── config.hxx
└── src
   ├── CMakeLists.txt
    └── main.cxx
#<!-- /markdown-exec -->

The Folder's Structure

Demonstrate Building The Project

Explain The Project

#<!-- markdown-exec(cmd:cat src/CMakeLists.txt) -->#
add_executable(
  main_121
  main.cxx
)
target_include_directories(
  main_121
  PRIVATE ${PROJECT_CONIFG_DIR}
)
# link against the library 'libpng'
target_link_libraries(
  main_121
  PRIVATE PNG::PNG
)
#<!-- /markdown-exec -->

_image

The Process's Structure

_image

Final Summary

感谢大家观看!

@Gitter: gitter.im/cnruby

@Github: github.com/cnruby

@Twitter: twitter.com/cnruby

@Blogspot: cnruby.blogspot.com

References