Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/windows/precompiled_dependencies/mingw64/build_ogredeps.sh @ 126

Last change on this file since 126 was 126, checked in by landauf, 9 years ago

eol-style native

  • Property svn:eol-style set to native
File size: 1.5 KB
Line 
1#!/bin/sh
2
3NAME="[ogredeps]"
4WORKING_DIR="ogre/cabalistic-ogredeps-7168c50f9d04"
5
6BUILD_DIR=build
7
8source ./build_common.sh
9
10if [ $DO_CLEAN -eq 1 ]
11then
12        rm -rf $BUILD_DIR
13        check_result $? "cleaning build dir"
14fi
15
16if [ $DO_BUILD -eq 1 ]
17then
18        # modify build script: make zlib a SHARED library (instead of a STATIC one)
19        CMAKE_FILE="src/zlib/CMakeLists.txt"
20        sed -i "s/zlib STATIC /zlib SHARED /g" $CMAKE_FILE
21        check_result $? "modifying build script"
22
23        # prepare build
24        mkdir -p $BUILD_DIR
25        check_result $? "creating build dir"
26        cd $BUILD_DIR
27
28        # run cmake
29        cmake .. -G "MSYS Makefiles" -DOGREDEPS_BUILD_SDL2=false
30        check_result $? "cmake"
31
32        # compile
33        make -j8
34        check_result $? "make"
35        make -j8 install
36        check_result $? "make install"
37
38        # copy zlib and cg into target directory
39        cp -a "ogredeps/bin/Release/libzlib.dll" ${TARGET_BIN_DIR}
40        check_result $? "copying library"
41        cp -a "ogredeps/bin/Release/cg.dll" ${TARGET_BIN_DIR}
42        check_result $? "copying cg"
43
44        # copy zlib headers into target directory
45        ZLIB_INC_DIR="${TARGET_INC_DIR}/zlib/include"
46        mkdir -p $ZLIB_INC_DIR
47        check_result $? "creating include dir"
48        cp -a "ogredeps/include/zconf.h" ${ZLIB_INC_DIR}
49        check_result $? "copying zconf.h"
50        cp -a "ogredeps/include/zlib.h" ${ZLIB_INC_DIR}
51        check_result $? "copying zlib.h"
52
53        # copy whole dependency folder to TEMP_DIR for future build steps (i.e. ogre)
54        cp -aT "ogredeps" "${TEMP_DIR}"
55        check_result $? "copying dependencies to TEMP_DIR"
56
57        echo "${NAME} Finished building ${NAME}"
58fi
Note: See TracBrowser for help on using the repository browser.