-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)
# 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})
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
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)
#include <sys/types.h>
#ifndef WIN32
#include <sys/dir.h>
+#include <sys/stat.h>
#else
#include <sys/dirent.h>
#endif
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;
}