ttroy50 / cmake-examples

Useful CMake Examples
http://ttroy50.github.io/cmake-examples
MIT License
12.45k stars 2.5k forks source link

cmake-examples/01-basic/H-third-party-library/ Why don't i need add boost::shared_ptr to `target_link_libraries`? #93

Closed Nngxu closed 1 year ago

Nngxu commented 1 year ago

I have a question an cmake-examples/01-basic/H-third-party-library/, we use find_package()to find Boost CMake Module, and we need add Boost::filesystem to CMakeLists.txt's target_link_libraries, because our main.cpp has used this library. But our main.cpp also use boost::shared_ptr, why we not add Boost::shared_ptr to the target_link_libraries?