@Gitter :gitter.im/cnruby
Code ID: basic_121
Code Name: Hello, Third Party Library!
# For MacOS 10.11+
brew install libpng
# For Ubuntu 20.04+
sudo apt-get install libpng-dev
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 -->
#<!-- 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 -->
@Gitter: gitter.im/cnruby
@Github: github.com/cnruby
@Twitter: twitter.com/cnruby
@Blogspot: cnruby.blogspot.com
- https://cmake.org/cmake/help/latest/command/configure_file.html
- https://gitlab.kitware.com/cmake/community/-/wikis/doc/tutorials/How-to-create-a-ProjectConfig.cmake-file
- https://riptutorial.com/cmake/example/26652/generate-a-cplusplus-configure-file-with-cmake
- https://stackoverflow.com/questions/48580399/how-to-ensure-a-generated-config-h-file-is-in-the-include-path
- https://github.com/bast/cmake-example/tree/master/cmake
- https://cmake.org/pipermail/cmake/2006-May/009049.html
- https://cmake.org/cmake/help/latest/module/FindBoost.html
- https://stackoverflow.com/questions/58081084/target-boostlibrary-already-has-an-imported-location-link-errors
- https://gist.github.com/niw/5963798
- https://stackoverflow.com/questions/30980383/cmake-compile-options-for-libpng
- https://cmake.org/cmake/help/latest/module/FindPNG.html
- http://www.libpng.org/pub/png/book/
- https://gist.githubusercontent.com/niw/5963798/raw/75034851d379413695f422a5dbdb314513396281/libpng_test.c
- http://www.libpng.org/pub/png/libpng.html
- http://zarb.org/~gc/html/libpng.html
- https://askubuntu.com/questions/508934/how-to-install-libpng-and-zlib