summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/FindMilesSDK.cmake34
-rw-r--r--cmake/FindSndFile.cmake9
-rw-r--r--cmake/Findmpg123.cmake2
-rw-r--r--cmake/Findopusfile.cmake3
-rw-r--r--src/CMakeLists.txt9
5 files changed, 46 insertions, 11 deletions
diff --git a/cmake/FindMilesSDK.cmake b/cmake/FindMilesSDK.cmake
new file mode 100644
index 00000000..57da3a6e
--- /dev/null
+++ b/cmake/FindMilesSDK.cmake
@@ -0,0 +1,34 @@
+# - Find Miles SDK
+# Find the Miles SDK header + import library
+#
+# MilesSDK_INCLUDE_DIR - Where to find mss.h
+# MilesSDK_LIBRARIES - List of libraries when using MilesSDK.
+# MilesSDK_FOUND - True if Miles SDK found.
+# MilesSDK::MilesSDK - Imported library of Miles SDK
+
+find_path(MilesSDK_INCLUDE_DIR mss.h
+ PATHS "${MilesSDK_DIR}"
+ PATH_SUFFIXES include
+)
+
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(_miles_sdk_libname mss64)
+else()
+ set(_miles_sdk_libname mss32)
+endif()
+
+find_library(MilesSDK_LIBRARIES NAMES ${_miles_sdk_libname}
+ PATHS "${MilesSDK_DIR}"
+ PATH_SUFFIXES lib
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(MilesSDK DEFAULT_MSG MilesSDK_LIBRARIES MilesSDK_INCLUDE_DIR)
+
+if(NOT TARGET MilesSDK::MilesSDK)
+ add_library(MilesSDK::MilesSDK UNKNOWN IMPORTED)
+ set_target_properties(MilesSDK::MilesSDK PROPERTIES
+ IMPORTED_LOCATION "${MilesSDK_LIBRARIES}
+ INTERFACE_INCLUDE_DIRECTORIES "${MilesSDK_INCLUDE_DIR}"
+ )
+endif()
diff --git a/cmake/FindSndFile.cmake b/cmake/FindSndFile.cmake
index f0e2883e..5381af48 100644
--- a/cmake/FindSndFile.cmake
+++ b/cmake/FindSndFile.cmake
@@ -51,13 +51,10 @@ set(SNDFILE_CFLAGS "${PKG_SNDFILE_CFLAGS_OTHER}" CACHE STRING "CFLAGS of libsndf
set(SNDFILE_INCLUDE_DIRS "${SNDFILE_INCLUDE_DIR}")
set(SNDFILE_LIBRARIES "${SNDFILE_LIBRARY}")
-if (SNDFILE_INCLUDE_DIRS AND SNDFILE_LIBRARIES)
-set(SNDFILE_FOUND TRUE)
-endif (SNDFILE_INCLUDE_DIRS AND SNDFILE_LIBRARIES)
-
+if(SNDFILE_INCLUDE_DIRS AND SNDFILE_LIBRARIES)
+ set(SNDFILE_FOUND TRUE)
+endif()
-# handle the QUIETLY and REQUIRED arguments and set SndFile_FOUND to TRUE if
-# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SndFile DEFAULT_MSG SNDFILE_INCLUDE_DIRS SNDFILE_LIBRARIES)
diff --git a/cmake/Findmpg123.cmake b/cmake/Findmpg123.cmake
index 365d65ff..c6fe56bb 100644
--- a/cmake/Findmpg123.cmake
+++ b/cmake/Findmpg123.cmake
@@ -26,8 +26,6 @@ find_library(mpg123_LIBRARIES NAMES mpg123 mpg123-0
set(mpg123_CFLAGS "${PKG_MPG123_CFLAGS_OTHER}" CACHE STRING "CFLAGS of mpg123")
-# handle the QUIETLY and REQUIRED arguments and set mpg123_FOUND to TRUE if
-# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(mpg123 DEFAULT_MSG mpg123_LIBRARIES mpg123_INCLUDE_DIR)
diff --git a/cmake/Findopusfile.cmake b/cmake/Findopusfile.cmake
index 43d285eb..faae7645 100644
--- a/cmake/Findopusfile.cmake
+++ b/cmake/Findopusfile.cmake
@@ -52,9 +52,6 @@ if (OPUSFILE_INCLUDE_DIRS AND OPUSFILE_LIBRARIES)
set(OPUSFILE_FOUND TRUE)
endif (OPUSFILE_INCLUDE_DIRS AND OPUSFILE_LIBRARIES)
-
-# handle the QUIETLY and REQUIRED arguments and set Opusfile_FOUND to TRUE if
-# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(opusfile DEFAULT_MSG OPUSFILE_INCLUDE_DIRS OPUSFILE_LIBRARIES)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e943b908..a7c2a3d7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -36,6 +36,13 @@ target_compile_definitions(re3
RE3_NO_AUTOLINK
)
+if(LIBRW_PLATFORM_D3D9)
+ target_compile_definitions(re3
+ PUBLIC
+ USE_D3D9
+ )
+endif()
+
if(RE3_AUDIO STREQUAL "OAL")
find_package(OpenAL REQUIRED)
target_include_directories(re3 PRIVATE ${OPENAL_INCLUDE_DIR})
@@ -43,7 +50,9 @@ if(RE3_AUDIO STREQUAL "OAL")
target_compile_definitions(re3 PRIVATE ${OPENAL_DEFINITIONS})
target_compile_definitions(re3 PRIVATE AUDIO_OAL)
elseif(RE3_AUDIO STREQUAL "MSS")
+ find_package(MilesSDK REQUIRED)
target_compile_definitions(re3 PRIVATE AUDIO_MSS)
+ target_link_libraries(re3 PRIVATE MilesSDK::MilesSDK)
endif()
if(RE3_WITH_OPUS)