Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 8ee2f0a

Browse files
committed
Don't override CMAKE_INSTALL_PREFIX if it is already set for us
Signed-off-by: Gregory Shimansky <[email protected]>
1 parent 67bd953 commit 8ee2f0a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@ if(DEFINED ENV{CONDA_PREFIX})
6565
set(ENABLE_CONDA ON)
6666
set(CMAKE_SYSROOT "$ENV{CONDA_BUILD_SYSROOT}")
6767
list(APPEND CMAKE_PREFIX_PATH "$ENV{CONDA_PREFIX}")
68-
file(TO_CMAKE_PATH "$ENV{CONDA_PREFIX}" CMAKE_INSTALL_PREFIX)
68+
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
69+
# When conda build is running CONDA_PREFIX points to build env
70+
# while install should happen to host env to detect new files. If
71+
# CMAKE_INSTALL_PREFIX is already defined to point to host env we
72+
# should not override it here.
73+
file(TO_CMAKE_PATH "$ENV{CONDA_PREFIX}" CMAKE_INSTALL_PREFIX)
74+
endif()
6975
endif()
7076

7177
string(TIMESTAMP HDK_BUILD_DATE "%Y%m%d")

0 commit comments

Comments
 (0)