mirror of
https://github.com/Garux/netradiant-custom.git
synced 2026-09-28 00:00:03 +02:00
Fix compile on CentOS 7
This commit is contained in:
+18
-7
@@ -1,4 +1,6 @@
|
||||
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR)
|
||||
|
||||
option(SKIP_RADIANT "don't build the gui, useful for map compile servers" OFF)
|
||||
|
||||
project(NetRadiant C CXX)
|
||||
|
||||
@@ -150,19 +152,25 @@ add_library(includes ${INCLUDELIST})
|
||||
# Plugins
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
add_subdirectory(contrib)
|
||||
if (NOT SKIP_RADIANT)
|
||||
add_subdirectory(contrib)
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Modules
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
add_subdirectory(plugins)
|
||||
if (NOT SKIP_RADIANT)
|
||||
add_subdirectory(plugins)
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Radiant
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
add_subdirectory(radiant build)
|
||||
if (NOT SKIP_RADIANT)
|
||||
add_subdirectory(radiant build)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_EXECUTABLE_SUFFIX)
|
||||
set(RADIANT_EXECUTABLE ${CMAKE_EXECUTABLE_SUFFIX})
|
||||
@@ -173,9 +181,12 @@ else ()
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
endif ()
|
||||
set_target_properties(radiant PROPERTIES
|
||||
COMPILE_DEFINITIONS RADIANT_EXECUTABLE="${RADIANT_EXECUTABLE}"
|
||||
)
|
||||
|
||||
if (NOT SKIP_RADIANT)
|
||||
set_target_properties(radiant PROPERTIES
|
||||
COMPILE_DEFINITIONS RADIANT_EXECUTABLE="${RADIANT_EXECUTABLE}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Tools
|
||||
|
||||
+3
-1
@@ -10,7 +10,9 @@ add_subdirectory(debugging)
|
||||
add_subdirectory(etclib)
|
||||
add_subdirectory(filematch)
|
||||
add_subdirectory(generic)
|
||||
add_subdirectory(gtkutil)
|
||||
if (NOT SKIP_RADIANT)
|
||||
add_subdirectory(gtkutil)
|
||||
endif ()
|
||||
add_subdirectory(l_net)
|
||||
add_subdirectory(math)
|
||||
add_subdirectory(mathlib)
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include "l_net_wins.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
typedef unsigned short u_short;
|
||||
typedef unsigned long u_long;
|
||||
#include <sys/socket.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
#include <io.h>
|
||||
#define R_OK 04
|
||||
#define S_ISDIR( mode ) ( mode & _S_IFDIR )
|
||||
#endif
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 260
|
||||
#endif
|
||||
#include <glib.h>
|
||||
|
||||
@@ -336,6 +336,7 @@ void PackDirectory_r( char *dir ){
|
||||
#include <sys/types.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/dir.h>
|
||||
#include <sys/stat.h>
|
||||
#else
|
||||
#include <sys/dirent.h>
|
||||
#endif
|
||||
@@ -372,7 +373,7 @@ void PackDirectory_r( char *dir ){
|
||||
if ( stat( dirstring, &st ) == -1 ) {
|
||||
Error( "fstating %s", pf->name );
|
||||
}
|
||||
if ( st.st_mode & S_IFDIR ) { // directory
|
||||
if ( S_ISDIR(st.st_mode) ) { // directory
|
||||
PackDirectory_r( fullname );
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user