diff options
| author | 2018-04-25 18:07:30 -0400 | |
|---|---|---|
| committer | 2018-04-25 18:07:30 -0400 | |
| commit | 9b1b081cfdb1c0fb6457278775e0823f8bc10f62 (patch) | |
| tree | ce8840148d8445055ba9e4f12263b2208f234c16 /src/gui/CMakeLists.txt | |
Import Upstream version 2.0.0+dfsgupstream/2.0.0+dfsg
Diffstat (limited to 'src/gui/CMakeLists.txt')
| -rw-r--r-- | src/gui/CMakeLists.txt | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt new file mode 100644 index 0000000..5d24891 --- /dev/null +++ b/src/gui/CMakeLists.txt @@ -0,0 +1,52 @@ +cmake_minimum_required (VERSION 3.4) + +find_package (Qt5 COMPONENTS Core Widgets Network) +set (CMAKE_AUTOMOC ON) +set (CMAKE_AUTORCC ON) +set (CMAKE_AUTOUIC ON) +set (CMAKE_INCLUDE_CURRENT_DIR ON) + +file (GLOB GUI_SOURCE_FILES src/*.cpp src/*.h) +file (GLOB GUI_UI_FILES src/*.ui) + +if (WIN32) + set (GUI_RC_FILES res/win/Barrier.rc) +endif() + +add_executable (barrier WIN32 + ${GUI_SOURCE_FILES} + ${GUI_UI_FILES} + ${GUI_RC_FILES} + res/Barrier.qrc +) + +include_directories (./src) + +qt5_use_modules (barrier Core Widgets Network) +target_compile_definitions (barrier PRIVATE -DBARRIER_VERSION_STAGE="${BARRIER_VERSION_STAGE}") +target_compile_definitions (barrier PRIVATE -DBARRIER_REVISION="${BARRIER_REVISION}") + +if (WIN32) + include_directories ($ENV{BONJOUR_SDK_HOME}/Include) + find_library (DNSSD_LIB dnssd.lib + HINTS ENV BONJOUR_SDK_HOME + PATH_SUFFIXES "Lib/x64") + set_target_properties (barrier PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT") + target_link_libraries (barrier ${DNSSD_LIB}) +elseif (APPLE) + find_library(APPSERVICES_LIB ApplicationServices) + target_link_libraries(barrier ${APPSERVICES_LIB}) +elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR + ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + target_link_libraries (barrier dns_sd) +endif() + +if (HAVE_X11) + target_link_libraries (barrier X11) +endif() + +if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + install (TARGETS barrier DESTINATION ${BARRIER_BUNDLE_BINARY_DIR}) +elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + install (TARGETS barrier DESTINATION bin) +endif() |
