Merge pull request #468 from qbit/openbsd

tell build system about openbsd
This commit is contained in:
Adrian Lucrèce Céleste 2019-10-16 19:50:55 -04:00 committed by GitHub
commit 6daa516e99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -167,6 +167,14 @@ if (UNIX)
link_directories("/usr/local/lib") link_directories("/usr/local/lib")
endif() endif()
if (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
set (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};/usr/X11R6/include;/usr/local/include;/usr/local/include/avahi-compat-libdns_sd")
set (CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -L/usr/local/lib -L/usr/X11R6/lib")
include_directories("/usr/local/include" "/usr/X11R6/include" "/usr/local/include/avahi-compat-libdns_sd")
link_directories("/usr/local/lib")
link_directories("/usr/X11R6/lib")
endif()
if (${PKG_CONFIG_FOUND}) if (${PKG_CONFIG_FOUND})
pkg_check_modules (AVAHI_COMPAT REQUIRED avahi-compat-libdns_sd) pkg_check_modules (AVAHI_COMPAT REQUIRED avahi-compat-libdns_sd)
include_directories (BEFORE SYSTEM ${AVAHI_COMPAT_INCLUDE_DIRS}) include_directories (BEFORE SYSTEM ${AVAHI_COMPAT_INCLUDE_DIRS})

View File

@ -48,6 +48,6 @@ target_link_libraries (barrier common)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
install (TARGETS barrier DESTINATION ${BARRIER_BUNDLE_BINARY_DIR}) install (TARGETS barrier DESTINATION ${BARRIER_BUNDLE_BINARY_DIR})
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "BSD")
install (TARGETS barrier DESTINATION bin) install (TARGETS barrier DESTINATION bin)
endif() endif()