[x265] [PATCH] cmake: Don't rely on non-POSIX ar functionality
Derek Buitenhuis
derek.buitenhuis at gmail.com
Fri Sep 13 17:44:27 CEST 2013
# HG changeset patch
# User Derek Buitenhuis <derek.buitenhuis at gmail.com>
# Date 1379086931 -3600
# Node ID bccb0daae14930f5fe2af80ae04be73ccbaa3f6e
# Parent 45786d093571fd0456574a0edf6230bb5a33d343
cmake: Don't rely on non-POSIX ar functionality
Fixes build on stricter systems like FreeBSD.
diff -r 45786d093571 -r bccb0daae149 source/cmake/mergestaticlibs.cmake
--- a/source/cmake/mergestaticlibs.cmake Fri Sep 13 15:41:03 2013 +0530
+++ b/source/cmake/mergestaticlibs.cmake Fri Sep 13 16:42:11 2013 +0100
@@ -109,11 +109,9 @@
DEPENDS ${lib})
endif()
list(APPEND extrafiles "${objlistfile}")
- # relative path is needed by ar under MSYS
- file(RELATIVE_PATH objlistfilerpath ${objdir} ${objlistfile})
add_custom_command(TARGET ${outlib} POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E echo "Running: ${CMAKE_AR} ru ${outfile} @${objlistfilerpath}"
- COMMAND ${CMAKE_AR} ru "${outfile}" @"${objlistfilerpath}"
+ COMMAND ${CMAKE_COMMAND} -E echo "Running: ${CMAKE_AR} ru ${outfile} @${objlistfile}"
+ COMMAND ${CMAKE_AR} ru "${outfile}" $$\(cat "${objlistfile}"\)
WORKING_DIRECTORY ${objdir})
endforeach()
add_custom_command(TARGET ${outlib} POST_BUILD
More information about the x265-devel
mailing list