diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-10-29 15:57:29 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-10-29 16:00:06 +0100 |
commit | 9f51fcf8a07b53bb0726a988c91ded7799eeb496 (patch) | |
tree | f521814ef5b496f7743d427080e89457c0f6fd78 /cmake/Modules | |
parent | 9e15952d02e01b8e19e7459bcabcd47dc63a1726 (diff) | |
download | tigervnc-9f51fcf8a07b53bb0726a988c91ded7799eeb496.tar.gz tigervnc-9f51fcf8a07b53bb0726a988c91ded7799eeb496.zip |
Avoid .la files getting removed on "make clean"
These are generated during the cmake stage, but cmake thinks they are
generated during the build stage because of our rule to update the
timestamp on them. As a result, it thinks they should be removed when
doing "make clean".
There doesn't seems to be an easy way to tell cmake to leave these
alone. So instead, point cmake to a different marker file when updating
the timestamps. We don't care if that gets removed as it has no valuable
contents.
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/CMakeMacroLibtoolFile.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/Modules/CMakeMacroLibtoolFile.cmake b/cmake/Modules/CMakeMacroLibtoolFile.cmake index 12ba9909..1c7cb93d 100644 --- a/cmake/Modules/CMakeMacroLibtoolFile.cmake +++ b/cmake/Modules/CMakeMacroLibtoolFile.cmake @@ -180,8 +180,10 @@ function(libtool_generate_control_file _target) file(APPEND ${_laname} "libdir='/usr/lib'\n\n") # Make sure the timestamp is updated to trigger other make invocations - add_custom_command(OUTPUT "${_laname}" DEPENDS ${_target} + set(_lamarker ${_binary_dir}/.${_lname}.la.fresh) + add_custom_command(OUTPUT "${_lamarker}" DEPENDS ${_target} COMMENT "Updating timestamp on ${_lname}.la" + COMMAND "${CMAKE_COMMAND}" -E touch "${_lamarker}" COMMAND "${CMAKE_COMMAND}" -E touch "${_laname}") # Add custom command to symlink the static library so that autotools finds @@ -193,5 +195,5 @@ function(libtool_generate_control_file _target) COMMAND "${CMAKE_COMMAND}" -E create_symlink ../${_lname}${CMAKE_STATIC_LIBRARY_SUFFIX} "${_libname}") add_custom_target(${_target}.la ALL - DEPENDS "${_laname}" "${_libname}") + DEPENDS "${_lamarker}" "${_libname}") endfunction() |