summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.si>2022-12-27 22:02:46 +0100
committerTimotej Lazar <timotej.lazar@araneo.si>2022-12-27 22:02:46 +0100
commit57d34548e2966759d7361227dcf1e99a053fad75 (patch)
tree8a19ca94f91dffe570b468d6f910ea042d2450d2
parentf37c28cb52d0ea0808f25696ace26f6349fedffd (diff)
Clean up build options
-rw-r--r--CMakeLists.txt15
1 files changed, 5 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd7b802..862dcc5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,8 +1,10 @@
-
-# Aliens vs Predator Linux - http://icculus.org/avp/
-# CMake 2.8 project
+PROJECT(avp DESCRIPTION "Aliens vs Predator Linux port" HOMEPAGE_URL "http://icculus.org/avp/")
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
+option(AVP_WEB "Build a WASM binary (untested)")
+option(USE_SDL1 "Use SDL 1.2 instead of SDL 2")
+option(USE_GLES2 "Use OpenGLES 2 instead of OpenGL")
+
# default to Release
IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
MESSAGE(STATUS "No build type specified, defaulting to Release")
@@ -10,10 +12,6 @@ IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
ENDIF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
-option(AVP_WEB "Build a WASM binary (untested)")
-
-PROJECT(avp)
-
IF(AVP_WEB)
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -g4 -s USE_SDL=2 -s TOTAL_MEMORY=234881024 -s ASSERTIONS=2 -s SAFE_HEAP=1 -s STACK_OVERFLOW_CHECK=2 -s DEMANGLE_SUPPORT=1")
@@ -38,9 +36,6 @@ IF(NOT AVP_WEB)
pkg_check_modules(LIBSWSCALE REQUIRED libswscale)
pkg_check_modules(OPENAL REQUIRED openal)
- option(USE_SDL1 "Use SDL 1.2 instead of SDL 2")
- option(USE_GLES2 "Use OpenGLES 2 instead of OpenGL")
-
IF(USE_SDL1)
pkg_check_modules(SDL REQUIRED sdl>=1.2)
ELSE()