1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-10-07 11:26:31 +00:00
openmw-tes3mp/cmake
backlabs1 94c914bfb1
Rewrite cmake/FindRakNet.cmake
This commit fixes (at least) the following problems:

1. cmake will "find" RakNet include directory even if the cmake option
   `-DRakNet_INCLUDES` CACHE entry value is incorrect. The build will
   fail later when an included RakNet file is missing. (To test,
   change to `-DRakNet_INCLUDES="/tmp/CrabNet/includex"` below.)

2. cmake will not find the RakNet Release library (which exists at the
   path specified with `-DRakNet_LIBRARY_RELEASE`) unless
   `-DRakNet_LIBRARY_DEBUG` is defined (to any value). (To test,
   remove the `-DRakNet_LIBRARY_DEBUG` line below.)

3. cmake will not find anything if only the environment variable
   `RAKNET_ROOT` is set, although it appears that it was intended to
   be used as a search path. (To test, add `RAKNET_ROOT=/tmp/CrabNet`
   and remove the three `-DRakNet_` lines.)

This commit was tested with the following cmake command in a Debian
bookworm container with CrabNet and osg directories in `/tmp`:

```sh
mkdir build/
cd build/
cmake .. -DBUILD_BROWSER=OFF \
         -DBUILD_BSATOOL=OFF \
         -DBUILD_ESMTOOL=OFF \
         -DBUILD_ESSIMPORTER=OFF \
         -DBUILD_LAUNCHER=OFF \
         -DBUILD_MWINIIMPORTER=OFF \
         -DBUILD_NIFTEST=OFF \
         -DBUILD_OPENCS=OFF \
         -DBUILD_OPENMW=ON \
         -DBUILD_OPENMW_MP=OFF \
         -DBUILD_WIZARD=OFF \
         -DCMAKE_BUILD_TYPE=Release \
         -DOPENSCENEGRAPH_INCLUDE_DIRS=/tmp/osg/include \
         -DRakNet_INCLUDES="/tmp/CrabNet/include" \
         -DRakNet_LIBRARY_DEBUG="/tmp/CrabNet/lib/libRakNetLibStaticd.a" \
         -DRakNet_LIBRARY_RELEASE="/tmp/CrabNet/lib/libRakNetLibStatic.a"
make -j $(nproc)
```
2024-02-12 20:18:20 -06:00
..
base64.cmake Add CMake-based base64 port 2021-05-05 23:51:07 +01:00
CheckBulletPrecision.cmake Simplify the bullet detection. This way we don't need to explicitly pass 2021-05-04 22:18:30 +02:00
COPYING-CMAKE-SCRIPTS OS X: remove custom bundle utilities, ones from CMake versions >= 3.1.0 are good enough 2015-11-14 13:50:01 +01:00
FindCallFF.cmake [General] Fix finding CallFF includes 2017-07-04 01:15:11 +08:00
FindFFmpeg.cmake Rename FFMPEG_SDK -> FFMPEG_HOME as it is said in wiki 2016-05-30 04:26:31 +03:00
FindGMock.cmake Remove GTest and ExternalProject from FindGMock.cmake 2021-04-03 02:15:00 +02:00
FindLIBUNSHIELD.cmake http to https for supported urls (#1625) 2018-03-08 21:23:24 +01:00
FindLuaJit.cmake Fix CMake files to allow build server only 2020-01-14 13:44:14 +08:00
FindLZ4.cmake lz4 prep work; get linux and windows ready 2020-10-19 22:31:42 +03:00
FindMyGUI.cmake Rewrites FindMyGUI with LibFindMacros 2016-08-15 15:59:02 +03:00
FindOSGPlugins.cmake Fix OSGPlugins_LIB_DIR on the MacOS build 2021-02-19 19:00:24 +00:00
FindRakNet.cmake Rewrite cmake/FindRakNet.cmake 2024-02-12 20:18:20 -06:00
FindRecastNavigation.cmake Support custom recastnavigation system path 2021-03-04 18:13:13 +01:00
FindSDL2.cmake Fix CMake files to allow build server only 2020-01-14 13:44:14 +08:00
FindSphinx.cmake Reduce the number of copypaste in FindSphinx.cmake 2016-08-15 22:29:07 +03:00
FindTinyXML.cmake Removes PreprocessorUtils.cmake 2016-06-28 13:03:16 +03:00
GitVersion.cmake Remove duplicate macro definition and fix warning 2017-10-12 02:45:50 +01:00
LibFindMacros.cmake Fix MyGUI detection 2021-01-13 02:51:43 +00:00
OpenMWMacros.cmake Add OpenMW commits up to 21 May 2021 2021-05-21 16:00:09 +02:00
WholeArchive.cmake WholeArchive.cmake: Fix mismatched args warning 2021-01-26 19:00:55 +00:00