2016-12-19 17:41:01 +00:00
|
|
|
cmake_minimum_required (VERSION 3.4)
|
|
|
|
|
2017-01-23 23:49:40 +00:00
|
|
|
find_package (Qt5 COMPONENTS Core Widgets Network)
|
2016-12-19 17:41:01 +00:00
|
|
|
set (CMAKE_AUTOMOC ON)
|
|
|
|
set (CMAKE_AUTORCC ON)
|
|
|
|
set (CMAKE_AUTOUIC ON)
|
|
|
|
set (CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
|
|
|
file (GLOB LEGACY_GUI_SOURCE_FILES src/*.cpp src/*.h)
|
2017-02-09 19:57:13 +00:00
|
|
|
file (GLOB LEGACY_GUI_UI_FILES src/*.ui)
|
2016-12-19 17:41:01 +00:00
|
|
|
|
2017-02-09 20:05:36 +00:00
|
|
|
if (WIN32)
|
|
|
|
set (LEGACY_GUI_RC_FILES res/win/Synergy.rc)
|
|
|
|
endif()
|
|
|
|
|
2017-02-09 15:57:10 +00:00
|
|
|
add_executable (synergy WIN32
|
2016-12-28 11:50:32 +00:00
|
|
|
${LEGACY_GUI_SOURCE_FILES}
|
|
|
|
${LEGACY_GUI_UI_FILES}
|
2017-02-09 20:05:36 +00:00
|
|
|
${LEGACY_GUI_RC_FILES}
|
2016-12-28 11:50:32 +00:00
|
|
|
res/Synergy.qrc
|
2016-12-19 17:41:01 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
include_directories (../lib/shared ./src)
|
2017-03-08 18:20:18 +00:00
|
|
|
target_link_libraries (synergy shared)
|
2016-12-19 17:41:01 +00:00
|
|
|
|
|
|
|
if (WIN32)
|
2016-12-28 11:50:32 +00:00
|
|
|
include_directories ($ENV{BONJOUR_SDK_HOME}/Include)
|
|
|
|
find_library (DNSSD_LIB dnssd.lib
|
|
|
|
HINTS ENV BONJOUR_SDK_HOME
|
|
|
|
PATH_SUFFIXES "Lib/x64")
|
2017-03-08 18:20:18 +00:00
|
|
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
|
|
target_link_libraries (synergy dns_sd)
|
2016-12-19 17:41:01 +00:00
|
|
|
endif()
|
|
|
|
|
2017-02-08 12:40:34 +00:00
|
|
|
qt5_use_modules (synergy Core Widgets Network)
|
|
|
|
target_compile_definitions (synergy PRIVATE -DVERSION_STAGE="${VERSION_STAGE}")
|
2017-02-09 15:57:10 +00:00
|
|
|
target_compile_definitions (synergy PRIVATE -DVERSION_REVISION="${SYNERGY_GIT_COMMIT}")
|
2017-02-07 01:35:07 +00:00
|
|
|
|
|
|
|
if (WIN32)
|
2017-02-08 12:40:34 +00:00
|
|
|
target_link_libraries (synergy ${DNSSD_LIB})
|
|
|
|
set_target_properties (synergy PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT")
|
2017-02-07 01:35:07 +00:00
|
|
|
endif()
|
2017-03-07 14:10:24 +00:00
|
|
|
|
|
|
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|
|
|
install (TARGETS synergy DESTINATION ${SYNERGY_BUNDLE_BINARY_DIR})
|
|
|
|
endif()
|