summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt37
1 files changed, 20 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index df31a704..ae6395c8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,35 +1,38 @@
cmake_minimum_required(VERSION 3.8)
-project(re3 C CXX)
+set(EXECUTABLE re3)
+set(PROJECT RE3)
+
+project(${EXECUTABLE} C CXX)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
if(WIN32)
- set(RE3_AUDIOS "OAL" "MSS")
+ set(${PROJECT}_AUDIOS "OAL" "MSS")
else()
- set(RE3_AUDIOS "OAL")
+ set(${PROJECT}_AUDIOS "OAL")
endif()
-set(RE3_AUDIO "OAL" CACHE STRING "Audio")
+set(${PROJECT}_AUDIO "OAL" CACHE STRING "Audio")
-option(RE3_WITH_OPUS "Build re3 with opus support" OFF)
-option(RE3_WITH_LIBSNDFILE "Build re3 with libsndfile (instead of internal decoder)" OFF)
+option(${PROJECT}_WITH_OPUS "Build ${EXECUTABLE} with opus support" OFF)
+option(${PROJECT}_WITH_LIBSNDFILE "Build ${EXECUTABLE} with libsndfile (instead of internal decoder)" OFF)
-set_property(CACHE RE3_AUDIO PROPERTY STRINGS ${RE3_AUDIOS})
-message(STATUS "RE3_AUDIO = ${RE3_AUDIO} (choices=${RE3_AUDIOS})")
-set("RE3_AUDIO_${RE3_AUDIO}" ON)
-if(NOT RE3_AUDIO IN_LIST RE3_AUDIOS)
- message(FATAL_ERROR "Illegal RE3_AUDIO=${RE3_AUDIO}")
+set_property(CACHE ${PROJECT}_AUDIO PROPERTY STRINGS ${${PROJECT}_AUDIOS})
+message(STATUS "${PROJECT}_AUDIO = ${${PROJECT}_AUDIO} (choices=${${PROJECT}_AUDIOS})")
+set("${PROJECT}_AUDIO_${${PROJECT}_AUDIO}" ON)
+if(NOT ${PROJECT}_AUDIO IN_LIST ${PROJECT}_AUDIOS)
+ message(FATAL_ERROR "Illegal ${PROJECT}_AUDIO=${${PROJECT}_AUDIO}")
endif()
-option(RE3_VENDORED_LIBRW "Use vendored librw" ON)
-if(RE3_VENDORED_LIBRW)
+option(${PROJECT}_VENDORED_LIBRW "Use vendored librw" ON)
+if(${PROJECT}_VENDORED_LIBRW)
add_subdirectory(vendor/librw)
else()
find_package(librw REQUIRED)
endif()
add_subdirectory(src)
-if(RE3_INSTALL)
+if(${PROJECT}_INSTALL)
install(DIRECTORY gamefiles/ DESTINATION ".")
if(LIBRW_PLATFORM_NULL)
set(platform "-null")
@@ -44,12 +47,12 @@ if(RE3_INSTALL)
elseif(LIBRW_PLATFORM_D3D9)
set(platform "-d3d9")
endif()
- if(RE3_AUDIO_OAL)
+ if(${PROJECT}_AUDIO_OAL)
set(audio "-oal")
- elseif(RE3_AUDIO_MSS)
+ elseif(${PROJECT}_AUDIO_MSS)
set(audio "-mss")
endif()
- if(RE3_WITH_OPUS)
+ if(${PROJECT}_WITH_OPUS)
set(audio "${audio}-opus")
endif()
if(NOT LIBRW_PLATFORM_PS2)