Skip to content

Commit

Permalink
oidn
Browse files Browse the repository at this point in the history
  • Loading branch information
howetuft committed Dec 26, 2024
1 parent c27335e commit b244fe3
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ set_property(TARGET oidn-denoise PROPERTY IMPORTED_LOCATION "${LUX_OIDN_DENOISE_
# Installation
INSTALL(TARGETS pyluxcore DESTINATION pyluxcore)

if(LINUX OR WIN32)
if(WIN32)
set(OIDN_DESTINATION "pyluxcore.libs")
else()
# Macos
# Reminder: don't put it in pyluxcore/.dylibs, it would prevent other
# deps' relocation
set(OIDN_DESTINATION "pyluxoidn")
endif(LINUX OR WIN32)
set(OIDN_DESTINATION "pyluxcore.oidn")
endif(WIN32)

INSTALL(
IMPORTED_RUNTIME_ARTIFACTS oidn-denoise
Expand All @@ -159,8 +159,33 @@ INSTALL(
OWNER_WRITE OWNER_READ OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE

)

if(LINUX)
set_property(
TARGET oidn-denoise
PROPERTY INSTALL_RPATH
"$ORIGIN/../pyluxcore.libs"
)
endif(LINUX)

if(LINUX)
set_property(
TARGET oidn-denoise
PROPERTY INSTALL_RPATH
"$ORIGIN/../pyluxcore.libs"
)
endif(LINUX)

if(APPLE)
set_property(
TARGET oidn-denoise
PROPERTY INSTALL_RPATH
"$ORIGIN/../pyluxcore/.pylibs"
)
endif(APPLE)

if(WIN32)
# For Win32, we need to add device_cpu
add_library(oidn-device-cpu SHARED IMPORTED)
Expand Down

0 comments on commit b244fe3

Please sign in to comment.