diff options
| author | 2020-07-21 06:15:04 -0400 | |
|---|---|---|
| committer | 2020-07-21 06:15:04 -0400 | |
| commit | fbc30002ab3438356c0476e70c4577a0310d52c0 (patch) | |
| tree | 62b4c241ad0b2a65b0e430b9f7710ed944d30fb1 /CMakeLists.txt | |
| parent | dff8b887edf10407f22aaab9d147948cd5491f0a (diff) | |
New upstream version 2.3.3+dfsg.upstream/2.3.3+dfsg
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e456e2f..6a377c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,12 +123,10 @@ if (UNIX) check_type_size (short SIZEOF_SHORT) # pthread is used on both Linux and Mac - check_library_exists ("pthread" pthread_create "" HAVE_PTHREAD) - if (HAVE_PTHREAD) - list (APPEND libs pthread) - else() - message (FATAL_ERROR "Missing library: pthread") - endif() + set (CMAKE_THREAD_PREFER_PTHREAD TRUE) + set (THREADS_PREFER_PTHREAD_FLAG TRUE) + find_package (Threads REQUIRED) + list (APPEND libs Threads::Threads) # curl is used on both Linux and Mac find_package (CURL) @@ -167,7 +165,15 @@ if (UNIX) link_directories("/usr/local/lib") endif() - if (${PKG_CONFIG_FOUND}) + 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 (BARRIER_BUILD_GUI AND ${PKG_CONFIG_FOUND}) pkg_check_modules (AVAHI_COMPAT REQUIRED avahi-compat-libdns_sd) include_directories (BEFORE SYSTEM ${AVAHI_COMPAT_INCLUDE_DIRS}) set (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${AVAHI_COMPAT_INCLUDE_DIRS}") @@ -261,7 +267,6 @@ if (UNIX) set (HAVE_CXX_EXCEPTIONS 1) set (HAVE_CXX_MUTABLE 1) set (HAVE_CXX_STDLIB 1) - set (HAVE_PTHREAD_SIGNAL 1) set (SELECT_TYPE_ARG1 int) set (SELECT_TYPE_ARG234 " (fd_set *)") set (SELECT_TYPE_ARG5 " (struct timeval *)") @@ -349,12 +354,6 @@ else() set (OPENSSL_LIBS ${lib_ssl} ${lib_crypto}) endif() - -# Check we have the *required* Qt5 libs. -find_package(Qt5Core REQUIRED) -find_package(Qt5Network REQUIRED) -find_package(Qt5Widgets REQUIRED) - # # Configure_file... but for directories, recursively. # @@ -398,12 +397,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") configure_files (${BARRIER_BUNDLE_SOURCE_DIR} ${BARRIER_BUNDLE_DIR}) - if (CMAKE_BUILD_TYPE STREQUAL "Release") - add_custom_target(Barrier_dmg ALL - bash build_installer.sh - DEPENDS barrier barriers barrierc - WORKING_DIRECTORY ${BARRIER_BUNDLE_DIR}) - endif() + add_custom_target(Barrier_MacOS ALL + bash build_dist.sh + DEPENDS barrier barriers barrierc + WORKING_DIRECTORY ${BARRIER_BUNDLE_DIR}) endif() # |
