Skip to content

[angle] unofficial-angle targets do not have any INTERFACE_INCLUDE_DIRECTORIES attached #42324

Closed
@ADKaster

Description

@ADKaster

Is your feature request related to a problem? Please describe.

The generated targets for unofficial-angle don't have any include directory information attached. As such, we need to manually include the include dirs to our targets in order to #include <EGL/egl.h>

Here's the full generated file on my machine

#----------------------------------------------------------------
# Generated CMake target import file for configuration "Release".
#----------------------------------------------------------------

# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)

# Import target "unofficial::angle::libEGL" for configuration "Release"
set_property(TARGET unofficial::angle::libEGL APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(unofficial::angle::libEGL PROPERTIES
  IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE "unofficial::angle::libGLESv2"
  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/liblibEGL_angle.dylib"
  IMPORTED_SONAME_RELEASE "@rpath/liblibEGL_angle.dylib"
  )

list(APPEND _cmake_import_check_targets unofficial::angle::libEGL )
list(APPEND _cmake_import_check_files_for_unofficial::angle::libEGL "${_IMPORT_PREFIX}/lib/liblibEGL_angle.dylib" )

# Import target "unofficial::angle::libGLESv2" for configuration "Release"
set_property(TARGET unofficial::angle::libGLESv2 APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(unofficial::angle::libGLESv2 PROPERTIES
  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/liblibGLESv2_angle.dylib"
  IMPORTED_SONAME_RELEASE "@rpath/liblibGLESv2_angle.dylib"
  )

list(APPEND _cmake_import_check_targets unofficial::angle::libGLESv2 )
list(APPEND _cmake_import_check_files_for_unofficial::angle::libGLESv2 "${_IMPORT_PREFIX}/lib/liblibGLESv2_angle.dylib" )

# Import target "unofficial::angle::libANGLE" for configuration "Release"
set_property(TARGET unofficial::angle::libANGLE APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(unofficial::angle::libANGLE PROPERTIES
  IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C;CXX"
  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/ANGLE.a"
  )

list(APPEND _cmake_import_check_targets unofficial::angle::libANGLE )
list(APPEND _cmake_import_check_files_for_unofficial::angle::libANGLE "${_IMPORT_PREFIX}/lib/ANGLE.a" )

# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

Proposed solution

The target properties for unofficial::angle::libEGL and GLESv2 should each have an extra line for the include directory

INTERFACE_INCLUDE_DIRECTORIES ${_IMPORT_PREFIX}/include

Describe alternatives you've considered

I can work around it by adding the include directory for the vcpkg_installed/triple directory to my target:

target_include_directories(MyTarget PRIVATE ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include)

But this feels like the wrong approach.

Additional context

No response

Metadata

Metadata

Assignees

Labels

category:port-bugThe issue is with a library, which is something the port should already support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions