1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-02 00:42:33 +01:00

Include libsndfile & OpenAL

This commit is contained in:
Timmy Sjöstedt 2016-05-24 19:49:19 +02:00
parent d490f8c7c6
commit f5390ad4a6
4 changed files with 45 additions and 0 deletions

View File

@ -65,10 +65,12 @@ IF(APPLE)
ENDIF()
find_package(OpenGL REQUIRED)
find_package(OpenAL REQUIRED)
find_package(Bullet REQUIRED)
find_package(SFML 2 COMPONENTS system window audio graphics network REQUIRED)
find_package(MAD REQUIRED)
find_package(GLM REQUIRED)
find_package(LibSndFile REQUIRED)
include_directories("${GLM_INCLUDE_DIRS}")

View 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)

View File

@ -13,12 +13,16 @@ target_link_libraries(rwengine
rwlib
${MAD_LIBRARY}
${SFML_LIBRARIES}
${LIBSNDFILE_LIBRARY}
${OPENAL_LIBRARY}
${OPENRW_PLATFORM_LIBS})
include_directories(SYSTEM
${BULLET_INCLUDE_DIR}
${MAD_INCLUDE_DIR}
${SFML_INCLUDE_DIR}
${LIBSNDFILE_INCLUDE_DIR}
${OPENAL_INCLUDE_DIR}
)
include_directories(

View File

@ -1,4 +1,9 @@
#pragma once
#include <sndfile.h>
#include <AL/al.h>
#include <AL/alc.h>
#include <vector>
#include <SFML/Audio.hpp>