mirror of
https://github.com/polybar/polybar.git
synced 2024-11-25 13:55:47 -05:00
Add FreeBSD Support (#931)
This commit is contained in:
parent
eb9c8e66f2
commit
0f34178104
3 changed files with 18 additions and 0 deletions
|
@ -31,8 +31,17 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors")
|
||||||
|
|
||||||
|
if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||||
|
# Need dprintf() for FreeBSD 11.1 and older
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WITH_DPRINTF")
|
||||||
|
|
||||||
|
# libinotify uses c99 extension, so suppress this error
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c99-extensions")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
|
if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=parentheses-equality")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=parentheses-equality")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-zero-length-array")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
|
||||||
|
|
|
@ -22,3 +22,8 @@ querylib(WITH_XRENDER "pkg-config" xcb-render libs dirs)
|
||||||
querylib(WITH_XRM "pkg-config" xcb-xrm libs dirs)
|
querylib(WITH_XRM "pkg-config" xcb-xrm libs dirs)
|
||||||
querylib(WITH_XSYNC "pkg-config" xcb-sync libs dirs)
|
querylib(WITH_XSYNC "pkg-config" xcb-sync libs dirs)
|
||||||
querylib(WITH_XCURSOR "pkg-config" xcb-cursor libs dirs)
|
querylib(WITH_XCURSOR "pkg-config" xcb-cursor libs dirs)
|
||||||
|
|
||||||
|
# FreeBSD Support
|
||||||
|
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||||
|
querylib(TRUE "pkg-config" libinotify libs dirs)
|
||||||
|
endif()
|
||||||
|
|
|
@ -4,7 +4,11 @@
|
||||||
#include <alsa/asoundlib.h>
|
#include <alsa/asoundlib.h>
|
||||||
#else
|
#else
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
#ifndef __FreeBSD__
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
Loading…
Reference in a new issue