diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a9144a5c..386ae67d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/winpr/libwinpr/synch/wait.c b/winpr/libwinpr/synch/wait.c index 60918e398..0e96ce570 100644 --- a/winpr/libwinpr/synch/wait.c +++ b/winpr/libwinpr/synch/wait.c @@ -61,7 +61,7 @@ #ifndef _WIN32 -#include +#include #include #include #include diff --git a/winpr/libwinpr/sysinfo/sysinfo.c b/winpr/libwinpr/sysinfo/sysinfo.c index 1529d54b3..457ab9d45 100644 --- a/winpr/libwinpr/sysinfo/sysinfo.c +++ b/winpr/libwinpr/sysinfo/sysinfo.c @@ -54,6 +54,7 @@ #ifndef _WIN32 #include +#include #ifdef HAVE_UNISTD_H #include diff --git a/winpr/libwinpr/utils/CMakeLists.txt b/winpr/libwinpr/utils/CMakeLists.txt index e524bf9e3..501f605ec 100644 --- a/winpr/libwinpr/utils/CMakeLists.txt +++ b/winpr/libwinpr/utils/CMakeLists.txt @@ -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()