mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Add dependency to recastnavigation
This commit is contained in:
parent
4f2bfa1e9d
commit
3d97e96f55
9 changed files with 86 additions and 5 deletions
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh -e
|
||||||
sudo ln -s /usr/bin/clang-3.6 /usr/local/bin/clang
|
sudo ln -s /usr/bin/clang-3.6 /usr/local/bin/clang
|
||||||
sudo ln -s /usr/bin/clang++-3.6 /usr/local/bin/clang++
|
sudo ln -s /usr/bin/clang++-3.6 /usr/local/bin/clang++
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh -e
|
||||||
|
|
||||||
brew update
|
brew update
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@ free -m
|
||||||
env GENERATOR='Unix Makefiles' CONFIGURATION=Release CI/build_googletest.sh
|
env GENERATOR='Unix Makefiles' CONFIGURATION=Release CI/build_googletest.sh
|
||||||
GOOGLETEST_DIR="$(pwd)/googletest/build"
|
GOOGLETEST_DIR="$(pwd)/googletest/build"
|
||||||
|
|
||||||
|
env GENERATOR='Unix Makefiles' CONFIGURATION=Release CI/build_recastnavigation.sh
|
||||||
|
RECASTNAVIGATION_DIR="$(pwd)/recastnavigation/build"
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
export CODE_COVERAGE=1
|
export CODE_COVERAGE=1
|
||||||
|
@ -18,4 +21,5 @@ ${ANALYZE}cmake \
|
||||||
-DUSE_SYSTEM_TINYXML=TRUE \
|
-DUSE_SYSTEM_TINYXML=TRUE \
|
||||||
-DGTEST_ROOT="${GOOGLETEST_DIR}" \
|
-DGTEST_ROOT="${GOOGLETEST_DIR}" \
|
||||||
-DGMOCK_ROOT="${GOOGLETEST_DIR}" \
|
-DGMOCK_ROOT="${GOOGLETEST_DIR}" \
|
||||||
|
-DRecastNavigation_ROOT="${RECASTNAVIGATION_DIR}" \
|
||||||
..
|
..
|
||||||
|
|
|
@ -304,6 +304,10 @@ if ! [ -z $UNITY_BUILD ]; then
|
||||||
add_cmake_opts "-DOPENMW_UNITY_BUILD=True"
|
add_cmake_opts "-DOPENMW_UNITY_BUILD=True"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ${BITS} -eq 64 ]; then
|
||||||
|
GENERATOR="${GENERATOR} Win64"
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "==================================="
|
echo "==================================="
|
||||||
echo "Starting prebuild on MSVC${MSVC_DISPLAY_YEAR} WIN${BITS}"
|
echo "Starting prebuild on MSVC${MSVC_DISPLAY_YEAR} WIN${BITS}"
|
||||||
|
@ -644,6 +648,13 @@ printf "SDL 2.0.7... "
|
||||||
echo Done.
|
echo Done.
|
||||||
}
|
}
|
||||||
echo
|
echo
|
||||||
|
# recastnavigation
|
||||||
|
printf 'recastnavigation...'
|
||||||
|
{
|
||||||
|
env GENERATOR="${GENERATOR}" CONFIGURATION="${CONFIGURATION}" ${DEPS_INSTALL}/../../CI/build_recastnavigation.sh
|
||||||
|
add_cmake_opts -DRecastNavigation_ROOT="$(pwd)/recastnavigation/build"
|
||||||
|
}
|
||||||
|
echo
|
||||||
cd $DEPS_INSTALL/..
|
cd $DEPS_INSTALL/..
|
||||||
echo
|
echo
|
||||||
echo "Setting up OpenMW build..."
|
echo "Setting up OpenMW build..."
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh -e
|
||||||
|
|
||||||
export CXX=clang++
|
export CXX=clang++
|
||||||
export CC=clang
|
export CC=clang
|
||||||
|
|
||||||
|
env GENERATOR='Unix Makefiles' CONFIGURATION=Release CI/build_recastnavigation.sh
|
||||||
|
RECASTNAVIGATION_DIR="$(pwd)/recastnavigation/build"
|
||||||
|
|
||||||
DEPENDENCIES_ROOT="/private/tmp/openmw-deps/openmw-deps"
|
DEPENDENCIES_ROOT="/private/tmp/openmw-deps/openmw-deps"
|
||||||
QT_PATH=`brew --prefix qt`
|
QT_PATH=`brew --prefix qt`
|
||||||
mkdir build
|
mkdir build
|
||||||
|
@ -17,5 +20,6 @@ cmake \
|
||||||
-D DESIRED_QT_VERSION=5 \
|
-D DESIRED_QT_VERSION=5 \
|
||||||
-D BUILD_ESMTOOL=FALSE \
|
-D BUILD_ESMTOOL=FALSE \
|
||||||
-D BUILD_MYGUI_PLUGIN=FALSE \
|
-D BUILD_MYGUI_PLUGIN=FALSE \
|
||||||
|
-D RecastNavigation_ROOT="${RECASTNAVIGATION_DIR}" \
|
||||||
-G"Unix Makefiles" \
|
-G"Unix Makefiles" \
|
||||||
..
|
..
|
||||||
|
|
17
CI/build_recastnavigation.sh
Executable file
17
CI/build_recastnavigation.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
git clone https://github.com/recastnavigation/recastnavigation.git
|
||||||
|
cd recastnavigation
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE="${CONFIGURATION}" \
|
||||||
|
-DRECASTNAVIGATION_DEMO=OFF \
|
||||||
|
-DRECASTNAVIGATION_TESTS=OFF \
|
||||||
|
-DRECASTNAVIGATION_EXAMPLES=OFF \
|
||||||
|
-DRECASTNAVIGATION_STATIC=ON \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=. \
|
||||||
|
-G "${GENERATOR}" \
|
||||||
|
..
|
||||||
|
cmake --build . --config "${CONFIGURATION}"
|
||||||
|
cmake --build . --target install --config "${CONFIGURATION}"
|
|
@ -117,6 +117,10 @@ include_directories(
|
||||||
${FFmpeg_INCLUDE_DIRS}
|
${FFmpeg_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
find_package(RecastNavigation COMPONENTS Detour Recast REQUIRED)
|
||||||
|
|
||||||
|
include_directories(SYSTEM ${RecastNavigation_INCLUDE_DIRS})
|
||||||
|
|
||||||
target_link_libraries(openmw
|
target_link_libraries(openmw
|
||||||
${OSG_LIBRARIES}
|
${OSG_LIBRARIES}
|
||||||
${OPENTHREADS_LIBRARIES}
|
${OPENTHREADS_LIBRARIES}
|
||||||
|
@ -133,6 +137,7 @@ target_link_libraries(openmw
|
||||||
${FFmpeg_LIBRARIES}
|
${FFmpeg_LIBRARIES}
|
||||||
${MyGUI_LIBRARIES}
|
${MyGUI_LIBRARIES}
|
||||||
${SDL2_LIBRARY}
|
${SDL2_LIBRARY}
|
||||||
|
${RecastNavigation_LIBRARIES}
|
||||||
"osg-ffmpeg-videoplayer"
|
"osg-ffmpeg-videoplayer"
|
||||||
"oics"
|
"oics"
|
||||||
components
|
components
|
||||||
|
|
40
cmake/FindRecastNavigation.cmake
Normal file
40
cmake/FindRecastNavigation.cmake
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
find_path(RecastNavigation_INCLUDE_DIR
|
||||||
|
NAMES Recast.h
|
||||||
|
HINTS $ENV{RecastNavigation_ROOT}
|
||||||
|
${RecastNavigation_ROOT}
|
||||||
|
PATH_SUFFIXES include
|
||||||
|
)
|
||||||
|
mark_as_advanced(RecastNavigation_INCLUDE_DIR)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
set(RecastNavigation_LIBRARIES "")
|
||||||
|
|
||||||
|
foreach(COMPONENT ${RecastNavigation_FIND_COMPONENTS})
|
||||||
|
if(NOT RecastNavigation_${COMPONENT}_FOUND)
|
||||||
|
find_library(RecastNavigation_${COMPONENT}_LIBRARY
|
||||||
|
HINTS $ENV{RecastNavigation_ROOT}
|
||||||
|
${RecastNavigation_ROOT}
|
||||||
|
NAMES ${COMPONENT}
|
||||||
|
PATH_SUFFIXES lib
|
||||||
|
)
|
||||||
|
find_package_handle_standard_args(RecastNavigation_${COMPONENT} DEFAULT_MSG
|
||||||
|
RecastNavigation_${COMPONENT}_LIBRARY
|
||||||
|
RecastNavigation_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
mark_as_advanced(RecastNavigation_${COMPONENT}_LIBRARY)
|
||||||
|
if(RecastNavigation_${COMPONENT}_FOUND)
|
||||||
|
list(APPEND RecastNavigation_LIBRARIES ${RecastNavigation_${COMPONENT}_LIBRARY})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
mark_as_advanced(RecastNavigation_LIBRARIES)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(RecastNavigation DEFAULT_MSG
|
||||||
|
RecastNavigation_LIBRARIES
|
||||||
|
RecastNavigation_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(RecastNavigation_FOUND)
|
||||||
|
set(RecastNavigation_INCLUDE_DIRS ${RecastNavigation_INCLUDE_DIR})
|
||||||
|
endif()
|
Loading…
Reference in a new issue