summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-12-19 01:21:04 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-12-19 01:21:04 +0100
commit8d1996833bd73271ca14a3df46633d9b2ed13052 (patch)
treedaedb1622096e5bb6b8b9ec15882769b827506e1 /CMakeLists.txt
parentget rid of all PED_SKIN defines (diff)
parentlittle cleanup of templates (diff)
downloadre3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar
re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.gz
re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.bz2
re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.lz
re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.xz
re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.zst
re3-8d1996833bd73271ca14a3df46633d9b2ed13052.zip
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt44
1 files changed, 44 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000..387400b3
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,44 @@
+cmake_minimum_required(VERSION 3.8)
+
+project(reVC C CXX)
+list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
+
+if(WIN32)
+ set(REVC_AUDIOS "NULL" "OAL" "MSS")
+else()
+ set(REVC_AUDIOS "NULL" "OAL")
+endif()
+
+set(REVC_AUDIO "OAL" CACHE STRING "Audio")
+
+set_property(CACHE REVC_AUDIO PROPERTY STRINGS ${REVC_AUDIOS})
+message(STATUS "REVC_AUDIO = ${REVC_AUDIO} (choices=${REVC_AUDIOS})")
+set("REVC_AUDIO_${REVC_AUDIO}" ON)
+if(NOT REVC_AUDIO IN_LIST REVC_AUDIOS)
+ message(FATAL_ERROR "Illegal REVC_AUDIO=${REVC_AUDIO}")
+endif()
+
+if(REVC_INSTALL)
+ include(GNUInstallDirs)
+ set(REVC_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/reVC")
+endif()
+
+add_subdirectory("vendor/librw")
+add_subdirectory(src)
+
+if(REVC_INSTALL)
+ include(CMakePackageConfigHelpers)
+ configure_package_config_file(reVC-config.cmake.in reVC-config.cmake
+ INSTALL_DESTINATION "${CMAKE_INSTALL_PREFIX}"
+ )
+ install(
+ FILES "${CMAKE_CURRENT_BINARY_DIR}/reVC-config.cmake"
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
+ )
+ install(
+ EXPORT reVC-targets
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
+ )
+
+ include(CMakeCPack.cmake)
+endif()