2018-03-13 21:58:52 +03:00
|
|
|
#!/bin/sh -e
|
2014-10-04 15:23:23 +04:00
|
|
|
|
2022-06-16 21:45:50 +02:00
|
|
|
# Silence a git warning
|
|
|
|
git config --global advice.detachedHead false
|
|
|
|
|
2024-09-23 10:11:04 +00:00
|
|
|
rm -fr build
|
2024-07-09 18:56:13 -05:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
2023-05-27 13:34:31 +00:00
|
|
|
DEPENDENCIES_ROOT="/tmp/openmw-deps"
|
|
|
|
|
2023-08-06 16:06:28 +00:00
|
|
|
QT_PATH=$(brew --prefix qt@5)
|
2023-05-27 13:34:31 +00:00
|
|
|
ICU_PATH=$(brew --prefix icu4c)
|
2024-01-08 22:29:59 +01:00
|
|
|
OPENAL_PATH=$(brew --prefix openal-soft)
|
2019-03-31 17:41:16 +02:00
|
|
|
CCACHE_EXECUTABLE=$(brew --prefix ccache)/bin/ccache
|
2016-03-06 14:49:34 +01:00
|
|
|
|
2024-07-14 19:33:26 -05:00
|
|
|
declare -a CMAKE_CONF_OPTS=(
|
|
|
|
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH;$OPENAL_PATH"
|
|
|
|
-D CMAKE_C_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE"
|
|
|
|
-D CMAKE_CXX_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE"
|
|
|
|
-D CMAKE_CXX_FLAGS="-stdlib=libc++"
|
2024-08-04 09:07:47 -05:00
|
|
|
-D CMAKE_C_COMPILER="clang"
|
|
|
|
-D CMAKE_CXX_COMPILER="clang++"
|
2024-07-29 09:18:21 -05:00
|
|
|
-D CMAKE_OSX_DEPLOYMENT_TARGET="13.6"
|
2024-07-22 16:08:07 -05:00
|
|
|
-D OPENMW_USE_SYSTEM_RECASTNAVIGATION=TRUE
|
2024-07-14 19:33:26 -05:00
|
|
|
-D Boost_INCLUDE_DIR="$DEPENDENCIES_ROOT/include"
|
|
|
|
-D OSGPlugins_LIB_DIR="$DEPENDENCIES_ROOT/lib/osgPlugins-3.6.5"
|
|
|
|
-D ICU_ROOT="$ICU_PATH"
|
|
|
|
-D OPENMW_OSX_DEPLOYMENT=TRUE
|
|
|
|
)
|
|
|
|
|
|
|
|
if [[ "${CMAKE_BUILD_TYPE}" ]]; then
|
|
|
|
CMAKE_CONF_OPTS+=(
|
|
|
|
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
|
|
|
)
|
|
|
|
else
|
|
|
|
CMAKE_CONF_OPTS+=(
|
|
|
|
-D CMAKE_BUILD_TYPE=RelWithDebInfo
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
2016-03-06 14:49:34 +01:00
|
|
|
cmake \
|
2024-07-14 19:33:26 -05:00
|
|
|
"${CMAKE_CONF_OPTS[@]}" \
|
2020-07-04 11:54:19 +02:00
|
|
|
-D BUILD_OPENMW=TRUE \
|
2020-07-22 21:54:18 +02:00
|
|
|
-D BUILD_OPENCS=TRUE \
|
2020-07-06 07:47:31 +02:00
|
|
|
-D BUILD_ESMTOOL=TRUE \
|
|
|
|
-D BUILD_BSATOOL=TRUE \
|
|
|
|
-D BUILD_ESSIMPORTER=TRUE \
|
|
|
|
-D BUILD_NIFTEST=TRUE \
|
2022-10-10 14:11:46 +00:00
|
|
|
-D BUILD_NAVMESHTOOL=TRUE \
|
|
|
|
-D BUILD_BULLETOBJECTTOOL=TRUE \
|
2016-03-06 14:49:34 +01:00
|
|
|
-G"Unix Makefiles" \
|
|
|
|
..
|