mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
Remove autotools-based build system (#1465)
* Support .git files (e.g. for worktrees, submodules) * Fix symlinks in source tarball, switch to TXZ, adjust non-release name * Remove autotools stuff
This commit is contained in:
28
cmake/CPackSourceFixDirLinks.cmake
Normal file
28
cmake/CPackSourceFixDirLinks.cmake
Normal file
@@ -0,0 +1,28 @@
|
||||
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
||||
|
||||
if(NOT CPACK_SOURCE_GENERATOR)
|
||||
return()
|
||||
endif()
|
||||
|
||||
get_filename_component(SRC_DIR "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY)
|
||||
|
||||
file(GLOB_RECURSE SOURCE_FILES LIST_DIRECTORIES true RELATIVE "${SRC_DIR}" "${SRC_DIR}/*")
|
||||
list(REVERSE SOURCE_FILES)
|
||||
|
||||
foreach(F IN LISTS SOURCE_FILES)
|
||||
if(NOT IS_SYMLINK "${SRC_DIR}/${F}")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
# Links to files seem to be staged correctly
|
||||
if(NOT IS_DIRECTORY "${SRC_DIR}/${F}")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
file(READ_SYMLINK "${SRC_DIR}/${F}" L)
|
||||
message(STATUS "Fixing link: ${F} -> ${L}")
|
||||
|
||||
get_filename_component(D "${F}" DIRECTORY)
|
||||
file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${D}/${L}")
|
||||
file(CREATE_LINK "${L}" "${CMAKE_INSTALL_PREFIX}/${F}" SYMBOLIC)
|
||||
endforeach()
|
||||
Reference in New Issue
Block a user