Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 4,165
    • Issues 4,165
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Merge requests
  • !1963

FindOpenAL: Find AL/al.h or OpenAL/al.h in standard include paths

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged James Jones requested to merge cubanismo/cmake:find_openal_fix-20180415 into master Apr 15, 2018
  • Overview 4
  • Commits 1
  • Pipelines 2
  • Changes 1

FindOpenAL explicitly includes the "include" suffix in all its PATH_SUFFIXES list entries. This appears to be aimed at the HINTS and PATHS entries, which don't contain an "include" suffix. This breaks searching standard paths such as /usr/include because find_path() constructs these standard locations by itself appending "include" to a list of standard top-level locations such as /usr. Hence, FindOpenAL will end up looking for al.h in /usr/include/include/AL, /usr/include/include/OpenAL, etc.

This likely slipped through the cracks until commit e93ac6fb removed the usual standard paths from any "PATHS" variables specified to find_*() commands. That change didn't take into account FindOpenAL's non-standard usage.

I'm not clear why FindOpenAL doesn't just append "/include" to its PATHS and HINTS entries rather than including them in the PATH_SUFFIXES list, but on the off chance doing so breaks things for some reason, this change opts to simply add in the actual OpenAL include path suffixes to the PATH_SUFFIXES list after the current entries, re- enabling the ability to find OpenAL headers in the standard path prefixes in a way that least perturbs existing behavior.

Topic-rename: FindOpenAL-std-includes

Edited Apr 16, 2018 by Brad King
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: find_openal_fix-20180415