*.[oda]
+.idea/
.settings
-games
-install
-games
+build/
+games/
+install/
--- /dev/null
+language: c++
+
+sudo: required
+
+services:
+ - docker
+
+os:
+ - linux
+ - osx
+
+compiler:
+ - clang
+ - gcc
+
+before_script:
+ - cmake --version
+ - if [ "$TRAVIS_OS_NAME" == "linux" ]; then
+ sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" &&
+ sudo apt-get -qq update &&
+ sudo apt-get -qq -f install &&
+ sudo apt-get -qq install libgtk2.0-dev libgtkglext1-dev;
+ fi
+ - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
+ brew update &&
+ brew install gtkglext &&
+ brew link --force gettext;
+ fi
+
+script:
+ - cmake -H. -Bbuild
+ - cmake --build build -- -j4
--- /dev/null
+cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR)
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
+# Enable Debug by default, can be changed with -DCMAKE_BUILD_TYPE=Release
+if (NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE Debug)
+endif ()
+
+project(NetRadiant C CXX)
+option(BUILD_RADIANT "Build the gui" ON)
+
+#-----------------------------------------------------------------------
+# Version
+#-----------------------------------------------------------------------
+
+# CMake 3.0+ would allow this in project()
+set(NetRadiant_VERSION_MAJOR 1)
+set(NetRadiant_VERSION_MINOR 5)
+set(NetRadiant_VERSION_PATCH 0)
+set(NetRadiant_VERSION "${NetRadiant_VERSION_MAJOR}.${NetRadiant_VERSION_MINOR}.${NetRadiant_VERSION_PATCH}")
+
+file(WRITE "${PROJECT_BINARY_DIR}/RADIANT_MAJOR" ${NetRadiant_VERSION_MAJOR})
+file(WRITE "${PROJECT_BINARY_DIR}/RADIANT_MINOR" ${NetRadiant_VERSION_MINOR})
+
+set(RADIANT_ABOUTMSG "Custom build" CACHE STRING "About message")
+
+find_package(Git REQUIRED)
+execute_process(
+ COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ OUTPUT_VARIABLE GIT_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+set(RADIANT_VERSION_STRING "${NetRadiant_VERSION}n")
+if (GIT_VERSION)
+ set(RADIANT_VERSION_STRING "${RADIANT_VERSION_STRING}-git-${GIT_VERSION}")
+endif ()
+
+message(STATUS "Building ${PROJECT_NAME} ${RADIANT_VERSION_STRING} ${RADIANT_ABOUTMSG}")
+
+#-----------------------------------------------------------------------
+# Language standard
+#-----------------------------------------------------------------------
+
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+# For some reason the above flags don't really work...
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
+ include(CheckCXXCompilerFlag)
+ check_cxx_compiler_flag(--std=c++${CMAKE_CXX_STANDARD} STD_CXX)
+ if (STD_CXX)
+ list(APPEND CMAKE_CXX_FLAGS --std=c++${CMAKE_CXX_STANDARD})
+ else ()
+ message(SEND_ERROR "Requires C++${CMAKE_CXX_STANDARD} or better")
+ endif ()
+else ()
+ message(WARNING "Unrecognized compiler: ${CMAKE_CXX_COMPILER_ID}, make sure it supports C++${CMAKE_CXX_STANDARD}")
+endif ()
+
+#-----------------------------------------------------------------------
+# Flags
+#-----------------------------------------------------------------------
+
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-strict-aliasing")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing -fno-exceptions -fno-rtti")
+set(CMAKE_POSITION_INDEPENDENT_CODE 1)
+
+#-----------------------------------------------------------------------
+# Defs
+#-----------------------------------------------------------------------
+
+add_definitions(-DRADIANT_VERSION="${NetRadiant_VERSION}")
+add_definitions(-DRADIANT_MAJOR_VERSION="${NetRadiant_VERSION_MAJOR}")
+add_definitions(-DRADIANT_MINOR_VERSION="${NetRadiant_VERSION_MINOR}")
+
+add_definitions(-DRADIANT_ABOUTMSG="${NetRadiant_ABOUT}")
+
+if (CMAKE_BUILD_TYPE MATCHES Debug)
+ add_definitions(-D_DEBUG=1)
+endif ()
+
+if (APPLE)
+ option(XWINDOWS "Build against X11" ON)
+ add_definitions(
+ -DPOSIX=1
+ )
+elseif (WIN32)
+ add_definitions(
+ -DWIN32=1
+ -D_WIN32=1
+ )
+else ()
+ set(XWINDOWS ON)
+ add_definitions(
+ -DPOSIX=1
+ )
+endif ()
+
+if (XWINDOWS)
+ find_package(X11 REQUIRED)
+ include_directories(${X11_INCLUDE_DIR})
+ add_definitions(-DXWINDOWS=1)
+endif ()
+
+include_directories("${PROJECT_SOURCE_DIR}/include")
+include_directories("${PROJECT_SOURCE_DIR}/libs")
+
+#-----------------------------------------------------------------------
+# Libraries
+#-----------------------------------------------------------------------
+
+add_subdirectory(libs)
+add_subdirectory(include)
+
+#-----------------------------------------------------------------------
+# Plugins
+#-----------------------------------------------------------------------
+
+if (BUILD_RADIANT)
+ add_subdirectory(contrib)
+endif ()
+
+#-----------------------------------------------------------------------
+# Modules
+#-----------------------------------------------------------------------
+
+if (BUILD_RADIANT)
+ add_subdirectory(plugins)
+endif ()
+
+#-----------------------------------------------------------------------
+# Radiant
+#-----------------------------------------------------------------------
+
+if (BUILD_RADIANT)
+ add_subdirectory(radiant build)
+endif ()
+
+if (CMAKE_EXECUTABLE_SUFFIX)
+ set(RADIANT_EXECUTABLE ${CMAKE_EXECUTABLE_SUFFIX})
+else ()
+ execute_process(
+ COMMAND uname -m
+ OUTPUT_VARIABLE RADIANT_EXECUTABLE
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+endif ()
+
+if (BUILD_RADIANT)
+ set_target_properties(radiant PROPERTIES
+ COMPILE_DEFINITIONS RADIANT_EXECUTABLE="${RADIANT_EXECUTABLE}"
+ )
+endif ()
+
+#-----------------------------------------------------------------------
+# Tools
+#-----------------------------------------------------------------------
+
+add_subdirectory(tools)
+
+if (NOT (PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR))
+ # Copy data files from sources to the build directory
+ message(STATUS "Copying data files")
+ file(GLOB DATA_FILES "${PROJECT_SOURCE_DIR}/setup/data/tools/*")
+ file(COPY ${DATA_FILES} DESTINATION "${PROJECT_BINARY_DIR}")
+ file(GLOB DATA_FILES "${PROJECT_SOURCE_DIR}/docs/*")
+ file(COPY ${DATA_FILES} DESTINATION "${PROJECT_BINARY_DIR}/docs")
+endif ()
+
+#-----------------------------------------------------------------------
+# Game packs
+#-----------------------------------------------------------------------
+
+option(DOWNLOAD_GAMEPACKS "Download game packs" ON)
+add_custom_target(game_packs
+ COMMAND ${CMAKE_COMMAND} -E make_directory games
+ COMMAND DOWNLOAD_GAMEPACKS=yes SOURCE_DIR="${PROJECT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/install-gamepacks.sh" "${PROJECT_BINARY_DIR}"
+ COMMENT "Downloading game packs"
+ )
+if (DOWNLOAD_GAMEPACKS)
+ add_custom_target(game_packs_all ALL DEPENDS game_packs)
+endif ()
--- /dev/null
+NetRadiant
+==========
+
+The open source, cross platform level editor for idtech games (Radiant fork)
+
+# Getting the Sources
+
+The latest source is available from the git repository:
+https://gitlab.com/xonotic/netradiant.git
+
+The git client can be obtained from the Git website:
+http://git-scm.org
+
+To get a copy of the source using the commandline git client:
+```
+git clone https://gitlab.com/xonotic/netradiant.git
+cd netradiant
+```
+
+See also https://gitlab.com/xonotic/netradiant/ for a source browser, issues and more.
+
+# Dependencies
+
+ * OpenGL
+ * LibXml2
+ * GTK2
+ * GtkGLExt
+ * LibJpeg
+ * LibPng
+ * ZLib
+
+# Compiling
+
+This project uses the usual CMake workflow:
+
+`cmake -H. -Bbuild && cmake --build build -- -j$(nproc)``
+
+## linux
+
+```
+cmake -H. -Bbuild -G "Unix Makefiles"
+```
+
+## msys2
+
+`pacman -S --needed base-devel`
+
+### 32 bit:
+
+```
+pacman -S --needed mingw-w64-i686-{toolchain,cmake,gtk2,gtkglext}
+cmake -H. -Bbuild -G "MSYS Makefiles" -DGTK2_GLIBCONFIG_INCLUDE_DIR=/mingw32/lib/glib-2.0/include -DGTK2_GDKCONFIG_INCLUDE_DIR=/mingw32/lib/gtk-2.0/include
+```
+
+### 64 bit:
+
+```
+pacman -S mingw-w64-x86_64-{toolchain,cmake,gtk2,gtkglext}
+cmake -H. -Bbuild -G "MSYS Makefiles" -DGTK2_GLIBCONFIG_INCLUDE_DIR=/mingw64/lib/glib-2.0/include -DGTK2_GDKCONFIG_INCLUDE_DIR=/mingw64/lib/gtk-2.0/include
+```
+
+## OS X:
+
+```
+brew install gtkglext
+brew install Caskroom/cask/xquartz
+brew link --force gettext
+```
+
+More Compilation Details
+------------------------
+
+options:
+ * `DOWNLOAD_GAMEPACKS=ON`
+ Automatically download the gamepack data during the first compilation
+ * `RADIANT_ABOUTMSG="Custom build"`
+ A message shown in the about dialog
+
+targets:
+ * `radiant` Compiles the radiant core binary
+ * `modules` Compiles all modules (each module has its own target as well)
+ * `plugins` Compiles all plugins (each plugin has its own target as well)
+ * `game_packs` Downloads the game pack data
+ * `quake3` Compiles all the Quake3 tools
+ - `q3map2` Quake3 map compiler
+ - `q3data`
--- /dev/null
+platform: x64
+
+shallow_clone: true
+
+install:
+ - set "PATH=C:\msys64\usr\bin;%PATH%"
+ - bash -lc "pacman --noconfirm --needed -Sy bash pacman pacman-mirrors msys2-runtime msys2-runtime-devel"
+ - ps: >-
+ bash -lc @"
+ exec 0</dev/null 2>&1
+ pacman --noconfirm -Su
+ pacman --noconfirm --needed -S base-devel mingw-w64-x86_64-{toolchain,clang,cmake,gtk2,gtkglext}
+ "@
+
+build_script:
+ - set HOME=.
+ - set MSYSTEM=MINGW64
+ - ps: >-
+ bash -lc @"
+ set -e
+ exec 0</dev/null 2>&1
+ # export CC=clang
+ # export CXX=clang++
+ cmake --version
+ cmake -H. -Bbuild -G 'MSYS Makefiles' -DGTK2_GLIBCONFIG_INCLUDE_DIR=/mingw64/lib/glib-2.0/include -DGTK2_GDKCONFIG_INCLUDE_DIR=/mingw64/lib/gtk-2.0/include
+ cmake --build build
+ "@
--- /dev/null
+include(FindPkgConfig OPTIONAL)
+if (PKG_CONFIG_FOUND)
+ include(FindPkgConfig)
+ pkg_check_modules(GLIB glib-2.0)
+endif ()
--- /dev/null
+include(FindPkgConfig OPTIONAL)
+if (PKG_CONFIG_FOUND)
+ include(FindPkgConfig)
+ pkg_check_modules(GTK gtk+-2.0)
+ if (XWINDOWS)
+ pkg_check_modules(GTKGL gtkglext-x11-1.0)
+ elseif (WIN32)
+ pkg_check_modules(GTKGL gtkglext-win32-1.0)
+ else ()
+ pkg_check_modules(GTKGL gtkglext-quartz-1.0)
+ endif ()
+endif ()
--- /dev/null
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/plugins")
+
+add_custom_target(plugins)
+macro(radiant_plugin name)
+ message(STATUS "Found Plugin ${name}")
+ add_library(${name} MODULE ${ARGN})
+ add_dependencies(plugins ${name})
+endmacro()
+
+add_subdirectory(bobtoolz)
+add_subdirectory(brushexport)
+add_subdirectory(prtview)
+add_subdirectory(shaderplug)
+add_subdirectory(sunplug)
+add_subdirectory(ufoaiplug)
--- /dev/null
+radiant_plugin(bobtoolz
+ dialogs/dialogs-gtk.cpp dialogs/dialogs-gtk.h
+
+ bobToolz.h
+ bobToolz-GTK.cpp
+ bsploader.cpp bsploader.h
+ cportals.cpp CPortals.h
+ ctfresource_gtk.h
+ DBobView.cpp DBobView.h
+ DBrush.cpp DBrush.h
+ DEntity.cpp DEntity.h
+ DEPair.cpp DEPair.h
+ DMap.cpp DMap.h
+ DPatch.cpp DPatch.h
+ DPlane.cpp DPlane.h
+ DPoint.cpp DPoint.h
+ DShape.cpp DShape.h
+ DTrainDrawer.cpp DTrainDrawer.h
+ DTreePlanter.cpp DTreePlanter.h
+ DVisDrawer.cpp DVisDrawer.h
+ DWinding.cpp DWinding.h
+ funchandlers-GTK.cpp
+ lists.cpp lists.h
+ misc.cpp misc.h
+ resource.h
+ resource-gtk.h
+ ScriptParser.cpp ScriptParser.h
+ shapes.cpp shapes.h
+ StdAfx.cpp StdAfx.h
+ visfind.cpp visfind.h
+ )
+
+target_include_directories(bobtoolz PRIVATE uilib)
+target_link_libraries(bobtoolz PRIVATE uilib)
+
+target_include_directories(bobtoolz PRIVATE mathlib)
+target_link_libraries(bobtoolz PRIVATE mathlib)
int newHeight = p1->height + p2->height - 1;
if ( newHeight > MAX_PATCH_HEIGHT ) {
- return false;
+ return nullptr;
}
DPatch* newPatch = new DPatch();
--- /dev/null
+radiant_plugin(brushexport
+ callbacks.cpp callbacks.h
+ export.cpp export.h
+ interface.cpp
+ plugin.cpp plugin.h
+ support.cpp support.h
+ )
+
+target_include_directories(brushexport PRIVATE uilib)
+target_link_libraries(brushexport PRIVATE uilib)
--- /dev/null
+radiant_plugin(prtview
+ AboutDialog.cpp AboutDialog.h
+ ConfigDialog.cpp ConfigDialog.h
+ LoadPortalFileDialog.cpp LoadPortalFileDialog.h
+ portals.cpp portals.h
+ prtview.cpp prtview.h
+ )
+
+target_include_directories(prtview PRIVATE uilib)
+target_link_libraries(prtview PRIVATE uilib)
+
+target_include_directories(prtview PRIVATE profile)
+target_link_libraries(prtview PRIVATE profile)
--- /dev/null
+radiant_plugin(shaderplug
+ shaderplug.cpp shaderplug.h
+ )
+
+target_include_directories(shaderplug PRIVATE uilib)
+target_link_libraries(shaderplug PRIVATE uilib)
+
+target_include_directories(shaderplug PRIVATE xmllib)
+target_link_libraries(shaderplug PRIVATE xmllib)
--- /dev/null
+radiant_plugin(sunplug
+ sunplug.cpp sunplug.h
+ )
+
+target_include_directories(sunplug PRIVATE uilib)
+target_link_libraries(sunplug PRIVATE uilib)
--- /dev/null
+radiant_plugin(ufoaiplug
+ ufoai.cpp ufoai.h
+ ufoai_filters.cpp ufoai_filters.h
+ ufoai_gtk.cpp ufoai_gtk.h
+ ufoai_level.cpp ufoai_level.h
+ )
+
+target_include_directories(ufoaiplug PRIVATE uilib)
+target_link_libraries(ufoaiplug PRIVATE uilib)
mkdir -p games
pack DarkPlacesPack GPL svn svn://svn.icculus.org/gtkradiant-gamepacks/DarkPlacesPack/branches/1.5/
pack NexuizPack GPL gitdir git://git.icculus.org/divverent/nexuiz.git misc/netradiant-NexuizPack master
-pack OpenArenaPack unknown zip1 http://ingar.satgnu.net/files/gtkradiant/gamepacks/OpenArenaPack.zip
-pack OsirionPack GPL zip1 http://ingar.satgnu.net/files/gtkradiant/gamepacks/OsirionPack.zip
+pack OpenArenaPack unknown zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/OpenArenaPack.zip
+pack OsirionPack GPL zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/OsirionPack.zip
pack Q3Pack proprietary svn svn://svn.icculus.org/gtkradiant-gamepacks/Q3Pack/trunk/ -r29
-pack Quake2Pack proprietary zip1 http://ingar.satgnu.net/files/gtkradiant/gamepacks/Quake2Pack.zip
-pack QuakePack GPL zip1 http://ingar.satgnu.net/files/gtkradiant/gamepacks/Quake1Pack.zip
+pack Quake2Pack proprietary zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/Quake2Pack.zip
+pack QuakePack GPL zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/Quake1Pack.zip
pack QuetooPack GPL svn svn://svn.icculus.org/gtkradiant-gamepacks/QuetooPack/branches/1.5/
-pack TremulousPack proprietary zip1 http://ingar.satgnu.net/files/gtkradiant/gamepacks/TremulousPack.zip
+pack TremulousPack proprietary zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/TremulousPack.zip
pack UFOAIPack proprietary svn svn://svn.icculus.org/gtkradiant-gamepacks/UFOAIPack/branches/1.5/
#pack WarsowPack GPL svn https://svn.bountysource.com/wswpack/trunk/netradiant/games/WarsowPack/
-#pack WarsowPack GPL zip1 http://ingar.satgnu.net/files/gtkradiant/gamepacks/WarsowPack.zip
+#pack WarsowPack GPL zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/WarsowPack.zip
pack WarsowPack GPL git https://github.com/Warsow/NetRadiantPack.git
-pack XonoticPack GPL git http://git.xonotic.org/xonotic/netradiant-xonoticpack.git
+pack XonoticPack GPL git https://gitlab.com/xonotic/netradiant-xonoticpack.git
--- /dev/null
+add_library(includes
+ aboutmsg.h
+ cullable.cpp cullable.h
+ editable.cpp editable.h
+ iarchive.cpp iarchive.h
+ ibrush.cpp ibrush.h
+ icamera.cpp icamera.h
+ idatastream.cpp idatastream.h
+ ieclass.cpp ieclass.h
+ ientity.cpp ientity.h
+ ifilesystem.cpp ifilesystem.h
+ ifiletypes.cpp ifiletypes.h
+ ifilter.cpp ifilter.h
+ igl.cpp igl.h
+ iglrender.cpp iglrender.h
+ igtkgl.cpp igtkgl.h
+ iimage.cpp iimage.h
+ imap.cpp imap.h
+ imodel.cpp imodel.h
+ ipatch.cpp ipatch.h
+ iplugin.cpp iplugin.h
+ ireference.cpp ireference.h
+ irender.cpp irender.h
+ iscenegraph.cpp iscenegraph.h
+ iscriplib.cpp iscriplib.h
+ iselection.cpp iselection.h
+ ishaders.cpp ishaders.h
+ itexdef.cpp itexdef.h
+ itextstream.cpp itextstream.h
+ itextures.cpp itextures.h
+ itoolbar.cpp itoolbar.h
+ iundo.cpp iundo.h
+ mapfile.cpp mapfile.h
+ modelskin.cpp modelskin.h
+ moduleobserver.cpp moduleobserver.h
+ modulesystem.cpp modulesystem.h
+ nameable.cpp nameable.h
+ namespace.cpp namespace.h
+ preferencesystem.cpp preferencesystem.h
+ qerplugin.cpp qerplugin.h
+ renderable.cpp renderable.h
+ selectable.cpp selectable.h
+ stream_version.h
+ version.h
+ warnings.h
+ windowobserver.cpp windowobserver.h
+ )
#if !defined( INCLUDED_IPATCH_H )
#define INCLUDED_IPATCH_H
+#include "debugging/debugging.h"
#include "generic/constant.h"
#include "generic/vector.h"
: ${SH:=sh}
: ${CP:=cp}
: ${CP_R:=cp -r}
+: ${SOURCE_DIR:=.}
dest=$1
case "$DOWNLOAD_GAMEPACKS" in
yes)
- LICENSEFILTER=GPL BATCH=1 $SH download-gamepacks.sh
+ LICENSEFILTER=GPL BATCH=1 $SH "$SOURCE_DIR/download-gamepacks.sh"
;;
all)
- BATCH=1 $SH download-gamepacks.sh
+ BATCH=1 $SH "$SOURCE_DIR/download-gamepacks.sh"
;;
*)
;;
for GAME in games/*; do
if [ "$GAME" = "games/*" ]; then
$ECHO "Game packs not found, please run"
- $ECHO " ./download-gamepacks.sh"
+ $ECHO " $SOURCE_DIR/download-gamepacks.sh"
$ECHO "and then try again!"
else
- $SH install-gamepack.sh "$GAME" "$dest"
+ $SH "$SOURCE_DIR/install-gamepack.sh" "$GAME" "$dest"
fi
done
--- /dev/null
+add_subdirectory(cmdlib)
+add_subdirectory(container)
+add_subdirectory(ddslib)
+add_subdirectory(debugging)
+add_subdirectory(etclib)
+add_subdirectory(filematch)
+add_subdirectory(generic)
+if (BUILD_RADIANT)
+ add_subdirectory(gtkutil)
+endif ()
+add_subdirectory(l_net)
+add_subdirectory(math)
+add_subdirectory(mathlib)
+add_subdirectory(memory)
+add_subdirectory(modulesystem)
+add_subdirectory(os)
+add_subdirectory(picomodel)
+add_subdirectory(profile)
+add_subdirectory(script)
+add_subdirectory(signal)
+add_subdirectory(splines)
+add_subdirectory(stream)
+add_subdirectory(string)
+add_subdirectory(uilib)
+add_subdirectory(xml)
+
+add_library(libs
+ archivelib.cpp archivelib.h
+ bytebool.cpp bytebool.h
+ bytestreamutils.cpp bytestreamutils.h
+ character.cpp character.h
+ convert.cpp convert.h
+ dragplanes.cpp dragplanes.h
+ eclasslib.cpp eclasslib.h
+ entitylib.cpp entitylib.h
+ entityxml.cpp entityxml.h
+ fs_filesystem.cpp fs_filesystem.h
+ fs_path.cpp fs_path.h
+ imagelib.cpp imagelib.h
+ instancelib.cpp instancelib.h
+ maplib.cpp maplib.h
+ moduleobservers.cpp moduleobservers.h
+ pivot.cpp pivot.h
+ render.cpp render.h
+ scenelib.cpp scenelib.h
+ selectionlib.cpp selectionlib.h
+ shaderlib.cpp shaderlib.h
+ str.cpp str.h
+ stringio.cpp stringio.h
+ texturelib.cpp texturelib.h
+ transformlib.cpp transformlib.h
+ traverselib.cpp traverselib.h
+ typesystem.cpp typesystem.h
+ undolib.cpp undolib.h
+ uniquenames.cpp uniquenames.h
+ versionlib.cpp versionlib.h
+ )
+
+find_package(GLIB REQUIRED)
+target_include_directories(libs PRIVATE ${GLIB_INCLUDE_DIRS})
+target_link_libraries(libs PRIVATE ${GLIB_LIBRARIES})
+++ /dev/null
-*.dsp -m 'COPY' -k 'b'
-*.dsw -m 'COPY' -k 'b'
-*.scc -m 'COPY' -k 'b'
--- /dev/null
+add_library(cmdlib
+ cmdlib.cpp ../cmdlib.h
+ )
--- /dev/null
+add_library(container
+ array.cpp array.h
+ cache.cpp cache.h
+ container.cpp container.h
+ hashfunc.cpp hashfunc.h
+ hashtable.cpp hashtable.h
+ stack.cpp stack.h
+ )
#if !defined( INCLUDED_CONTAINER_CONTAINER_H )
#define INCLUDED_CONTAINER_CONTAINER_H
+#include <algorithm>
#include <list>
#include <set>
--- /dev/null
+add_library(ddslib
+ ddslib.c ../ddslib.h
+ )
--- /dev/null
+add_library(debugging
+ debugging.cpp debugging.h
+ )
--- /dev/null
+add_library(etclib
+ ../etclib.c ../etclib.h
+ )
--- /dev/null
+add_library(filematch
+ ../filematch.c ../filematch.h
+ )
--- /dev/null
+add_library(generic
+ arrayrange.cpp arrayrange.h
+ bitfield.cpp bitfield.h
+ callback.cpp callback.h
+ callbackfwd.cpp callbackfwd.h
+ constant.cpp constant.h
+ enumeration.cpp enumeration.h
+ functional.cpp functional.h
+ object.cpp object.h
+ reference.cpp reference.h
+ referencecounted.cpp referencecounted.h
+ static.cpp static.h
+ vector.cpp vector.h
+ )
--- /dev/null
+add_library(gtkutil
+ accelerator.cpp accelerator.h
+ button.cpp button.h
+ clipboard.cpp clipboard.h
+ closure.cpp closure.h
+ container.cpp container.h
+ cursor.cpp cursor.h
+ dialog.cpp dialog.h
+ entry.cpp entry.h
+ filechooser.cpp filechooser.h
+ frame.cpp frame.h
+ glfont.cpp glfont.h
+ glwidget.cpp glwidget.h
+ idledraw.cpp idledraw.h
+ image.cpp image.h
+ menu.cpp menu.h
+ messagebox.cpp messagebox.h
+ nonmodal.cpp nonmodal.h
+ paned.cpp paned.h
+ pointer.cpp pointer.h
+ toolbar.cpp toolbar.h
+ widget.cpp widget.h
+ window.cpp window.h
+ xorrectangle.cpp xorrectangle.h
+ )
+
+target_include_directories(gtkutil PRIVATE uilib)
+target_link_libraries(gtkutil PRIVATE uilib)
+
+target_include_directories(gtkutil PRIVATE ${GTK2_PANGO_INCLUDE_DIR})
+target_link_libraries(gtkutil PRIVATE ${GTK2_PANGO_LIBRARY})
+
+find_package(GtkGLExt REQUIRED)
+target_include_directories(gtkutil PRIVATE ${GTKGL_INCLUDE_DIRS})
+target_link_libraries(gtkutil PRIVATE ${GTKGL_LIBRARIES})
--- /dev/null
+set(L_NETLIST
+ l_net.c l_net.h
+ )
+if (WIN32)
+ list(APPEND L_NETLIST l_net_wins.c l_net_wins.h)
+else ()
+ list(APPEND L_NETLIST l_net_berkley.c)
+endif ()
+
+add_library(l_net ${L_NETLIST})
+
+if (WIN32)
+ target_link_libraries(l_net PRIVATE ws2_32)
+endif ()
--- /dev/null
+add_library(math
+ aabb.cpp aabb.h
+ curve.cpp curve.h
+ frustum.cpp frustum.h
+ line.cpp line.h
+ matrix.cpp matrix.h
+ pi.cpp pi.h
+ plane.cpp plane.h
+ quaternion.cpp quaternion.h
+ vector.cpp vector.h
+ )
--- /dev/null
+add_library(mathlib
+ bbox.c
+ line.c
+ m4x4.c
+ mathlib.c ../mathlib.h
+ ray.c
+ )
--- /dev/null
+add_library(memory
+ allocator.cpp allocator.h
+ )
--- /dev/null
+add_library(modulesystem
+ moduleregistry.cpp moduleregistry.h
+ modulesmap.cpp modulesmap.h
+ singletonmodule.cpp singletonmodule.h
+ )
--- /dev/null
+add_library(os
+ dir.cpp dir.h
+ file.cpp file.h
+ path.cpp path.h
+ )
+
+find_package(GLIB REQUIRED)
+target_include_directories(os PRIVATE ${GLIB_INCLUDE_DIRS})
+target_link_libraries(os PRIVATE ${GLIB_LIBRARIES})
--- /dev/null
+add_library(picomodel
+ lwo/clip.c
+ lwo/envelope.c
+ lwo/list.c
+ lwo/lwio.c
+ lwo/lwo2.c lwo/lwo2.h
+ lwo/lwob.c
+ lwo/pntspols.c
+ lwo/surface.c
+ lwo/vecmath.c
+ lwo/vmap.c
+
+ picointernal.c picointernal.h
+ picomodel.c ../picomodel.h
+ picomodules.c
+ pm_3ds.c
+ pm_ase.c
+ pm_fm.c pm_fm.h
+ pm_lwo.c
+ pm_md2.c
+ pm_md3.c
+ pm_mdc.c
+ pm_ms3d.c
+ pm_obj.c
+ pm_terrain.c
+ )
--- /dev/null
+add_library(profile
+ file.cpp file.h
+ profile.cpp profile.h
+ )
--- /dev/null
+add_library(script
+ scripttokeniser.cpp scripttokeniser.h
+ scripttokenwriter.cpp scripttokenwriter.h
+ )
--- /dev/null
+add_library(signal
+ isignal.cpp isignal.h
+ signal.cpp signal.h
+ signalfwd.cpp signalfwd.h
+ )
--- /dev/null
+add_library(splines
+ math_angles.cpp math_angles.h
+ math_matrix.cpp math_matrix.h
+ math_quaternion.cpp math_quaternion.h
+ math_vector.cpp math_vector.h
+ q_parse.cpp
+ q_shared.cpp q_shared.h
+ splines.cpp splines.h
+ util_list.h
+ util_str.cpp util_str.h
+ )
--- /dev/null
+add_library(stream
+ filestream.cpp filestream.h
+ memstream.cpp memstream.h
+ stringstream.cpp stringstream.h
+ textfilestream.cpp textfilestream.h
+ textstream.cpp textstream.h
+ )
--- /dev/null
+add_library(string
+ pooledstring.cpp pooledstring.h
+ string.cpp string.h
+ stringfwd.cpp stringfwd.h
+ )
--- /dev/null
+add_library(uilib
+ uilib.cpp
+ )
+
+find_package(GTK2 REQUIRED)
+target_include_directories(uilib PUBLIC ${GTK2_INCLUDE_DIRS})
+target_link_libraries(uilib PUBLIC ${GTK2_LIBRARIES})
+
+target_include_directories(uilib PUBLIC gtkutil)
+target_link_libraries(uilib PUBLIC gtkutil)
--- /dev/null
+add_library(xmllib
+ ixml.cpp ixml.h
+ xmlelement.cpp xmlelement.h
+ xmlparser.cpp xmlparser.h
+ xmltextags.cpp xmltextags.h
+ xmlwriter.cpp xmlwriter.h
+ )
+
+find_package(GLIB REQUIRED)
+target_include_directories(xmllib PUBLIC ${GLIB_INCLUDE_DIRS})
+target_link_libraries(xmllib PUBLIC ${GLIB_LIBRARIES})
+
+find_package(LibXml2 REQUIRED)
+target_include_directories(xmllib PUBLIC ${LIBXML2_INCLUDE_DIR})
+target_link_libraries(xmllib PUBLIC ${LIBXML2_LIBRARIES})
--- /dev/null
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/modules")
+
+add_custom_target(modules)
+macro(radiant_plugin name)
+ message(STATUS "Found Module ${name}")
+ add_library(${name} MODULE ${ARGN})
+ add_dependencies(modules ${name})
+endmacro()
+
+add_subdirectory(archivepak)
+add_subdirectory(archivewad)
+add_subdirectory(archivezip)
+add_subdirectory(entity)
+add_subdirectory(image)
+add_subdirectory(imagehl)
+add_subdirectory(imagepng)
+add_subdirectory(imageq2)
+add_subdirectory(mapq3)
+add_subdirectory(mapxml)
+add_subdirectory(md3model)
+add_subdirectory(model)
+add_subdirectory(shaders)
+add_subdirectory(vfspk3)
--- /dev/null
+radiant_plugin(archivepak
+ archive.cpp archive.h
+ pak.cpp pak.h
+ plugin.cpp plugin.h
+ )
--- /dev/null
+radiant_plugin(archivewad
+ archive.cpp archive.h
+ plugin.cpp plugin.h
+ wad.cpp wad.h
+ )
--- /dev/null
+radiant_plugin(archivezip
+ archive.cpp archive.h
+ pkzip.cpp pkzip.h
+ plugin.cpp plugin.h
+ zlibstream.cpp zlibstream.h
+ )
+
+find_package(ZLIB REQUIRED)
+target_include_directories(archivezip PRIVATE ${ZLIB_INCLUDE_DIRS})
+target_link_libraries(archivezip PRIVATE ${ZLIB_LIBRARIES})
--- /dev/null
+radiant_plugin(entity
+ angle.cpp angle.h
+ angles.cpp angles.h
+ colour.cpp colour.h
+ curve.cpp curve.h
+ doom3group.cpp doom3group.h
+ eclassmodel.cpp eclassmodel.h
+ entity.cpp entity.h
+ filters.cpp filters.h
+ generic.cpp generic.h
+ group.cpp group.h
+ keyobservers.cpp keyobservers.h
+ light.cpp light.h
+ miscmodel.cpp miscmodel.h
+ model.cpp model.h
+ modelskinkey.cpp modelskinkey.h
+ namedentity.cpp namedentity.h
+ namekeys.cpp namekeys.h
+ origin.cpp origin.h
+ plugin.cpp plugin.h
+ rotation.cpp rotation.h
+ scale.cpp scale.h
+ skincache.cpp skincache.h
+ targetable.cpp targetable.h
+ )
--- /dev/null
+radiant_plugin(image
+ bmp.cpp bmp.h
+ dds.cpp dds.h
+ image.cpp image.h
+ jpeg.cpp jpeg.h
+ ktx.cpp ktx.h
+ pcx.cpp pcx.h
+ tga.cpp tga.h
+ )
+
+find_package(JPEG REQUIRED)
+target_include_directories(image PRIVATE ${JPEG_INCLUDE_DIR})
+target_link_libraries(image PRIVATE ddslib etclib ${JPEG_LIBRARIES})
--- /dev/null
+radiant_plugin(imagehl
+ hlw.cpp hlw.h
+ imagehl.cpp imagehl.h
+ mip.cpp mip.h
+ sprite.cpp sprite.h
+ )
--- /dev/null
+radiant_plugin(imagepng
+ plugin.cpp plugin.h
+ )
+
+find_package(PNG REQUIRED)
+target_include_directories(imagepng PRIVATE ${PNG_INCLUDE_DIR})
+target_link_libraries(imagepng PRIVATE ${PNG_LIBRARIES})
--- /dev/null
+radiant_plugin(imageq2
+ imageq2.cpp imageq2.h
+ wal.cpp wal.h
+ wal32.cpp wal32.h
+ )
--- /dev/null
+radiant_plugin(mapq3
+ parse.cpp parse.h
+ plugin.cpp plugin.h
+ write.cpp write.h
+ )
--- /dev/null
+radiant_plugin(mapxml
+ plugin.cpp plugin.h
+ xmlparse.cpp xmlparse.h
+ xmlwrite.cpp xmlwrite.h
+ )
+
+target_include_directories(mapxml PRIVATE xmllib)
+target_link_libraries(mapxml PRIVATE xmllib)
--- /dev/null
+radiant_plugin(md3model
+ ident.h
+ md2.cpp md2.h
+ md3.cpp md3.h
+ md3normals.cpp md3normals.h
+ md5.cpp md5.h
+ mdc.cpp mdc.h
+ mdl.cpp mdl.h
+ mdlformat.cpp mdlformat.h
+ mdlimage.cpp mdlimage.h
+ mdlnormals.cpp mdlnormals.h
+ model.cpp model.h
+ plugin.cpp plugin.h
+ )
--- /dev/null
+radiant_plugin(model
+ model.cpp model.h
+ plugin.cpp plugin.h
+ )
+
+target_include_directories(model PRIVATE picomodel)
+target_link_libraries(model PRIVATE picomodel)
--- /dev/null
+radiant_plugin(sample
+ sample.cpp sample.h
+ )
--- /dev/null
+radiant_plugin(shaders
+ plugin.cpp plugin.h
+ shaders.cpp shaders.h
+ )
+
+find_package(GLIB REQUIRED)
+target_include_directories(shaders PRIVATE ${GLIB_INCLUDE_DIRS})
+target_link_libraries(shaders PRIVATE ${GLIB_LIBRARIES})
+++ /dev/null
-*.dsp -m 'COPY' -k 'b'
-*.rc -m 'COPY' -k 'b'
+++ /dev/null
-*.jpg -m 'COPY' -k 'b'
--- /dev/null
+radiant_plugin(vfspk3
+ archive.cpp archive.h
+ vfs.cpp vfs.h
+ vfspk3.cpp vfspk3.h
+ )
+
+find_package(GLIB REQUIRED)
+target_include_directories(vfspk3 PRIVATE ${GLIB_INCLUDE_DIRS})
+target_link_libraries(vfspk3 PRIVATE ${GLIB_LIBRARIES})
+
+target_include_directories(vfspk3 PRIVATE filematch)
+target_link_libraries(vfspk3 PRIVATE filematch)
--- /dev/null
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
+
+find_package(OpenGL REQUIRED)
+
+string(SUBSTRING ${CMAKE_SHARED_MODULE_SUFFIX} 1 -1 _clibext)
+add_definitions(-DCMAKE_SHARED_MODULE_SUFFIX="${_clibext}")
+unset(_clibext)
+
+set(RADIANTLIST
+ autosave.cpp autosave.h
+ brush.cpp brush.h
+ brush_primit.cpp brush_primit.h
+ brushmanip.cpp brushmanip.h
+ brushmodule.cpp brushmodule.h
+ brushnode.cpp brushnode.h
+ brushtokens.cpp brushtokens.h
+ brushxml.cpp brushxml.h
+ build.cpp build.h
+ camwindow.cpp camwindow.h
+ clippertool.cpp clippertool.h
+ commands.cpp commands.h
+ console.cpp console.h
+ csg.cpp csg.h
+ dialog.cpp dialog.h
+ eclass.cpp eclass.h
+ eclass_def.cpp eclass_def.h
+ eclass_doom3.cpp eclass_doom3.h
+ eclass_fgd.cpp eclass_fgd.h
+ eclass_xml.cpp eclass_xml.h
+ entity.cpp entity.h
+ entityinspector.cpp entityinspector.h
+ entitylist.cpp entitylist.h
+ environment.cpp environment.h
+ error.cpp error.h
+ feedback.cpp feedback.h
+ filetypes.cpp filetypes.h
+ filters.cpp filters.h
+ findtexturedialog.cpp findtexturedialog.h
+ glwidget.cpp glwidget.h
+ grid.cpp grid.h
+ groupdialog.cpp groupdialog.h
+ gtkdlgs.cpp gtkdlgs.h
+ gtkmisc.cpp gtkmisc.h
+ help.cpp help.h
+ image.cpp image.h
+ main.cpp main.h
+ mainframe.cpp mainframe.h
+ map.cpp map.h
+ mru.cpp mru.h
+ nullmodel.cpp nullmodel.h
+ parse.cpp parse.h
+ patch.cpp patch.h
+ patchdialog.cpp patchdialog.h
+ patchmanip.cpp patchmanip.h
+ patchmodule.cpp patchmodule.h
+ plugin.cpp plugin.h
+ pluginapi.cpp pluginapi.h
+ pluginmanager.cpp pluginmanager.h
+ pluginmenu.cpp pluginmenu.h
+ plugintoolbar.cpp plugintoolbar.h
+ points.cpp points.h
+ preferencedictionary.cpp preferencedictionary.h
+ preferences.cpp preferences.h
+ qe3.cpp qe3.h
+ qgl.cpp qgl.h
+ referencecache.cpp referencecache.h
+ renderer.cpp renderer.h
+ renderstate.cpp renderstate.h
+ resource.h
+ scenegraph.cpp scenegraph.h
+ select.cpp select.h
+ selection.cpp selection.h
+ server.cpp server.h
+ shaders.cpp shaders.h
+ sockets.cpp sockets.h
+ stacktrace.cpp stacktrace.h
+ surfacedialog.cpp surfacedialog.h
+ texmanip.cpp texmanip.h
+ textureentry.cpp textureentry.h
+ textures.cpp textures.h
+ texwindow.cpp texwindow.h
+ timer.cpp timer.h
+ treemodel.cpp treemodel.h
+ undo.cpp undo.h
+ url.cpp url.h
+ view.cpp view.h
+ watchbsp.cpp watchbsp.h
+ winding.cpp winding.h
+ windowobservers.cpp windowobservers.h
+ xmlstuff.cpp xmlstuff.h
+ xywindow.cpp xywindow.h
+)
+if (WIN32)
+ list(APPEND RADIANTLIST multimon.cpp multimon.h)
+endif()
+
+add_executable(radiant WIN32 radiant.rc ${RADIANTLIST})
+target_link_libraries(radiant
+ ${CMAKE_DL_LIBS}
+ ${LIBXML2_LIBRARIES}
+ ${OPENGL_gl_LIBRARY}
+ ${GTKGL_LIBRARIES}
+ includes
+ cmdlib
+ container
+ ddslib
+ debugging
+ etclib
+ filematch
+ generic
+ l_net
+ math
+ mathlib
+ memory
+ modulesystem
+ os
+ picomodel
+ profile
+ script
+ signal
+ splines
+ stream
+ string
+ uilib
+ xmllib
+)
+if (X11_LIBRARIES)
+ target_link_libraries(radiant ${X11_LIBRARIES})
+endif ()
};
const char* const c_library_extension =
-#if defined( WIN32 )
+#if defined( CMAKE_SHARED_MODULE_SUFFIX )
+ CMAKE_SHARED_MODULE_SUFFIX
+#elif defined( WIN32 )
"dll"
#elif defined ( __APPLE__ )
"dylib"
#define APIENTRY __stdcall
#endif
+#if defined( __APPLE__ ) && !defined( XWINDOWS )
+#include <OpenGL/gl.h>
+#else
#include <GL/gl.h>
+#endif
#if defined( _WIN32 )
#undef WINGDIAPI
void* ( *qglXGetProcAddressARB )( const GLubyte * procName );
typedef void* ( *glXGetProcAddressARBProc )( const GLubyte *procName );
+#elif defined(__APPLE__)
+#include <mach-o/dyld.h>
+#include <stdlib.h>
+#include <string.h>
#else
#error "unsupported platform"
#endif
#elif defined( XWINDOWS )
qglXQueryExtension = glXQueryExtension;
qglXGetProcAddressARB = 0;
+#elif defined(__APPLE__)
#else
#error "unsupported platform"
#endif
{
return (QGLFunctionPointer) qglXGetProcAddressARB( reinterpret_cast<const GLubyte*>( symbol ) );
}
+#elif defined(__APPLE__)
+ // Prepend a '_' for the Unix C symbol mangling convention
+ char *symbolName = (char *) malloc(strlen(symbol) + 2);
+ strcpy(symbolName + 1, symbol);
+ symbolName[0] = '_';
+ NSSymbol nssymbol = NULL;
+ if (NSIsSymbolNameDefined(symbolName)) nssymbol = NSLookupAndBindSymbol(symbolName);
+ free(symbolName);
+ return nssymbol ? reinterpret_cast<QGLFunctionPointer>(NSAddressOfSymbol(nssymbol)) : reinterpret_cast<QGLFunctionPointer>(glInvalidFunction);
#elif defined( WIN32 )
ASSERT_NOTNULL( qwglGetProcAddress );
return (QGLFunctionPointer) qwglGetProcAddress( symbol );
if ( ( qglXQueryExtension == 0 ) || ( qglXQueryExtension( GDK_DISPLAY(),0,0 ) != True ) ) {
return 0;
}
+#elif defined (__APPLE__)
#else
#error "unsupported platform"
#endif
--- /dev/null
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
+
+macro(radiant_tool name)
+ add_executable(${name} ${ARGN})
+ if (NOT (CMAKE_EXECUTABLE_SUFFIX STREQUAL RADIANT_EXECUTABLE))
+ add_custom_command(TARGET ${name} POST_BUILD
+ COMMAND ln -f -s "$<TARGET_FILE_NAME:${name}>" "${PROJECT_BINARY_DIR}/${name}.${RADIANT_EXECUTABLE}"
+ VERBATIM
+ )
+ endif ()
+endmacro()
+
+add_subdirectory(quake3)
--- /dev/null
+include_directories(BEFORE common)
+
+set(Q3MAP_VERSION 2.5.17n)
+find_package(Git REQUIRED)
+execute_process(
+ COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ OUTPUT_VARIABLE GIT_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+if (GIT_VERSION)
+ set(Q3MAP_VERSION "${Q3MAP_VERSION}-git-${GIT_VERSION}")
+endif ()
+add_definitions(-DQ3MAP_VERSION="${Q3MAP_VERSION}")
+
+find_package(GLIB REQUIRED)
+include_directories(${GLIB_INCLUDE_DIRS})
+
+find_package(JPEG REQUIRED)
+include_directories(${JPEG_INCLUDE_DIR})
+
+find_package(PNG REQUIRED)
+include_directories(${PNG_INCLUDE_DIR})
+
+find_package(LibXml2 REQUIRED)
+include_directories(${LIBXML2_INCLUDE_DIR})
+
+find_package(ZLIB REQUIRED)
+include_directories(${ZLIB_INCLUDE_DIRS})
+
+set(q3map2_games
+ q3map2/game_darkplaces.h
+ q3map2/game_dq.h
+ q3map2/game_ef.h
+ q3map2/game_etut.h
+ q3map2/game_ja.h
+ q3map2/game_jk2.h
+ q3map2/game_nexuiz.h
+ q3map2/game_prophecy.h
+ q3map2/game_qfusion.h
+ q3map2/game_quake3.h
+ q3map2/game_quakelive.h
+ q3map2/game_reaction.h
+ q3map2/game_sof2.h
+ q3map2/game_tenebrae.h
+ q3map2/game_tremulous.h
+ q3map2/game_wolf.h
+ q3map2/game_wolfet.h
+ q3map2/game_xonotic.h
+ )
+
+radiant_tool(q3map2
+ common/cmdlib.c common/cmdlib.h
+ common/imagelib.c common/imagelib.h
+ common/inout.c common/inout.h
+ common/jpeg.c
+ common/md4.c common/md4.h
+ common/mutex.c common/mutex.h
+ common/polylib.c common/polylib.h
+ common/polyset.h
+ common/qfiles.h
+ common/qthreads.h
+ common/scriplib.c common/scriplib.h
+ common/surfaceflags.h
+ common/threads.c
+ common/unzip.c common/unzip.h
+ common/vfs.c common/vfs.h
+
+ q3map2/brush.c
+ q3map2/brush_primit.c
+ q3map2/bsp.c
+ q3map2/bspfile_abstract.c
+ q3map2/bspfile_ibsp.c
+ q3map2/bspfile_rbsp.c
+ q3map2/convert_ase.c
+ q3map2/convert_map.c
+ q3map2/convert_obj.c
+ q3map2/decals.c
+ q3map2/facebsp.c
+ q3map2/fog.c
+ ${q3map2_games} q3map2/game__null.h
+ q3map2/image.c
+ q3map2/leakfile.c
+ q3map2/light.c
+ q3map2/light_bounce.c
+ q3map2/light_trace.c
+ q3map2/light_ydnar.c
+ q3map2/lightmaps_ydnar.c
+ q3map2/main.c
+ q3map2/map.c
+ q3map2/mesh.c
+ q3map2/model.c
+ q3map2/patch.c
+ q3map2/path_init.c
+ q3map2/portals.c
+ q3map2/prtfile.c
+ q3map2/q3map2.h
+ q3map2/shaders.c
+ q3map2/surface.c
+ q3map2/surface_extra.c
+ q3map2/surface_foliage.c
+ q3map2/surface_fur.c
+ q3map2/surface_meta.c
+ q3map2/tjunction.c
+ q3map2/tree.c
+ q3map2/vis.c
+ q3map2/visflow.c
+ q3map2/writebsp.c
+ )
+
+target_link_libraries(q3map2
+ ${GLIB_LIBRARIES}
+ ${JPEG_LIBRARIES}
+ ${PNG_LIBRARIES}
+ ${LIBXML2_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+ ddslib
+ etclib
+ filematch
+ l_net
+ mathlib
+ picomodel
+ )
+
+radiant_tool(q3data
+ common/aselib.c common/aselib.h
+ common/bspfile.c common/bspfile.h
+ common/cmdlib.c common/cmdlib.h
+ common/imagelib.c common/imagelib.h
+ common/inout.c common/inout.h
+ common/md4.c common/md4.h
+ common/scriplib.c common/scriplib.h
+ common/trilib.c common/trilib.h
+ common/unzip.c common/unzip.h
+ common/vfs.c common/vfs.h
+
+ q3data/3dslib.c q3data/3dslib.h
+ q3data/compress.c
+ q3data/images.c
+ q3data/md3lib.c q3data/md3lib.h
+ q3data/models.c
+ q3data/p3dlib.c q3data/p3dlib.h
+ q3data/polyset.c
+ q3data/q3data.c q3data/q3data.h
+ q3data/stripper.c
+ q3data/video.c
+ )
+
+target_link_libraries(q3data
+ ${GLIB_LIBRARIES}
+ ${LIBXML2_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+ filematch
+ etclib
+ l_net
+ mathlib
+ )
+
+add_custom_target(quake3)
+add_dependencies(quake3 q3map2 q3data)
+
+if (UNIX)
+ target_link_libraries(q3map2 pthread m)
+ target_link_libraries(q3data m)
+endif ()
+++ /dev/null
-*.dsp -m 'COPY' -k 'b'
-*.dsw -m 'COPY' -k 'b'
+++ /dev/null
-
-/*
- Copyright (C) 1999-2007 id Software, Inc. and contributors.
- For a list of contributors, see the accompanying CONTRIBUTORS file.
-
- This file is part of GtkRadiant.
-
- GtkRadiant is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- GtkRadiant is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GtkRadiant; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/* ydnar: for -game support */
-typedef struct game_s
-{
- char *arg; /* -game matches this */
- char *gamePath; /* main game data dir */
- char *homeBasePath; /* home sub-dir on unix */
- char *magic; /* magic word for figuring out base path */
- qboolean wolfLight; /* when true, lights work like wolf q3map */
- int bspVersion; /* BSP version to use */
-}
-game_t;