mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-02-02 15:32:19 +03:00
Add option to allow custom levels when the editor is disabled
This commit is contained in:
@@ -7,6 +7,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
|
||||
OPTION(ENABLE_WARNINGS "Enable compilation warnings" ON)
|
||||
OPTION(ENABLE_WERROR "Treat compilation warnings as errors" OFF)
|
||||
|
||||
SET(CUSTOM_LEVEL_SUPPORT ENABLED CACHE STRING "Optionally disable playing and/or editing of custom levels")
|
||||
SET_PROPERTY(CACHE CUSTOM_LEVEL_SUPPORT PROPERTY STRINGS ENABLED NO_EDITOR DISABLED)
|
||||
|
||||
# Architecture Flags
|
||||
IF(APPLE)
|
||||
# Wow, Apple is a huge jerk these days huh?
|
||||
@@ -24,7 +27,6 @@ IF(APPLE)
|
||||
ENDIF()
|
||||
|
||||
PROJECT(VVVVVV)
|
||||
OPTION(NO_EDITOR "Compile without the level editor" OFF)
|
||||
|
||||
IF(APPLE)
|
||||
MESSAGE(STATUS "Using macOS SDK at ${CMAKE_OSX_SYSROOT}")
|
||||
@@ -96,10 +98,8 @@ SET(VVV_SRC
|
||||
src/SteamNetwork.c
|
||||
src/GOGNetwork.c
|
||||
)
|
||||
IF (NOT NO_EDITOR)
|
||||
IF(NOT CUSTOM_LEVEL_SUPPORT STREQUAL "DISABLED")
|
||||
LIST(APPEND VVV_SRC src/editor.cpp)
|
||||
ELSE()
|
||||
ADD_DEFINITIONS(-DNO_EDITOR)
|
||||
ENDIF()
|
||||
|
||||
SET(XML_SRC
|
||||
@@ -144,6 +144,12 @@ IF(ENABLE_WARNINGS)
|
||||
/W4 $<$<BOOL:${ENABLE_WERROR}>:/WX>>)
|
||||
ENDIF()
|
||||
|
||||
IF(CUSTOM_LEVEL_SUPPORT STREQUAL "NO_EDITOR")
|
||||
ADD_DEFINITIONS(-DNO_EDITOR)
|
||||
ELSEIF(CUSTOM_LEVEL_SUPPORT STREQUAL "DISABLED")
|
||||
ADD_DEFINITIONS(-DNO_CUSTOM_LEVELS -DNO_EDITOR)
|
||||
ENDIF()
|
||||
|
||||
# Library information
|
||||
ADD_LIBRARY(tinyxml-static STATIC ${XML_SRC})
|
||||
ADD_LIBRARY(physfs-static STATIC ${PFS_SRC} ${PFSP_SRC})
|
||||
|
||||
Reference in New Issue
Block a user