3e15fe6a5e
Symlink creation to base file names is only needed for versioned libraries. Modify CMake rules to prevent overwriting existing libraties with recursive links. Fixes the following autobuild failures: http://autobuild.buildroot.net/results/dd1/dd1974dbc1a22a96a3cedb117417e66119821514/ http://autobuild.buildroot.net/results/df8/df8406402ccff7cec34ae5858b8da57d1a4ae9c1/ http://autobuild.buildroot.net/results/743/7433a2ad111e2f014c81f196d3d1e2f63dffa858/ http://autobuild.buildroot.net/results/79f/79f88e9ec14cda7d07cf689eee864791ba949892/ ... http://autobuild.buildroot.net/results/892/8922efbbbfe79e8286a411acce4086b5c77c57c0/ http://autobuild.buildroot.net/results/dfa/dfa8ade3a4c1750e6dd58e652f60af2a44f80dd8/ http://autobuild.buildroot.net/results/9cd/9cd4147486f32d642513ba14efca3a02d5745ab9/ Regression test cases: http://autobuild.buildroot.net/results/ba7/ba711034c0abe980f677e26de41739223e2f66e9/ http://autobuild.buildroot.net/results/032/032aaff121fb114f388c67dbca3ad2b02f670e38/ http://autobuild.buildroot.net/results/6c5/6c56b645a2b723920f07b98474452824fba5e2c1/ Signed-off-by: Andreas Ziegler <br015@umbiko.net> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
73 lines
3.1 KiB
Diff
73 lines
3.1 KiB
Diff
From 5977725ecea038f32a86938703ca1ed2b080b31c Mon Sep 17 00:00:00 2001
|
|
From: Andreas Ziegler <br015@umbiko.net>
|
|
Date: Fri, 29 Jul 2022 12:32:27 +0200
|
|
Subject: [PATCH] ZZIP_LIBLATEST: create symlinks only if target is missing
|
|
|
|
zzip/CMakeList.txt uses custom build targets to create symlinks to the
|
|
(normally versioned) build results from unversioned file names. These
|
|
targets are executed unconditionally, every time a build is started,
|
|
regardless of the existence of the symlink.
|
|
|
|
Debug builds, however, generate unversioned libraries. The build targets
|
|
therefore overwrite existing files with recursive links.
|
|
|
|
Create custom targets depending on the target file plus custom build
|
|
commands containing the symlink creation, thereby ensuring that symlinks
|
|
are only created if the link target is missing.
|
|
|
|
Signed-off-by: Andreas Ziegler <br015@umbiko.net>
|
|
Upstream: https://github.com/gdraheim/zziplib/pull/138
|
|
---
|
|
zzip/CMakeLists.txt | 18 +++++++++++++++---
|
|
1 file changed, 15 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt
|
|
index 4fa6b9c..dd1e56a 100644
|
|
--- a/zzip/CMakeLists.txt
|
|
+++ b/zzip/CMakeLists.txt
|
|
@@ -350,8 +350,12 @@ if(ZZIP_LIBLATEST)
|
|
endif()
|
|
get_target_property(libname libzzip OUTPUT_NAME)
|
|
get_target_property(librelease libzzip RELEASE_POSTFIX)
|
|
+ set(libzzip_target "${lib}${libname}${dll}")
|
|
+ add_custom_command(OUTPUT ${libzzip_target}
|
|
+ COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${libzzip_target}
|
|
+ )
|
|
add_custom_target(libzzip_latest ALL
|
|
- COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${lib}${libname}${dll}
|
|
+ DEPENDS ${libzzip_target}
|
|
)
|
|
install(FILES
|
|
${outdir}/${lib}${libname}${dll}
|
|
@@ -359,8 +363,12 @@ if(ZZIP_LIBLATEST)
|
|
if(ZZIPFSEEKO)
|
|
get_target_property(libname libzzipfseeko OUTPUT_NAME)
|
|
get_target_property(librelease libzzipfseeko RELEASE_POSTFIX)
|
|
+ set(libzzipfseeko_target "${lib}${libname}${dll}")
|
|
+ add_custom_command(OUTPUT ${libzzipfseeko_target}
|
|
+ COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${libzzipfseeko_target}
|
|
+ )
|
|
add_custom_target(libzzipfseeko_latest ALL
|
|
- COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${dll}
|
|
+ DEPENDS ${libzzipfseeko_target}
|
|
)
|
|
install(FILES
|
|
${outdir}/${lib}${libname}${dll}
|
|
@@ -369,8 +377,12 @@ if(ZZIP_LIBLATEST)
|
|
if(ZZIPMMAPPED)
|
|
get_target_property(libname libzzipmmapped OUTPUT_NAME)
|
|
get_target_property(librelease libzzipmmapped RELEASE_POSTFIX)
|
|
+ set(libzzipmmapped_target "${lib}${libname}${dll}")
|
|
+ add_custom_command(OUTPUT ${libzzipmmapped_target}
|
|
+ COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${libzzipmmapped_target}
|
|
+ )
|
|
add_custom_target(libzzipmmaped_latest ALL
|
|
- COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${dll}
|
|
+ DEPENDS ${libzzipmmapped_target}
|
|
)
|
|
install(FILES
|
|
${outdir}/${lib}${libname}${dll}
|
|
--
|
|
2.34.1
|
|
|