nixpkgs/pkgs/by-name/op/openimagedenoise/cuda.patch
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

33 lines
1.2 KiB
Diff

Remove upstream workarounds for CMake "limitations" that do not appear to exist
in nixpkgs build environment, but rather break the build, presumably because
CMAKE_INSTALL_{BIN,LIB}DIR is an absolute path in our build so
CMAKE_INSTALL_PREFIX has no effect.
diff --git a/devices/CMakeLists.txt b/devices/CMakeLists.txt
index d5111cd..43986ad 100644
--- a/devices/CMakeLists.txt
+++ b/devices/CMakeLists.txt
@@ -53,7 +53,6 @@ if(OIDN_DEVICE_CUDA)
-DCMAKE_CXX_COMPILER:FILEPATH=${_host_compiler}
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/cuda/preinstall
-DCMAKE_INSTALL_BINDIR:PATH=${CMAKE_INSTALL_BINDIR}
-DCMAKE_INSTALL_LIBDIR:PATH=${CMAKE_INSTALL_LIBDIR}
-DCUDAToolkit_ROOT:PATH=${CUDAToolkit_ROOT}
@@ -69,14 +68,6 @@ if(OIDN_DEVICE_CUDA)
DEPENDS
OpenImageDenoise_core
)
-
- # Due to limitations of CMake, the module is pre-installed at build time to a temporary location,
- # and then copied to the real install location at install time.
- install(DIRECTORY
- ${CMAKE_CURRENT_BINARY_DIR}/cuda/preinstall/
- DESTINATION "."
- USE_SOURCE_PERMISSIONS
- )
endif()
if(OIDN_DEVICE_HIP)