--- /dev/null
+cmake_minimum_required(VERSION 2.8.11)
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+project(xonotic-data LANGUAGES ASM)
+
+add_definitions(-DWATERMARK=\"12345\")
+add_definitions(-DNDEBUG=1)
+include_directories(qcsrc)
+
+set_source_files_properties(
+ qcsrc/client/progs.inc
+ qcsrc/server/progs.inc
+ qcsrc/menu/progs.inc
+ PROPERTIES
+ LANGUAGE ASM
+ HEADER_FILE_ONLY FALSE
+)
+
+add_executable(csprogs qcsrc/client/progs.inc)
+target_compile_definitions(csprogs PRIVATE -DCSQC)
+
+add_executable(progs qcsrc/server/progs.inc)
+target_compile_definitions(progs PRIVATE -DSVQC)
+
+add_executable(menu qcsrc/menu/progs.inc)
+target_compile_definitions(menu PRIVATE -DMENUQC)
--- /dev/null
+set(CMAKE_ASM_COMPILER "@CMAKE_ASM_COMPILER@")
+set(CMAKE_ASM_COMPILER_LOADED 1)
+
+set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS qc;qh;inc)
+set(CMAKE_ASM_OUTPUT_EXTENSION .o)
+set(CMAKE_ASM_OUTPUT_EXTENSION_REPLACE 1)
+set(CMAKE_ASM_LINKER_PREFERENCE 42)
+set(CMAKE_ASM_COMPILER_ENV_VAR "QCC")
--- /dev/null
+# TODO: <DEFINES> <INCLUDES> <FLAGS>
+set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> compile <OBJECT> <DEFINES> -DGMQCC <FLAGS> <SOURCE>")
+set(CMAKE_ASM_LINK_EXECUTABLE "<CMAKE_ASM_COMPILER> link <OBJECTS> -o <TARGET>")
+
+set(CMAKE_INCLUDE_FLAG_ASM "-I")
+set(CMAKE_INCLUDE_FLAG_ASM_SEP "")
+set(CMAKE_EXECUTABLE_PREFIX_ASM "")
+set(CMAKE_EXECUTABLE_SUFFIX_ASM ".dat")
--- /dev/null
+set(CMAKE_ASM_COMPILER ${PROJECT_SOURCE_DIR}/cmake/qcc.sh)
+
+configure_file(cmake/CMakeASMCompiler.cmake.in
+ ${CMAKE_PLATFORM_INFO_DIR}/CMakeASMCompiler.cmake @ONLY)
+set(CMAKE_ASM_COMPILER_ENV_VAR "QCC")
--- /dev/null
+set(CMAKE_ASM_COMPILER_WORKS 1 CACHE INTERNAL "")
--- /dev/null
+#!/bin/bash
+QCC=${QCC:-$(dirname "$0")/../../../gmqcc/gmqcc}
+case $1 in
+ compile)
+ echo $@
+ cpp ${@:3} | sed 's/^#\(line\)\? \([[:digit:]]\+\) "\(.*\)".*/\n#pragma file(\3)\n#pragma line(\2)/g' > $2
+ ;;
+ link)
+ ${QCC} \
+ -std=gmqcc \
+ -Ooverlap-locals \
+ -O3 \
+ -Werror -Wall \
+ -Wno-field-redeclared \
+ -flno -futf8 -fno-bail-on-werror \
+ -frelaxed-switch -freturn-assignments \
+ ${@:2}
+ ;;
+esac