mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 18:32:44 +01:00
Include libsndfile & OpenAL
This commit is contained in:
parent
d490f8c7c6
commit
f5390ad4a6
@ -65,10 +65,12 @@ IF(APPLE)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
find_package(OpenAL REQUIRED)
|
||||||
find_package(Bullet REQUIRED)
|
find_package(Bullet REQUIRED)
|
||||||
find_package(SFML 2 COMPONENTS system window audio graphics network REQUIRED)
|
find_package(SFML 2 COMPONENTS system window audio graphics network REQUIRED)
|
||||||
find_package(MAD REQUIRED)
|
find_package(MAD REQUIRED)
|
||||||
find_package(GLM REQUIRED)
|
find_package(GLM REQUIRED)
|
||||||
|
find_package(LibSndFile REQUIRED)
|
||||||
|
|
||||||
include_directories("${GLM_INCLUDE_DIRS}")
|
include_directories("${GLM_INCLUDE_DIRS}")
|
||||||
|
|
||||||
|
34
cmake/modules/FindLibSndFile.cmake
Normal file
34
cmake/modules/FindLibSndFile.cmake
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# - Try to find libsndfile
|
||||||
|
# Once done, this will define
|
||||||
|
#
|
||||||
|
# LIBSNDFILE_FOUND - system has libsndfile
|
||||||
|
# LIBSNDFILE_INCLUDE_DIRS - the libsndfile include directories
|
||||||
|
# LIBSNDFILE_LIBRARIES - link these to use libsndfile
|
||||||
|
|
||||||
|
# Use pkg-config to get hints about paths
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(LIBSNDFILE_PKGCONF sndfile)
|
||||||
|
endif(PKG_CONFIG_FOUND)
|
||||||
|
|
||||||
|
# Include dir
|
||||||
|
find_path(LIBSNDFILE_INCLUDE_DIR
|
||||||
|
NAMES sndfile.h
|
||||||
|
PATHS ${LIBSNDFILE_PKGCONF_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Library
|
||||||
|
find_library(LIBSNDFILE_LIBRARY
|
||||||
|
NAMES sndfile libsndfile-1
|
||||||
|
PATHS ${LIBSNDFILE_PKGCONF_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_package(PackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(LibSndFile DEFAULT_MSG LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR)
|
||||||
|
|
||||||
|
if(LIBSNDFILE_FOUND)
|
||||||
|
set(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY})
|
||||||
|
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR})
|
||||||
|
endif(LIBSNDFILE_FOUND)
|
||||||
|
|
||||||
|
mark_as_advanced(LIBSNDFILE_LIBRARY LIBSNDFILE_LIBRARIES LIBSNDFILE_INCLUDE_DIR LIBSNDFILE_INCLUDE_DIRS)
|
@ -13,12 +13,16 @@ target_link_libraries(rwengine
|
|||||||
rwlib
|
rwlib
|
||||||
${MAD_LIBRARY}
|
${MAD_LIBRARY}
|
||||||
${SFML_LIBRARIES}
|
${SFML_LIBRARIES}
|
||||||
|
${LIBSNDFILE_LIBRARY}
|
||||||
|
${OPENAL_LIBRARY}
|
||||||
${OPENRW_PLATFORM_LIBS})
|
${OPENRW_PLATFORM_LIBS})
|
||||||
|
|
||||||
include_directories(SYSTEM
|
include_directories(SYSTEM
|
||||||
${BULLET_INCLUDE_DIR}
|
${BULLET_INCLUDE_DIR}
|
||||||
${MAD_INCLUDE_DIR}
|
${MAD_INCLUDE_DIR}
|
||||||
${SFML_INCLUDE_DIR}
|
${SFML_INCLUDE_DIR}
|
||||||
|
${LIBSNDFILE_INCLUDE_DIR}
|
||||||
|
${OPENAL_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <sndfile.h>
|
||||||
|
#include <AL/al.h>
|
||||||
|
#include <AL/alc.h>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <SFML/Audio.hpp>
|
#include <SFML/Audio.hpp>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user