-
Notifications
You must be signed in to change notification settings - Fork 165
Added OpenCL.pc file. #190
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
Changes from 12 commits
88d9a3a
276b236
f3ffcfe
88d6914
34a5955
47fcebb
b7afcf4
72f8e04
a30ba05
2df9bf0
d6483fb
99cb45c
344484c
566354f
fdc82ea
3b1b58a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| prefix=@CMAKE_INSTALL_PREFIX@ | ||
| exec_prefix=${prefix} | ||
| libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ | ||
| includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ | ||
|
|
||
| Name: OpenCL | ||
| Description: Khronos OpenCL ICD Loader | ||
Kerilk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Version: 3.0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirming: It's OK if this version number is different than our SOVERSION? If so, this is another place that would be great to automate with #182!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This mimics what
Indeed |
||
| Libs: -L${libdir} -lOpenCL | ||
| Cflags: -I${includedir} | ||
Kerilk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| cmake_minimum_required(VERSION 3.1) | ||
| find_package(PkgConfig REQUIRED) | ||
|
|
||
| project(PkgConfigTest | ||
| LANGUAGES C | ||
| ) | ||
|
|
||
| pkg_check_modules(OPENCL REQUIRED OpenCL) | ||
|
|
||
| if(CMAKE_VERSION VERSION_LESS 3.12) | ||
| link_directories("${OPENCL_LIBRARY_DIRS}") | ||
| endif() | ||
|
|
||
| add_executable(${PROJECT_NAME} | ||
| ../pkgconfig.c | ||
| ) | ||
|
|
||
| target_include_directories(${PROJECT_NAME} | ||
| PRIVATE | ||
| ${OPENCL_INCLUDE_DIRS} | ||
| ) | ||
|
|
||
| if(CMAKE_VERSION VERSION_LESS 3.12) | ||
| target_link_libraries(${PROJECT_NAME} | ||
| PRIVATE | ||
| ${OPENCL_LIBRARIES} | ||
| ) | ||
| else() | ||
| target_link_libraries(${PROJECT_NAME} | ||
| PRIVATE | ||
| ${OPENCL_LINK_LIBRARIES} | ||
| ) | ||
| endif() | ||
|
|
||
| target_compile_options(${PROJECT_NAME} | ||
| PRIVATE | ||
| ${OPENCL_CFLAGS_OTHER} | ||
| ) | ||
|
|
||
| target_compile_definitions(${PROJECT_NAME} | ||
| PRIVATE | ||
| CL_TARGET_OPENCL_VERSION=120 | ||
| ) | ||
|
|
||
| include(CTest) | ||
|
|
||
| add_test( | ||
| NAME ${PROJECT_NAME} | ||
| COMMAND ${PROJECT_NAME} | ||
| ) | ||
|
|
||
| set_tests_properties(${PROJECT_NAME} | ||
| PROPERTIES | ||
| ENVIRONMENT "OCL_ICD_FILENAMES=${DRIVER_STUB_PATH}" | ||
| ) |
Uh oh!
There was an error while loading. Please reload this page.