Externals: Fix FreeBSD build

This commit is contained in:
Vicki Pfau 2017-07-30 07:46:23 -07:00
parent ba57605266
commit df6165391e
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)
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 {