diff options
| author | Jérôme Leclercq <[email protected]> | 2022-12-22 15:27:06 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-22 15:27:06 +0100 |
| commit | 3ee14dda2dd49f4e5e8a48592c2c7ddea80bda78 (patch) | |
| tree | be2f9ab318f6f6063636c283beccf9bbc38ac6a0 /xmake/modules/package | |
| parent | 30fbe9007008e20e709af947272719ea31e43a67 (diff) | |
Prevent cmake to find in host paths when cross-compiling
Diffstat (limited to 'xmake/modules/package')
| -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 |
