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

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

Open
ADKaster opened this issue Nov 22, 2024 · 0 comments
Assignees
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Comments

@ADKaster
Copy link
Contributor

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

@ADKaster ADKaster added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

No branches or pull requests

2 participants