summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2020-10-31 23:14:28 +0100
committershfil <filip.gawin@zoho.com>2020-11-02 17:07:04 +0100
commit1df6dda546aa658d456846900880ac380d0ab677 (patch)
tree360be8ea099941f77a0f1490151a61fb2f3d6ff3 /CMakeLists.txt
parentFix include in Frontend_PS2.cpp (diff)
downloadre3-1df6dda546aa658d456846900880ac380d0ab677.tar
re3-1df6dda546aa658d456846900880ac380d0ab677.tar.gz
re3-1df6dda546aa658d456846900880ac380d0ab677.tar.bz2
re3-1df6dda546aa658d456846900880ac380d0ab677.tar.lz
re3-1df6dda546aa658d456846900880ac380d0ab677.tar.xz
re3-1df6dda546aa658d456846900880ac380d0ab677.tar.zst
re3-1df6dda546aa658d456846900880ac380d0ab677.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..5daf1d15
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,44 @@
+cmake_minimum_required(VERSION 3.8)
+
+project(re3 C CXX)
+list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
+
+if(WIN32)
+ set(RE3_AUDIOS "NULL" "OAL" "MSS")
+else()
+ set(RE3_AUDIOS "NULL" "OAL")
+endif()
+
+set(RE3_AUDIO "OAL" CACHE STRING "Audio")
+
+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}")
+endif()
+
+if(RE3_INSTALL)
+ include(GNUInstallDirs)
+ set(RE3_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/re3")
+endif()
+
+add_subdirectory("vendor/librw")
+add_subdirectory(src)
+
+if(RE3_INSTALL)
+ include(CMakePackageConfigHelpers)
+ configure_package_config_file(re3-config.cmake.in re3-config.cmake
+ INSTALL_DESTINATION "${CMAKE_INSTALL_PREFIX}"
+ )
+ install(
+ FILES "${CMAKE_CURRENT_BINARY_DIR}/re3-config.cmake"
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
+ )
+ install(
+ EXPORT re3-targets
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
+ )
+
+ include(CMakeCPack.cmake)
+endif()