mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-31 06:32:39 +00:00
Add dependency to recastnavigation
This commit is contained in:
parent
4f2bfa1e9d
commit
3d97e96f55
@ -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++
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/sh -e
|
||||
|
||||
brew update
|
||||
|
||||
|
@ -5,6 +5,9 @@ free -m
|
||||
env GENERATOR='Unix Makefiles' CONFIGURATION=Release CI/build_googletest.sh
|
||||
GOOGLETEST_DIR="$(pwd)/googletest/build"
|
||||
|
||||
env GENERATOR='Unix Makefiles' CONFIGURATION=Release CI/build_recastnavigation.sh
|
||||
RECASTNAVIGATION_DIR="$(pwd)/recastnavigation/build"
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
export CODE_COVERAGE=1
|
||||
@ -18,4 +21,5 @@ ${ANALYZE}cmake \
|
||||
-DUSE_SYSTEM_TINYXML=TRUE \
|
||||
-DGTEST_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"
|
||||
fi
|
||||
|
||||
if [ ${BITS} -eq 64 ]; then
|
||||
GENERATOR="${GENERATOR} Win64"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "==================================="
|
||||
echo "Starting prebuild on MSVC${MSVC_DISPLAY_YEAR} WIN${BITS}"
|
||||
@ -449,7 +453,7 @@ fi
|
||||
else
|
||||
LIB_SUFFIX="0"
|
||||
fi
|
||||
|
||||
|
||||
add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \
|
||||
-DBOOST_LIBRARYDIR="${BOOST_SDK}/lib${BITS}-msvc-${MSVC_VER}.${LIB_SUFFIX}"
|
||||
add_cmake_opts -DBoost_COMPILER="-${TOOLSET}"
|
||||
@ -644,6 +648,13 @@ printf "SDL 2.0.7... "
|
||||
echo Done.
|
||||
}
|
||||
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/..
|
||||
echo
|
||||
echo "Setting up OpenMW build..."
|
||||
|
@ -1,8 +1,11 @@
|
||||
#!/bin/sh
|
||||
#!/bin/sh -e
|
||||
|
||||
export CXX=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"
|
||||
QT_PATH=`brew --prefix qt`
|
||||
mkdir build
|
||||
@ -17,5 +20,6 @@ cmake \
|
||||
-D DESIRED_QT_VERSION=5 \
|
||||
-D BUILD_ESMTOOL=FALSE \
|
||||
-D BUILD_MYGUI_PLUGIN=FALSE \
|
||||
-D RecastNavigation_ROOT="${RECASTNAVIGATION_DIR}" \
|
||||
-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}
|
||||
)
|
||||
|
||||
find_package(RecastNavigation COMPONENTS Detour Recast REQUIRED)
|
||||
|
||||
include_directories(SYSTEM ${RecastNavigation_INCLUDE_DIRS})
|
||||
|
||||
target_link_libraries(openmw
|
||||
${OSG_LIBRARIES}
|
||||
${OPENTHREADS_LIBRARIES}
|
||||
@ -133,6 +137,7 @@ target_link_libraries(openmw
|
||||
${FFmpeg_LIBRARIES}
|
||||
${MyGUI_LIBRARIES}
|
||||
${SDL2_LIBRARY}
|
||||
${RecastNavigation_LIBRARIES}
|
||||
"osg-ffmpeg-videoplayer"
|
||||
"oics"
|
||||
components
|
||||
|
@ -68,7 +68,7 @@ test: off
|
||||
#notifications:
|
||||
# - provider: Email
|
||||
# to:
|
||||
# -
|
||||
# -
|
||||
# on_build_failure: true
|
||||
# on_build_status_changed: true
|
||||
|
||||
|
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…
x
Reference in New Issue
Block a user