Merge pull request #192943 from KiruyaMomochi/cmake

authored by

Bernardo Meurer and committed by
GitHub
1c0ceeaf d7a3a8aa

+5 -4
+5 -4
pkgs/development/tools/build-managers/cmake/001-search-path.diff
··· 12 12 # CMake install location 13 13 "${_CMAKE_INSTALL_DIR}" 14 14 ) 15 - @@ -47,48 +44,48 @@ endif() 15 + @@ -47,48 +44,49 @@ endif() 16 16 17 17 # Non "standard" but common install prefixes 18 18 list(APPEND CMAKE_SYSTEM_PREFIX_PATH ··· 22 22 ) 23 23 24 24 # List common include file locations not under the common prefixes. 25 - +if(IS_DIRECTORY $ENV{NIX_CC} 26 - + AND EXISTS $ENV{NIX_CC}/nix-support/orig-libc 27 - + AND EXISTS $ENV{NIX_CC}/nix-support/orig-libc-dev) 25 + +if(DEFINED ENV{NIX_CC} 26 + + AND IS_DIRECTORY "$ENV{NIX_CC}" 27 + + AND EXISTS "$ENV{NIX_CC}/nix-support/orig-libc" 28 + + AND EXISTS "$ENV{NIX_CC}/nix-support/orig-libc-dev") 28 29 + file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc" _nix_cmake_libc) 29 30 + file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc-dev" _nix_cmake_libc_dev) 30 31 +else()