Merge pull request #5845 from endrift/fix-freebsd-build-again

Externals: Fix FreeBSD build
This commit is contained in:
Leo Lam 2017-07-30 23:37:24 +08:00 committed by GitHub
commit 7c1aa9f570
3 changed files with 10 additions and 3 deletions

View File

@ -82,7 +82,9 @@ if(USE_PULSE)
target_sources(cubeb PRIVATE
src/cubeb_pulse.c)
target_compile_definitions(cubeb PRIVATE USE_PULSE)
target_link_libraries(cubeb PRIVATE dl)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
target_link_libraries(cubeb PRIVATE dl)
endif()
endif()
check_include_files(alsa/asoundlib.h USE_ALSA)
@ -98,7 +100,10 @@ if(USE_JACK)
target_sources(cubeb PRIVATE
src/cubeb_jack.cpp)
target_compile_definitions(cubeb PRIVATE USE_JACK)
target_link_libraries(cubeb PRIVATE dl pthread)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
target_link_libraries(cubeb PRIVATE dl)
endif()
target_link_libraries(cubeb PRIVATE pthread)
endif()
check_include_files(audioclient.h USE_WASAPI)

View File

@ -8,7 +8,9 @@
*/
#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#ifndef __FreeBSD__
#define _POSIX_SOURCE
#endif
#include <dlfcn.h>
#include <stdio.h>
#include <string.h>

View File

@ -51,7 +51,7 @@
#include "Scan.h"
#include <functional>
#include <functional>
#include <cstdarg>
namespace glslang {