diff --git a/scripts/make_common.sh b/scripts/make_common.sh index 3b44f19f..9e8c86f1 100644 --- a/scripts/make_common.sh +++ b/scripts/make_common.sh @@ -3,6 +3,8 @@ BUILD_TYPE=$1 BUILD_CLEAN=$2 IS_MINGW=$3 +IS_WIN32=$4 + if [ "${IS_MINGW}" == "1" ]; then BUILD_ROOT=build3 else @@ -32,10 +34,13 @@ pushd ../${BUILD_ROOT}/${BUILD_FOLDER} if [ "${IS_MINGW}" == "1" ]; then TOOLCHAIN=$(realpath ../../cmake/mingw-w64-x86_64.cmake) - EXE_EXT=.exe CMAKE_ADDITIONAL_OPTS=-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN} fi +if [ "${IS_MINGW}" == "1" ] || [ "${IS_WIN32}" == "1" ]; then + EXE_EXT=.exe +fi + cmake ../.. ${CMAKE_ADDITIONAL_OPTS} \ -G"Unix Makefiles" \ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ diff --git a/scripts/make_win32.cmd b/scripts/make_win32.cmd index 06501f44..0d4273f3 100644 --- a/scripts/make_win32.cmd +++ b/scripts/make_win32.cmd @@ -1,5 +1,5 @@ @echo off pushd "%~dp0%.." -mingw64 scripts/make_common.sh %1 "%2" +mingw64 scripts/make_common.sh %1 "%2" 0 1 popd