Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix_1516_include_path #1565

Merged
merged 1 commit into from
Aug 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions samples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ if( EXPAT_FOUND )
exiv2-xmp
${EXPAT_LIBRARIES}
)
target_include_directories(geotag PRIVATE ${CMAKE_BINARY_DIR}) # exv_conf.h
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Robin, I think these two lines are not needed.

We are including the ${CMAKE_BINARY_DIR} globally for all the project targets at CMakeLists.txt:78.

The ${CMAKE_SOURCE_DIR}/include directory is also propagated when we add the dependency of each sample target to the library exiv2:

  • On samples/CMakeLists.txt:128 we are adding the dependency to the exiv2 target.
  • On src/CMakeLists.txt:150-154 we indicated the directoryes which are propagated when some target depends on exiv2.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I see, I'll try to reproduce it on my side ... It should see first the headers specified in the project rather than something you have in /usr/local/inclde

target_include_directories(geotag PRIVATE ${CMAKE_SOURCE_DIR}/include) # <exiv2/exiv2.hpp>
target_include_directories(geotag PRIVATE ${EXPAT_INCLUDE_DIR})
target_include_directories(geotag PRIVATE ${CMAKE_SOURCE_DIR}/src) # To find unused.h

Expand Down