mirror of
https://github.com/rwengine/openrw.git
synced 2024-09-04 01:29:45 +02:00
Include libsndfile & OpenAL
This commit is contained in:
parent
d490f8c7c6
commit
f5390ad4a6
@ -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}")
|
||||
|
||||
|
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
|
||||
${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(
|
||||
|
@ -1,4 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <sndfile.h>
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
|
||||
#include <vector>
|
||||
#include <SFML/Audio.hpp>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user