mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03:00
Allow for conditional building of Steam and GOG APIs
I think it's a bit silly to always include the Steam and GOG APIs whenever we build VVVVVV, since the only time they'll ever be used is in a live build and not a dev build. So now Steam and GOG are disabled by default. If you want them, you'll need to add -DSTEAM=ON or -DGOG=ON respectively at CMake time. They're also both automatically enabled for release builds.
This commit is contained in:
@@ -10,6 +10,14 @@ 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)
|
||||
|
||||
SET(STEAM OFF CACHE BOOL "Use the Steam API")
|
||||
SET(GOG OFF CACHE BOOL "Use the GOG API")
|
||||
|
||||
IF(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
|
||||
SET(STEAM ON)
|
||||
SET(GOG ON)
|
||||
ENDIF()
|
||||
|
||||
# Architecture Flags
|
||||
IF(APPLE)
|
||||
# Wow, Apple is a huge jerk these days huh?
|
||||
@@ -95,12 +103,18 @@ SET(VVV_SRC
|
||||
src/WarpClass.cpp
|
||||
src/main.cpp
|
||||
src/Network.c
|
||||
src/SteamNetwork.c
|
||||
src/GOGNetwork.c
|
||||
)
|
||||
IF(NOT CUSTOM_LEVEL_SUPPORT STREQUAL "DISABLED")
|
||||
LIST(APPEND VVV_SRC src/editor.cpp)
|
||||
ENDIF()
|
||||
IF(STEAM)
|
||||
LIST(APPEND VVV_SRC src/SteamNetwork.c)
|
||||
ADD_DEFINITIONS(-DSTEAM_NETWORK)
|
||||
ENDIF()
|
||||
IF(GOG)
|
||||
LIST(APPEND VVV_SRC src/GOGNetwork.c)
|
||||
ADD_DEFINITIONS(-DGOG_NETWORK)
|
||||
ENDIF()
|
||||
|
||||
SET(XML_SRC
|
||||
../third_party/tinyxml/tinystr.cpp
|
||||
|
||||
Reference in New Issue
Block a user