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

Explicitly check/find libva-drm in CMake #11083

Merged
merged 1 commit into from Dec 9, 2016

Conversation

@BrandonSchaefer
Copy link

commented Dec 6, 2016

Explicitly check/find libva-drm

Description

As of right now we implicitly get -lva-drm added to the building of xbmc. We should explicitly find it in case others are building their own toolchains.

Motivation and Context

This fixes issues of where -lva-drm is not being found when building through cmake.

How Has This Been Tested?

Everything still compile for me and Neil MacLeod tested this patch against his build which was failing before with out it.

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the Code guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the CONTRIBUTING document
  • I have added tests to cover my change
  • All new and existing tests passed
@BrandonSchaefer BrandonSchaefer changed the title Explicitly check/find libva-drm Explicitly check/find libva-drm in CMake Dec 6, 2016
if(NOT TARGET VAAPI::VAAPI)
add_library(VAAPI::VAAPI UNKNOWN IMPORTED)
set_target_properties(VAAPI::VAAPI PROPERTIES
IMPORTED_LOCATION "${VAAPI_libva_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${VAAPI_INCLUDE_DIR}"
INTERFACE_COMPILE_DEFINITIONS HAVE_LIBVA=1
INTERFACE_LINK_LIBRARIES VAAPI::VAAPI_X11)
INTERFACE_LINK_LIBRARIES VAAPI::VAAPI_X11
INTERFACE_LINK_LIBRARIES VAAPI::VAAPI_DRM)

This comment has been minimized.

Copy link
@wsnipex

wsnipex Dec 7, 2016

Member

please add VAAPI::VAAPI_DRM to the INTERFACE_LINK_LIBRARIES line above instead of duplicating it.

This comment has been minimized.

Copy link
@BrandonSchaefer

BrandonSchaefer Dec 7, 2016

Author

Hmm I tried that but it complained with:
set_target_properties called with incorrect number of arguments.

I tried to look up set_target and duplicates but didnt see much as well as figuring out how to set multiple libraries there. If you know the correct/better solution I would like to hear :).

This comment has been minimized.

Copy link
@wsnipex

wsnipex Dec 8, 2016

Member

Docs state:

This property contains the list of transitive link dependencies.

so this should work:
INTERFACE_LINK_LIBRARIES "VAAPI::VAAPI_X11 VAAPI::VAAPI_DRM"

This comment has been minimized.

Copy link
@BrandonSchaefer

BrandonSchaefer Dec 8, 2016

Author

That makes much more sense, thanks!

@BrandonSchaefer BrandonSchaefer force-pushed the BrandonSchaefer:find-drm-cmake branch from 47c486d to 9d65e6b Dec 8, 2016
@wsnipex

This comment has been minimized.

Copy link
Member

commented Dec 9, 2016

jenkins build this please

@wsnipex wsnipex merged commit e394eb3 into xbmc:master Dec 9, 2016
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins4kodi You did a great job. Have a cookie.
Details
@hudokkow hudokkow added this to the L 18.0-alpha1 milestone Dec 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.