-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add patch to create versioned DLL on Windows.
Downstream packages newly built against this package will now search for the versioned DLL at runtime, eliminating an issue where non-conda OpenCL.dll (e.g. NVIDIA's own ICD loader) would interfere with the conda-packaged DLL because it has a higher priority on the PATH.
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
recipe/0001-Create-versioned-DLL-on-Windows-OpenCL-1.dll-instead.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Ryan Volz <[email protected]> | ||
Date: Fri, 21 Apr 2023 11:52:29 -0400 | ||
Subject: [PATCH] Create versioned DLL on Windows, OpenCL-1.dll instead of | ||
OpenCL.dll. | ||
|
||
--- | ||
CMakeLists.txt | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 567ceee..c834205 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -124,6 +124,8 @@ set_target_properties (OpenCL PROPERTIES VERSION "1.2" SOVERSION "1") | ||
if (WIN32) | ||
target_link_libraries (OpenCL PRIVATE cfgmgr32.lib runtimeobject.lib) | ||
|
||
+ set_target_properties (OpenCL PROPERTIES RUNTIME_OUTPUT_NAME "OpenCL-${PROJECT_VERSION_MAJOR}") | ||
+ | ||
# Generate a DLL without a "lib" prefix for mingw. | ||
if (MINGW OR MSYS OR CYGWIN) | ||
set_target_properties(OpenCL PROPERTIES PREFIX "") | ||
-- | ||
2.40.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters