]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Merge branch 'freebsd' into 'master'
authorThomas Debesse <gitlab@illwieckz.net>
Sun, 2 Jun 2019 01:21:39 +0000 (01:21 +0000)
committerThomas Debesse <gitlab@illwieckz.net>
Sun, 2 Jun 2019 01:21:39 +0000 (01:21 +0000)
FreeBSD support

See merge request xonotic/netradiant!75

CMakeLists.txt
README.md
libs/math/vector.h
tools/quake3/common/vfs.h

index 96ffb84ffbc6371fb44612e1e92731ed3a1c35e9..1117e3fab54f2f1b4c8e2cadd5041a911df28baf 100644 (file)
@@ -169,6 +169,12 @@ if (BUILD_RADIANT)
     disable_deprecated(PANGO 0)
 endif ()
 
+IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+    link_directories(
+            /usr/local/lib
+    )
+endif ()
+
 if (BUILD_BINARIES)
     if (APPLE)
         if (BUILD_RADIANT)
index 4b263bbef6bce49e19e7a7c134b06f9d809b1651..4824192d708e54f41aa86f97ee254616ec20e0c6 100644 (file)
--- a/README.md
+++ b/README.md
@@ -100,6 +100,12 @@ On macOS you have to add this to the first cmake call:
 -DCMAKE_C_COMPILER=/usr/local/bin/gcc-9 -DCMAKE_CXX_COMPILER=/usr/local/bin/g++-9 -DOPENGL_INCLUDE_DIR=/opt/X11/include -DOPENGL_gl_LIBRARY=/opt/X11/lib/libGL.dylib
 ```
 
+On FreeBSD you have to add this to the first cmake call:
+
+```
+cmake -G "Unix Makefiles" -DCMAKE_C_COMPILER=/usr/local/bin/gcc8 -DCMAKE_CXX_COMPILER=/usr/local/bin/g++8
+```
+
 ## Build and installation details
 
 ### Compilation details
index 9bb3ef5111a0bdbb712f7453f13b26b4896784a1..c2b45b501ffe1d7e592e1865515e4b091264fc04 100644 (file)
@@ -46,16 +46,6 @@ inline __int64 llrint( double f ){
        return static_cast<__int64>( f + 0.5 );
 }
 
-#elif GDEF_OS_BSD
-
-inline long lrint( double f ){
-       return static_cast<long>( f + 0.5 );
-}
-
-inline long long llrint( double f ){
-       return static_cast<long long>( f + 0.5 );
-}
-
 #elif GDEF_COMPILER_GNU
 
 // lrint is part of ISO C99
index 6920fd1c4153d792c988fe612d823b2e52cc0982..227a2f29f76fe05f4800c163e6b7620615a0e146 100644 (file)
 #define PATH_MAX 260
 #endif // PATH_MAX
 
+// PATH_MAX
+#if defined( __FreeBSD__ )
+#include <sys/syslimits.h>
+#endif
+
 #define VFS_MAXDIRS 64
 
 void vfsInitDirectory( const char *path );