Skip to content

Commit d9c8aac

Browse files
committed
depends, refactor: Avoid hardcoding host_prefix in toolchain file
This change allows the entire `depends/<host_prefix>` directory to be relocatable.
1 parent 2638fdb commit d9c8aac

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

depends/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ $(host_prefix)/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(fina
209209
-e 's|@STRIP@|$(host_STRIP)|' \
210210
-e 's|@OBJCOPY@|$(host_OBJCOPY)|' \
211211
-e 's|@OBJDUMP@|$(host_OBJDUMP)|' \
212-
-e 's|@depends_prefix@|$(host_prefix)|' \
213212
-e 's|@CFLAGS@|$(strip $(host_CFLAGS))|' \
214213
-e 's|@CFLAGS_RELEASE@|$(strip $(host_release_CFLAGS))|' \
215214
-e 's|@CFLAGS_DEBUG@|$(strip $(host_debug_CFLAGS))|' \

depends/toolchain.cmake.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ set(CMAKE_OBJDUMP "@OBJDUMP@")
7272
# affected by a potentially random environment.
7373
set(CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH OFF)
7474

75-
set(CMAKE_FIND_ROOT_PATH "@depends_prefix@")
75+
set(CMAKE_FIND_ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}")
7676
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
7777
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
7878
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
7979
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
80-
set(QT_TRANSLATIONS_DIR "@depends_prefix@/translations")
80+
set(QT_TRANSLATIONS_DIR "${CMAKE_CURRENT_LIST_DIR}/translations")
8181

8282
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_HOST_APPLE)
8383
# The find_package(Qt ...) function internally uses find_library()

0 commit comments

Comments
 (0)