diff --git a/cmake.sh b/cmake.sh index b400ee5..853b32c 100755 --- a/cmake.sh +++ b/cmake.sh @@ -82,7 +82,7 @@ if [ "x${GENERATOR}" = "x" ]; then fi CMAKE_ARGS="" -[ ${#@} -gt 0 ] && CMAKE_ARGS=("${@}") +[ ${#@} -gt 0 ] && CMAKE_ARGS=${@} [ ! -f "${SOURCE_DIR}/CMakeLists.txt" ] && { echo "Source directory does not contain CMakeLists.txt"; exit 4; } @@ -129,7 +129,7 @@ generate_configuration() { mkdir -p "${GEN_DIR}" pushd "${GEN_DIR}" 2>/dev/null - cmake -G "${GENERATOR}" -DCMAKE_INSTALL_PREFIX="${OUTPUT_DIR}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" "${CMAKE_ARGS[@]}" "${SOURCE_DIR}" + cmake -G "${GENERATOR}" -DCMAKE_INSTALL_PREFIX="${OUTPUT_DIR}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ${CMAKE_ARGS} "${SOURCE_DIR}" if [ "x$GENERATOR" == "xNinja" ]; then # Generate fake Makefile, so make can run ninja build cat > Makefile <