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

cmake: add install interface include directory #1370

Merged
merged 1 commit into from
Aug 12, 2021
Merged

cmake: add install interface include directory #1370

merged 1 commit into from
Aug 12, 2021

Conversation

madebr
Copy link
Contributor

@madebr madebr commented Aug 1, 2021

Hello,

The imported target openjp2, created when doing find_package(OpenJPEG REQUIRED CONFIG) does not add the directory include/openjpeg-2.5 to the include path.
This makes doing #include <openjpeg.h> impossible.

After the patch of this pr, the automatically generated OpenJPEGTargets.cmake will contain:

# Create imported target openjp2
add_library(openjp2 SHARED IMPORTED)

set_target_properties(openjp2 PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/openjpeg-2.5"
)

# Create imported target openjp2_static
add_library(openjp2_static STATIC IMPORTED)

set_target_properties(openjp2_static PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/openjpeg-2.5"
)

where before, the include directories were not added.

@rouault rouault merged commit 9bb0db7 into uclouvain:master Aug 12, 2021
@madebr madebr deleted the cmake/export-include-directory branch August 12, 2021 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants