summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Modules/ExternalProject.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index d7b985de9c..0c73d41a2d 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1197,7 +1197,10 @@ function(_ep_get_build_command name step cmd_var)
else()
set(cmd "${CMAKE_COMMAND}")
endif()
- set(args --build ${binary_dir} --config ${CMAKE_CFG_INTDIR})
+ set(args --build ".")
+ if (CMAKE_CFG_INTDIR AND NOT CMAKE_CFG_INTDIR STREQUAL ".")
+ list(APPEND args --config "${CMAKE_CFG_INTDIR}")
+ endif ()
if(step STREQUAL "INSTALL")
list(APPEND args --target install)
endif()