diff options
| author | ruki <[email protected]> | 2022-12-22 22:51:23 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-22 22:51:23 +0800 |
| commit | c0729460fcc18ca3602252199ccc7b4603566722 (patch) | |
| tree | 4e5f35f4d296decc25de5aaa118a2033b89fa38a | |
| parent | 8a4280dea19348235d33c1d469e738570a961fdd (diff) | |
| parent | 3ee14dda2dd49f4e5e8a48592c2c7ddea80bda78 (diff) | |
Merge pull request #3195 from SirLynix/patch-12
Prevent cmake to find in host paths when cross-compiling
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 7e9b9d6c9..770311cdb 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -543,6 +543,9 @@ function _get_configs_for_cross(package, configs, opt) envs.CMAKE_OSX_SYSROOT = "" -- Avoid cmake to add the flags -search_paths_first and -headerpad_max_install_names on macOS envs.HAVE_FLAG_SEARCH_PATHS_FIRST = "0" + -- Avoids finding host include/library path + envs.CMAKE_FIND_USE_CMAKE_SYSTEM_PATH = "0" + envs.CMAKE_FIND_USE_INSTALL_PREFIX = "0" for k, v in pairs(envs) do table.insert(configs, "-D" .. k .. "=" .. v) end |
