mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
stdenv: correct cross CMAKE_SYSTEM_NAME
As described in cmake cross instructions, CMAKE_SYSTEM_NAME should be set to "Generic" if there is no applicable OS: https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/CrossCompiling#setting-up-the-system-and-toolchain
This commit is contained in:
parent
b5590fff46
commit
8cedc7fc6c
@ -246,7 +246,7 @@ in rec {
|
||||
(/**/ if lib.isString cmakeFlags then [cmakeFlags]
|
||||
else if cmakeFlags == null then []
|
||||
else cmakeFlags)
|
||||
++ lib.optional (stdenv.hostPlatform.uname.system != null) "-DCMAKE_SYSTEM_NAME=${stdenv.hostPlatform.uname.system}"
|
||||
++ [ "-DCMAKE_SYSTEM_NAME=${lib.findFirst lib.isString "Generic" [ stdenv.hostPlatform.uname.system ]}" ]
|
||||
++ lib.optional (stdenv.hostPlatform.uname.processor != null) "-DCMAKE_SYSTEM_PROCESSOR=${stdenv.hostPlatform.uname.processor}"
|
||||
++ lib.optional (stdenv.hostPlatform.uname.release != null) "-DCMAKE_SYSTEM_VERSION=${stdenv.hostPlatform.release}"
|
||||
++ lib.optional (stdenv.buildPlatform.uname.system != null) "-DCMAKE_HOST_SYSTEM_NAME=${stdenv.buildPlatform.uname.system}"
|
||||
|
Loading…
Reference in New Issue
Block a user