You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 01-basic\H-third-party-library, the example project uses find_package(Boost 1.46.1 REQUIRED COMPONENTS filesystem system) to find the third-party-library Boost, but without using include_directories(${Boost_INCLUDE_DIRS}), how can the target find where the "XXX.h" files are?
And in the file README.adoc, in Checking if the package is found part, the example uses include_directories(${Boost_INCLUDE_DIRS})
In fact, without writing include_directories(${Boost_INCLUDE_DIRS}), the example project can compile and run without any problems, but it really confuse me whether I need to use include_directories(${XXX_INCLUDE_DIRS}) after using find_package(XXX) and why or why not.
The text was updated successfully, but these errors were encountered:
therer is also another reason. The target_link_libraries(third_party_include )method will also get the INTERFACE_INCLUDE_DIRECTORIES of Boost::filesystem to it's INCLUDE_DIRECTORIES.
In 01-basic\H-third-party-library, the example project uses
find_package(Boost 1.46.1 REQUIRED COMPONENTS filesystem system)
to find the third-party-library Boost, but without usinginclude_directories(${Boost_INCLUDE_DIRS})
, how can the target find where the "XXX.h" files are?And in the file README.adoc, in
Checking if the package is found
part, the example usesinclude_directories(${Boost_INCLUDE_DIRS})
In fact, without writing
include_directories(${Boost_INCLUDE_DIRS})
, the example project can compile and run without any problems, but it really confuse me whether I need to useinclude_directories(${XXX_INCLUDE_DIRS})
after usingfind_package(XXX)
and why or why not.The text was updated successfully, but these errors were encountered: