cmake: put the DEFINED
check in the same if-statement
This commit is contained in:
parent
7a9d47dea6
commit
5245e7324b
1 changed files with 10 additions and 11 deletions
|
@ -12,7 +12,7 @@ index b9381c3d7d..5e944640b5 100644
|
||||||
# CMake install location
|
# CMake install location
|
||||||
"${_CMAKE_INSTALL_DIR}"
|
"${_CMAKE_INSTALL_DIR}"
|
||||||
)
|
)
|
||||||
@@ -47,48 +44,50 @@ endif()
|
@@ -47,48 +44,49 @@ endif()
|
||||||
|
|
||||||
# Non "standard" but common install prefixes
|
# Non "standard" but common install prefixes
|
||||||
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
|
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
|
||||||
|
@ -22,16 +22,15 @@ index b9381c3d7d..5e944640b5 100644
|
||||||
)
|
)
|
||||||
|
|
||||||
# List common include file locations not under the common prefixes.
|
# List common include file locations not under the common prefixes.
|
||||||
+if(DEFINED ENV{NIX_CC})
|
+if(DEFINED ENV{NIX_CC}
|
||||||
+ if(IS_DIRECTORY "$ENV{NIX_CC}"
|
+ AND IS_DIRECTORY "$ENV{NIX_CC}"
|
||||||
+ AND EXISTS "$ENV{NIX_CC}/nix-support/orig-libc"
|
+ AND EXISTS "$ENV{NIX_CC}/nix-support/orig-libc"
|
||||||
+ AND EXISTS "$ENV{NIX_CC}/nix-support/orig-libc-dev")
|
+ AND EXISTS "$ENV{NIX_CC}/nix-support/orig-libc-dev")
|
||||||
+ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc" _nix_cmake_libc)
|
+ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc" _nix_cmake_libc)
|
||||||
+ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc-dev" _nix_cmake_libc_dev)
|
+ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc-dev" _nix_cmake_libc_dev)
|
||||||
+ else()
|
+else()
|
||||||
+ set(_nix_cmake_libc @libc_lib@)
|
+ set(_nix_cmake_libc @libc_lib@)
|
||||||
+ set(_nix_cmake_libc_dev @libc_dev@)
|
+ set(_nix_cmake_libc_dev @libc_dev@)
|
||||||
+ endif()
|
|
||||||
+endif()
|
+endif()
|
||||||
+
|
+
|
||||||
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
|
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
|
||||||
|
|
Loading…
Reference in a new issue