[x265] [PATCH 2 of 2] cmake: Don't rely on non-POSIX ar functionality

Derek Buitenhuis derek.buitenhuis at gmail.com
Fri Sep 13 18:05:35 CEST 2013


# HG changeset patch
# User Derek Buitenhuis <derek.buitenhuis at gmail.com>
# Date 1379088149 -3600
# Node ID 747b32ce47816d0f1d0dda84c77d8fe712bf216e
# Parent  45786d093571fd0456574a0edf6230bb5a33d343
cmake: Don't rely on non-POSIX ar functionality

Fixes build on stricter systems like FreeBSD.

diff -r 45786d093571 -r 747b32ce4781 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 17:02:29 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} \\$$\\(cat ${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