Skip to content

Commit 59f4fff

Browse files
authoredJan 15, 2025··
Don't include CMAKE_INSTALL_PREFIX when LIBDIR is absolute (#8552)
1 parent 5f56f68 commit 59f4fff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎cmake/HalidePackageConfigHelpers.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ function(_Halide_install_pkgdeps)
7878
)
7979

8080
set(depFile "${CMAKE_CURRENT_BINARY_DIR}/${ARG_FILE_NAME}")
81+
set(installPrefix "$<$<PATH:IS_RELATIVE,${ARG_DESTINATION}>:\${CMAKE_INSTALL_PREFIX}/>")
8182

8283
_Halide_install_code(
83-
"file(READ \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${ARG_DESTINATION}/${ARG_EXPORT_FILE}\" target_cmake)"
84+
"file(READ \"\$ENV{DESTDIR}${installPrefix}${ARG_DESTINATION}/${ARG_EXPORT_FILE}\" target_cmake)"
8485
"file(WRITE \"${depFile}.in\" \"\")"
8586
)
8687

0 commit comments

Comments
 (0)
Please sign in to comment.