Torque3D/Tools/CMake/torqueConfig.h.in
marauder2k7 3b4ce5f4b5 cmake option
cmake option to enable the templated matrix class, this is still in review phase, if it gets merged into main, probably best to remove this options just in case someone activates it accidentally.
2024-08-01 18:29:38 +01:00

231 lines
9.2 KiB
C

//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
//-----------------------------------------------------------------------------
//Hi, and welcome to the Torque Config file.
//
//This file is a central reference for the various configuration flags that
//you'll be using when controlling what sort of a Torque build you have. In
//general, the information here is global for your entire codebase, applying
//not only to your game proper, but also to all of your tools.
/// What's the name of your application? Used in a variety of places.
#define TORQUE_APP_NAME "@TORQUE_APP_NAME@"
#cmakedefine USE_TEMPLATE_MATRIX
/// What version of the application specific source code is this?
///
/// Version number is major * 1000 + minor * 100 + revision * 10.
#define TORQUE_APP_VERSION @TORQUE_APP_VERSION@
/// Human readable application version string.
#define TORQUE_APP_VERSION_STRING "@TORQUE_APP_VERSION_STRING@"
/// Define me if you want path case insensitivity support on POSIX systems. Does nothing on Windows.
#cmakedefine TORQUE_POSIX_PATH_CASE_INSENSITIVE
/// Define me if you want path case insensitivity support in ZIP files.
#cmakedefine TORQUE_ZIP_PATH_CASE_INSENSITIVE
/// Define me if you want to enable secure VFS support.
#cmakedefine TORQUE_SECURE_VFS
/// Define me if you want to enable multithreading support.
#cmakedefine TORQUE_MULTITHREAD
/// Define me if you want to disable Torque memory manager.
#cmakedefine TORQUE_DISABLE_MEMORY_MANAGER
/// Define me if you want to disable the virtual mount system.
#cmakedefine TORQUE_DISABLE_VIRTUAL_MOUNT_SYSTEM
/// Define me if you want to disable looking for the root of a given path
/// within a zip file. This means that the zip file name itself must be
/// the root of the path. Requires the virtual mount system to be active.
/// i.e. data/ui.zip would be mounted as data/ui, so the zip should not
/// contain the ui folder, only it's contents. The one exception to this
/// is if a file game.zip is located in the executable directory. The zip
/// name 'game' will NOT be added as an extra directory.
#cmakedefine TORQUE_DISABLE_FIND_ROOT_WITHIN_ZIP
/// Define me if you want to use the alternative zip support where you can
/// define your directories and files inside the zip just like you would on disk
/// instead of the default zip support that treats the zip as an extra directory.
/// With this define, all zips should be placed in the executable directory and
/// contain the full path structure to the files.
#cmakedefine TORQUE_ZIP_DISK_LAYOUT
/// If this is defined all zip file names and mount directories will need to
/// be all lower case (even on windows). This is because the root map
/// mRootMap.tryGetValue(root, fsList) call is case sensitive. Define to match
/// legacy zip case behavior.
/* #undef TORQUE_LOWER_ZIPCASE */
/// Define me if you don't want Torque to compile dso's
#cmakedefine TORQUE_NO_DSO_GENERATION
/// Define the default extension to be used for TorqueScript files
#cmakedefine TORQUE_SCRIPT_EXTENSION "@TORQUE_SCRIPT_EXTENSION@"
/// Specify a console function to execute instead of looking for a main.tscript file
#cmakedefine TORQUE_ENTRY_FUNCTION "@TORQUE_ENTRY_FUNCTION@"
// Define me if this build is a tools build
#cmakedefine TORQUE_PLAYER
/// Define me if you want to enable the profiler.
/// See also the TORQUE_SHIPPING block below
#cmakedefine TORQUE_ENABLE_PROFILER
/// Define me to enable debug mode; enables a great number of additional
/// sanity checks, as well as making AssertFatal and AssertWarn do something.
/// This is usually defined by the build target.
// TORQUE_DEBUG is now set dynamically and not here anymore
// #cmakedefine TORQUE_DEBUG
#cmakedefine DEBUG_SPEW
#cmakedefine TORQUE_DEBUG_GFX_MODE
/// Define me if this is a shipping build; if defined I will instruct Torque
/// to batten down some hatches and generally be more "final game" oriented.
/// Notably this disables a liberal resource manager file searching, and
/// console help strings.
#cmakedefine TORQUE_SHIPPING
/// Define me to enable a variety of network debugging aids.
///
/// - NetConnection packet logging.
/// - DebugChecksum guards to detect mismatched pack/unpacks.
/// - Detection of invalid destination ghosts.
///
#cmakedefine TORQUE_DEBUG_NET
/// Define me to enable detailed console logging of net moves.
#cmakedefine TORQUE_DEBUG_NET_MOVES
/// Enable this define to change the default Net::MaxPacketDataSize
/// Do this at your own risk since it has the potential to cause packets
/// to be split up by old routers and Torque does not have a mechanism to
/// stitch split packets back together. Using this define can be very useful
/// in controlled network hardware environments (like a LAN) or for singleplayer
/// games (like BArricade and its large paths)
//#define MAXPACKETSIZE 1500
/// Modify me to enable metric gathering code in the renderers.
///
/// 0 does nothing; higher numbers enable higher levels of metric gathering.
//#define TORQUE_GATHER_METRICS 0
/// Define me if you want to enable debug guards in the memory manager.
///
/// Debug guards are known values placed before and after every block of
/// allocated memory. They are checked periodically by Memory::validate(),
/// and if they are modified (indicating an access to memory the app doesn't
/// "own"), an error is flagged (ie, you'll see a crash in the memory
/// manager's validate code). Using this and a debugger, you can track down
/// memory corruption issues quickly.
//#define TORQUE_DEBUG_GUARD
/// Define me if you want to enable instanced-static behavior
//#define TORQUE_ENABLE_THREAD_STATICS
/// Define me if you want to gather static-usage metrics
//#define TORQUE_ENABLE_THREAD_STATIC_METRICS
/// Define me if you want to enable debug guards on the FrameAllocator.
///
/// This is similar to the above memory manager guards, but applies only to the
/// fast FrameAllocator temporary pool memory allocations. The guards are only
/// checked when the FrameAllocator frees memory (when it's water mark changes).
/// This is most useful for detecting buffer overruns when using FrameTemp<> .
/// A buffer overrun in the FrameAllocator is unlikely to cause a crash, but may
/// still result in unexpected behavior, if other FrameTemp's are stomped.
//#define FRAMEALLOCATOR_DEBUG_GUARD
/// This #define is used by the FrameAllocator to set the size of the frame.
///
/// It was previously set to 3MB but I've increased it to 32MB due to the
/// FrameAllocator being used as temporary storage for bitmaps in the D3D9
/// texture manager.
#define TORQUE_FRAME_SIZE 32 << 20
// Finally, we define some dependent #defines. This enables some subsidiary
// functionality to get automatically turned on in certain configurations.
#ifdef TORQUE_DEBUG
#define TORQUE_GATHER_METRICS 0
#ifndef TORQUE_DEBUG_GUARD
#define TORQUE_DEBUG_GUARD
#endif
#ifndef TORQUE_NET_STATS
#define TORQUE_NET_STATS
#endif
// Enables the C++ assert macros AssertFatal, AssertWarn, etc.
#ifndef TORQUE_ENABLE_ASSERTS
#define TORQUE_ENABLE_ASSERTS
#endif
#endif
#ifdef TORQUE_RELEASE
// If it's not DEBUG, it's a RELEASE build, put appropriate things here.
#endif
#ifdef TORQUE_SHIPPING
// TORQUE_SHIPPING flags here.
#else
// Enable the profiler by default, if we're not doing a shipping build.
#define TORQUE_ENABLE_PROFILER
#ifdef TORQUE_DEBUG
#define TORQUE_ENABLE_PROFILE_PATH
#endif
// Enable the TorqueScript assert() instruction if not shipping.
#define TORQUE_ENABLE_SCRIPTASSERTS
// We also enable GFX debug events for use in Pix and other graphics
// debugging tools.
#define TORQUE_ENABLE_GFXDEBUGEVENTS
#endif
#ifdef TORQUE_TOOLS
# define TORQUE_INSTANCE_EXCLUSION "TorqueToolsTest"
#else
# define TORQUE_INSTANCE_EXCLUSION "TorqueTest"
#endif
//use sdl backend?
#if defined(TORQUE_SDL)
#include <SDL.h>
#endif
/// Password to use when opening encrypted zip files. Change this to whatever the password is for your zips.
#define DEFAULT_ZIP_PASSWORD "@TORQUE_APP_PASSWORD@"