8000 Adding Pkgconfig Files on Windows LevelZeroSDK Package · Issue #314 · oneapi-src/level-zero · GitHub
[go: up one dir, main page]

Skip to content

Adding Pkgconfig Files on Windows LevelZeroSDK Package #314

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

Open
mschilling0 opened this issue Apr 7, 2025 · 0 comments
Open

Adding Pkgconfig Files on Windows LevelZeroSDK Package #314

mschilling0 opened this issue Apr 7, 2025 · 0 comments

Comments

@mschilling0
Copy link
mschilling0 commented Apr 7, 2025

When I download the latest driver installation, I see the "LevelZeroSDK" installed (Thanks!). However, I noticed in 1.21.6,

the pc files (ze_loader/level-zero) are no longer there.

Image

I was using this to find the version in our build scripts, e.g.,

https://github.com/intel/pti-gpu/blob/master/sdk/cmake/Modules/FindLevelZero.cmake

find_library(
  LevelZero_LIBRARY
  NAMES ze_loader
  HINTS ENV LIBRARY_PATH
        ${PC_ze_loader_LIBRARY_DIRS}
        ${PC_ze_loader_LIBDIR}
  PATHS ${CMAKE_LIBRARY_PATH}
        ENV LD_LIBRARY_PATH
  PATH_SUFFIXES lib
)

get_filename_component(LevelZero_LIBRARY_DIR ${LevelZero_LIBRARY} DIRECTORY)
# AFAIK, version can only be found via pc file. This is part of a regular level
# zero install.
find_path(
  LevelZero_PkgConfig_DIR
  NAMES libze_loader.pc
  HINTS ${LevelZero_LIBRARY_DIR}
  PATH_SUFFIXES pkgconfig
                lib/pkgconfig
                lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig
                ${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig
                lib64/pkgconfig
                lib64/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig
  NO_CMAKE_PATH
  NO_CMAKE_ENVIRONMENT_PATH
  NO_SYSTEM_ENVIRONMENT_PATH
  NO_CMAKE_SYSTEM_PATH
)

if(LevelZero_PkgConfig_DIR)
  file(READ "${LevelZero_PkgConfig_DIR}/libze_loader.pc" LevelZero_PkgConfig)
  string(REGEX MATCH "[0-9]+\.[0-9]+\.[0-9]+" LEVEL_ZERO_VER_FOUND "${LevelZero_PkgConfig}")
  set(LevelZero_VERSION ${LEVEL_ZERO_VER_FOUND})
endif()

Can it be added back or there? (Also, I will edit this file to add the new environment variable, thanks!).

(Also, I will note, albeit, uncommon pkgconfig can be used on Windows).

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

No branches or pull requests

1 participant
0