* BSD/FreeBSD build fix

This commit is contained in:
ivan-83 2015-03-10 01:21:28 +03:00
parent 4f8f84f33b
commit 434436b75f
4 changed files with 20 additions and 1 deletions

View File

@ -358,6 +358,14 @@ if(APPLE)
endif()
endif(APPLE)
# BSD
if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
set(BSD TRUE)
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
set(FREEBSD TRUE)
endif()
endif()
# Android
if(ANDROID)
set(WITH_LIBRARY_VERSIONING "OFF")
@ -618,6 +626,12 @@ set(FREERDP_EXTENSION_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/freerdp/extensions")
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
if(BSD)
if(IS_DIRECTORY /usr/local/include)
include_directories(/usr/local/include)
link_directories(/usr/local/lib)
endif()
endif()
# Configure files
add_definitions("-DHAVE_CONFIG_H")

View File

@ -61,7 +61,7 @@
#ifndef _WIN32
#include <alloca.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <sys/wait.h>

View File

@ -54,6 +54,7 @@
#ifndef _WIN32
#include <time.h>
#include <sys/time.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>

View File

@ -113,6 +113,10 @@ if(UNIX)
winpr_library_add(m)
endif()
if(BSD)
winpr_library_add(execinfo)
endif()
if(WIN32)
winpr_library_add(Dbghelp)
endif()