mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
Support in-source builds (#4955)
* Support in-source builds Don't copy third-party directories into themselves (actually, don't copy them at all) by switching from `URL` to `SOURCE_DIR`. Separate build, source, and install directories for third-party libraries. * Trigger builds on changes to cmake/ That directory contains TrMacros.cmake which influences build logic in other places.
This commit is contained in:
20
.github/workflows/actions.yml
vendored
20
.github/workflows/actions.yml
vendored
@@ -53,18 +53,18 @@ jobs:
|
|||||||
git diff --exit-code "$MERGE_BASE" -- "$@"
|
git diff --exit-code "$MERGE_BASE" -- "$@"
|
||||||
echo "$name-changed=$?" >> "$GITHUB_OUTPUT"
|
echo "$name-changed=$?" >> "$GITHUB_OUTPUT"
|
||||||
}
|
}
|
||||||
get_changes cli CMakeLists.txt Transmission.xcodeproj third-party libtransmission cli
|
get_changes cli CMakeLists.txt cmake Transmission.xcodeproj third-party libtransmission cli
|
||||||
get_changes any-code CMakeLists.txt Transmission.xcodeproj libtransmission cli daemon gtk macosx qt utils tests web third-party
|
get_changes any-code CMakeLists.txt cmake Transmission.xcodeproj libtransmission cli daemon gtk macosx qt utils tests web third-party
|
||||||
get_changes our-code CMakeLists.txt Transmission.xcodeproj libtransmission cli daemon gtk macosx qt utils tests web
|
get_changes our-code CMakeLists.txt cmake Transmission.xcodeproj libtransmission cli daemon gtk macosx qt utils tests web
|
||||||
get_changes daemon CMakeLists.txt Transmission.xcodeproj third-party libtransmission daemon
|
get_changes daemon CMakeLists.txt cmake Transmission.xcodeproj third-party libtransmission daemon
|
||||||
get_changes dist dist
|
get_changes dist dist
|
||||||
get_changes docs docs
|
get_changes docs docs
|
||||||
get_changes gtk CMakeLists.txt third-party libtransmission gtk
|
get_changes gtk CMakeLists.txt cmake third-party libtransmission gtk
|
||||||
get_changes mac CMakeLists.txt Transmission.xcodeproj third-party libtransmission macosx Transmission.xcodeproj
|
get_changes mac CMakeLists.txt cmake Transmission.xcodeproj third-party libtransmission macosx Transmission.xcodeproj
|
||||||
get_changes qt CMakeLists.txt third-party libtransmission qt
|
get_changes qt CMakeLists.txt cmake third-party libtransmission qt
|
||||||
get_changes tests CMakeLists.txt third-party libtransmission utils tests
|
get_changes tests CMakeLists.txt cmake third-party libtransmission utils tests
|
||||||
get_changes utils CMakeLists.txt third-party libtransmission utils
|
get_changes utils CMakeLists.txt cmake third-party libtransmission utils
|
||||||
get_changes web CMakeLists.txt third-party libtransmission web
|
get_changes web CMakeLists.txt cmake third-party libtransmission web
|
||||||
|
|
||||||
code-style:
|
code-style:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|||||||
@@ -145,10 +145,10 @@ macro(tr_add_external_auto_library ID DIRNAME LIBNAME)
|
|||||||
set(${CMAKE_MATCH_1} ${CMAKE_MATCH_3} CACHE INTERNAL "")
|
set(${CMAKE_MATCH_1} ${CMAKE_MATCH_3} CACHE INTERNAL "")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/${DIRNAME}" "${CMAKE_BINARY_DIR}/third-party/${DIRNAME}")
|
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/${DIRNAME}" "${CMAKE_BINARY_DIR}/third-party/${DIRNAME}.bld")
|
||||||
else()
|
else()
|
||||||
set(${ID}_UPSTREAM_TARGET ${LIBNAME})
|
set(${ID}_UPSTREAM_TARGET ${LIBNAME})
|
||||||
set(${ID}_PREFIX "${CMAKE_BINARY_DIR}/third-party/${${ID}_UPSTREAM_TARGET}")
|
set(${ID}_PREFIX "${CMAKE_BINARY_DIR}/third-party/${DIRNAME}.bld/pfx")
|
||||||
|
|
||||||
set(${ID}_INCLUDE_DIR "${${ID}_PREFIX}/include"
|
set(${ID}_INCLUDE_DIR "${${ID}_PREFIX}/include"
|
||||||
CACHE INTERNAL "")
|
CACHE INTERNAL "")
|
||||||
@@ -169,8 +169,9 @@ macro(tr_add_external_auto_library ID DIRNAME LIBNAME)
|
|||||||
|
|
||||||
ExternalProject_Add(
|
ExternalProject_Add(
|
||||||
${${ID}_UPSTREAM_TARGET}
|
${${ID}_UPSTREAM_TARGET}
|
||||||
URL "${CMAKE_SOURCE_DIR}/third-party/${DIRNAME}"
|
PREFIX "${CMAKE_BINARY_DIR}/third-party/${DIRNAME}.bld"
|
||||||
PREFIX "${${ID}_PREFIX}"
|
SOURCE_DIR "${CMAKE_SOURCE_DIR}/third-party/${DIRNAME}"
|
||||||
|
INSTALL_DIR "${${ID}_PREFIX}"
|
||||||
CMAKE_ARGS
|
CMAKE_ARGS
|
||||||
-Wno-dev # We don't want to be warned over unused variables
|
-Wno-dev # We don't want to be warned over unused variables
|
||||||
--no-warn-unused-cli
|
--no-warn-unused-cli
|
||||||
|
|||||||
Reference in New Issue
Block a user