Add option to disable the building of vmap.
This commit is contained in:
parent
f55bf7f4bd
commit
6e06c8c301
3 changed files with 22 additions and 15 deletions
|
@ -3,6 +3,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
|||
project(WorldSpawn C CXX)
|
||||
|
||||
option(BUILD_RADIANT "Build the GUI" ON)
|
||||
option(BUILD_VMAP "Build the Compiler" ON)
|
||||
|
||||
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/install" CACHE PATH "..." FORCE)
|
||||
|
@ -18,8 +19,8 @@ set(WorldSpawn_VERSION_MINOR 1)
|
|||
set(WorldSpawn_VERSION_PATCH 0)
|
||||
set(WorldSpawn_VERSION "${WorldSpawn_VERSION_MAJOR}.${WorldSpawn_VERSION_MINOR}.${WorldSpawn_VERSION_PATCH}")
|
||||
|
||||
SET(CMAKE_C_COMPILER gcc-9)
|
||||
SET(CMAKE_CXX_COMPILER g++-9)
|
||||
#SET(CMAKE_C_COMPILER gcc-9)
|
||||
#SET(CMAKE_CXX_COMPILER g++-9)
|
||||
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/WorldSpawn_MAJOR" ${WorldSpawn_VERSION_MAJOR})
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/WorldSpawn_MINOR" ${WorldSpawn_VERSION_MINOR})
|
||||
|
@ -156,6 +157,12 @@ endif ()
|
|||
include_directories("${PROJECT_SOURCE_DIR}/include")
|
||||
include_directories("${PROJECT_SOURCE_DIR}/libs")
|
||||
|
||||
# For our OpenBSD friends, because CMake isn't smart enough to figure that out?
|
||||
include_directories("/usr/local/include")
|
||||
link_directories("/usr/local/lib")
|
||||
include_directories("/usr/X11R6/include")
|
||||
link_directories("/usr/X11R6/lib")
|
||||
|
||||
if (WIN32 AND NOT CMAKE_CROSSCOMPILING)
|
||||
set(BUNDLE_LIBRARIES_DEFAULT ON)
|
||||
else ()
|
||||
|
@ -238,7 +245,9 @@ endif ()
|
|||
# Tools
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
add_subdirectory(tools)
|
||||
if (BUILD_VMAP)
|
||||
add_subdirectory(tools)
|
||||
endif ()
|
||||
|
||||
file(GLOB DATA_FILES "${PROJECT_SOURCE_DIR}/resources/*")
|
||||
|
||||
|
|
|
@ -72,8 +72,6 @@ int CountBits( byte *bits, int numbits ){
|
|||
}
|
||||
|
||||
int c_fullskip;
|
||||
int c_portalskip, c_leafskip;
|
||||
int c_vistest, c_mighttest;
|
||||
|
||||
int c_chop, c_nochop;
|
||||
|
||||
|
|
|
@ -107,6 +107,15 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
// hack to declare and define in the same file
|
||||
#ifdef MAIN_C
|
||||
#define Q_EXTERN
|
||||
#define Q_ASSIGN( a ) = a
|
||||
#else
|
||||
#define Q_EXTERN extern
|
||||
#define Q_ASSIGN( a )
|
||||
#endif
|
||||
|
||||
/* macro version */
|
||||
#define VectorMA( a, s, b, c ) ( ( c )[ 0 ] = ( a )[ 0 ] + ( s ) * ( b )[ 0 ], ( c )[ 1 ] = ( a )[ 1 ] + ( s ) * ( b )[ 1 ], ( c )[ 2 ] = ( a )[ 2 ] + ( s ) * ( b )[ 2 ] )
|
||||
|
||||
|
@ -988,7 +997,7 @@ typedef enum
|
|||
}
|
||||
surfaceType_t;
|
||||
|
||||
char *surfaceTypes[ NUM_SURFACE_TYPES ]
|
||||
Q_EXTERN char *surfaceTypes[ NUM_SURFACE_TYPES ]
|
||||
#ifndef MAIN_C
|
||||
;
|
||||
#else
|
||||
|
@ -1940,14 +1949,6 @@ void WriteRBSPFile( const char *filename );
|
|||
|
||||
------------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef MAIN_C
|
||||
#define Q_EXTERN
|
||||
#define Q_ASSIGN( a ) = a
|
||||
#else
|
||||
#define Q_EXTERN extern
|
||||
#define Q_ASSIGN( a )
|
||||
#endif
|
||||
|
||||
/* game support */
|
||||
Q_EXTERN game_t games[]
|
||||
#ifndef MAIN_C
|
||||
|
@ -1986,7 +1987,6 @@ Q_EXTERN float jitters[ MAX_JITTERS ];
|
|||
|
||||
|
||||
/* commandline arguments */
|
||||
Q_EXTERN qboolean verbose;
|
||||
Q_EXTERN qboolean verboseEntities Q_ASSIGN( qfalse );
|
||||
Q_EXTERN qboolean force Q_ASSIGN( qfalse );
|
||||
Q_EXTERN qboolean infoMode Q_ASSIGN( qfalse );
|
||||
|
|
Loading…
Reference in a new issue