ExternalProject: fix the build command for generator overrides

The `binary_dir` variable is never set, so this is invalid. Instead, use
"." which all the other build commands use anyways. Also only set the
--config option if it is meaningful.
This commit is contained in:
Ben Boeckel 2015-03-26 18:12:04 -04:00
parent 5d1d995bb7
commit a704098de8
1 changed files with 4 additions and 1 deletions

View File

@ -1197,7 +1197,10 @@ function(_ep_get_build_command name step cmd_var)
else() else()
set(cmd "${CMAKE_COMMAND}") set(cmd "${CMAKE_COMMAND}")
endif() 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") if(step STREQUAL "INSTALL")
list(APPEND args --target install) list(APPEND args --target install)
endif() endif()