Skip to content

Commit cc4a4a7

Browse files
committed
Fixes Cmake error "file called with network path DESTINATION //System/Library/Frameworks"
1 parent 664c8a0 commit cc4a4a7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CoreFoundation/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,11 @@ install(TARGETS
589589
CFURLSessionInterface
590590
DESTINATION
591591
"${CMAKE_INSTALL_FULL_LIBDIR}")
592+
593+
# Needed to avoid double slash "//" when CMAKE_INSTALL_PREFIX set to "/" and DESTDIR used to relocate whole installation.
594+
# Double slash raise CMake error "file called with network path DESTINATION //System/Library/Frameworks".
595+
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
596+
592597
install(DIRECTORY
593598
${CoreFoundation_FRAMEWORK_DIRECTORY}
594599
DESTINATION

0 commit comments

Comments
 (0)