[mruby] Delegate ENV passing to rake invocation
CMake's env helper is broken on Windows OS :/
@@ -14,12 +14,6 @@ if(CMAKE_BUILD_TYPE)
string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE_UC)
endif()
-if(WIN32)
- set(CMAKE_EXE "cmake")
-else()
- set(CMAKE_EXE "${CMAKE_COMMAND}")
-endif()
-
find_package(Git)
if(Git_FOUND)
execute_process(
@@ -257,7 +251,7 @@ ExternalProject_Add(mruby_vendor
CONFIGURE_COMMAND ""
BUILD_IN_SOURCE TRUE
BUILD_COMMAND
- ${CMAKE_EXE} -E env
+ ${RAKE} "MRUBY_CONFIG=${MRUBY_CONFIG}"
"TARGET_CC=${CMAKE_C_COMPILER}"
"TARGET_CXX=${CMAKE_CXX_COMPILER}"
"TARGET_LD=${CMAKE_C_LINK_EXECUTABLE}"
@@ -267,7 +261,6 @@ ExternalProject_Add(mruby_vendor
"TARGET_LDFLAGS=${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_LINKER_FLAGS_${BUILD_TYPE_UC}}"
"BUILD_TYPE=${BUILD_TYPE_UC}"
"MRUBY_TOOLCHAIN=${MRUBY_TOOLCHAIN}"
- ${RAKE} "MRUBY_CONFIG=${MRUBY_CONFIG}"
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ${MRUBY_LIB}
)
