mirror of
https://github.com/love2d/megasource.git
synced 2026-08-12 00:20:55 +02:00
Add OpenAL to main CMakeLists.txt.
This commit is contained in:
@@ -17,6 +17,7 @@ set(DEP_LIBVORBIS_VER "1.3.3")
|
||||
set(DEP_MPG123_VER "1.15.3")
|
||||
set(DEP_FREETYPE_VER "2.5.0.1")
|
||||
set(DEP_SDL2_VER "2.0.0")
|
||||
set(DEP_OPENAL_VER "1.15.1")
|
||||
|
||||
set(SKIP_INSTALL_ALL TRUE)
|
||||
|
||||
@@ -36,6 +37,7 @@ add_subdirectory("libs/libvorbis-${DEP_LIBVORBIS_VER}" ${CMAKE_BINARY_DIR}/libvo
|
||||
add_subdirectory("libs/mpg123-${DEP_MPG123_VER}" ${CMAKE_BINARY_DIR}/mpg123)
|
||||
add_subdirectory("libs/freetype-${DEP_FREETYPE_VER}" ${CMAKE_BINARY_DIR}/freetype)
|
||||
add_subdirectory("libs/SDL2-${DEP_SDL2_VER}" ${CMAKE_BINARY_DIR}/SDL2)
|
||||
add_subdirectory("libs/openal-soft-${DEP_OPENAL_VER}" ${CMAKE_BINARY_DIR}/openal-soft)
|
||||
|
||||
link_directories(${SDL_LINK_DIR})
|
||||
add_executable(ldeptest src/test.cpp)
|
||||
@@ -52,6 +54,7 @@ target_link_libraries(ldeptest
|
||||
freetype-static
|
||||
SDL2
|
||||
SDL2main
|
||||
${OPENAL_LIB_NAME}
|
||||
)
|
||||
|
||||
add_custom_command(TARGET ldeptest POST_BUILD
|
||||
@@ -63,3 +66,8 @@ add_custom_command(TARGET ldeptest POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
$<TARGET_FILE:SDL2>
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/$<TARGET_FILE_NAME:SDL2>)
|
||||
|
||||
add_custom_command(TARGET ldeptest POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
$<TARGET_FILE:${OPENAL_LIB_NAME}>
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/$<TARGET_FILE_NAME:${OPENAL_LIB_NAME}>)
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include <freetype/config/ftconfig.h>
|
||||
#include <freetype/freetype.h>
|
||||
#include <SDL.h>
|
||||
#include <AL/al.h>
|
||||
#include <AL/alext.h>
|
||||
|
||||
extern "C" {
|
||||
# include "lua.h"
|
||||
@@ -131,6 +133,16 @@ int main(int argc, char **argv)
|
||||
return "SDL2";
|
||||
};
|
||||
|
||||
vfunc OpenAL = [](strs &c, strs &l)
|
||||
{
|
||||
alIsEnabled(AL_SOURCE_DISTANCE_MODEL);
|
||||
|
||||
c << "N/A";
|
||||
l << "N/A";
|
||||
return "OpenAL";
|
||||
};
|
||||
|
||||
|
||||
std::vector<vfunc> funcs;
|
||||
funcs.push_back(zlib);
|
||||
funcs.push_back(physfs);
|
||||
@@ -143,6 +155,7 @@ int main(int argc, char **argv)
|
||||
funcs.push_back(mpg123);
|
||||
funcs.push_back(freetype);
|
||||
funcs.push_back(SDL2);
|
||||
funcs.push_back(OpenAL);
|
||||
|
||||
for (size_t i = 0; i < funcs.size(); ++i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user