echo "Usage: $0 [command]"
echo "Commands:"
echo " build Build the package"
- echo " build_win Build the package for Windows"
+ echo " build_win Build the package for 64bit Windows"
+ echo " build_win32 Build the package for 32bit Windows"
echo " clean Clean all artifacts"
echo " clean_build Clean & Build the package"
}
make
}
+cmd_build_win32() {
+ echo "[TIDL] Build the package"
+ mkdir -p $SCRIPT_DIR/$BUILD_DIR
+ cd $SCRIPT_DIR/$BUILD_DIR
+ VER=`cat ../packaging/tidl.spec | grep 'Version' | sed 's/Version://' | tr -d ' \r'`
+ cmake .. -DFULLVER=$VER -DMINIMUM_BUILD="yes" -DBUILD_WIN="yes" -DBUILD_32="yes"
+ make clean
+ make
+}
+
cmd_clean() {
echo "[TIDL] Clean all artifacts"
cd $SCRIPT_DIR/$BUILD_DIR
case "$cmd" in
build|--build|-b) cmd_build $@ ;;
build_win|--build_win|-bw) cmd_build_win $@ ;;
+ build_win32|--build_win32|-bw32) cmd_build_win32 $@ ;;
clean|--clean|-c) cmd_clean $@ ;;
clean_build |--clean_build |-cb) cmd_clean_build $@ ;;
*) usage ;;
LINK_DIRECTORIES(${LIBPKGS_LIBRARY_DIRS})
IF(DEFINED BUILD_WIN)
+IF(DEFINED BUILD_32)
+SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++")
+ELSE(DEFINED BUILD_32)
SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-g++")
+ENDIF(DEFINED BUILD_32)
SET(EXE_STATIC "-static")
ENDIF(DEFINED BUILD_WIN)