-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
83 lines (67 loc) · 2.26 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
cmake_minimum_required(VERSION 3.2)
project(WhatsQt VERSION 0.2.4)
if(MSVC)
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_definitions("-Wall")
endif()
if(CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES Debug Release)
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING
"Reset the configurations to what we need"
FORCE)
endif()
add_definitions(-DAPP_VERSION="${PROJECT_VERSION}")
set(SOURCE_FILES
notification/notificationservice.cpp
notification/nullnotificationservice.cpp
notification/TrayNotificationService.cpp
view/webpage.cpp
view/webview.cpp
dialog/AboutDialog.cpp
dialog/PreferencesDialog.cpp
util/Preferences.cpp
main.cpp
mainwindow.cpp
resources.qrc
)
if(APPLE)
include(cmake/osx.cmake)
elseif(UNIX)
include(cmake/linux.cmake)
elseif(WIN32)
include(cmake/windows.cmake)
endif()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt5Widgets)
find_package(Qt5WebEngineWidgets)
find_package(Qt5WebChannel)
add_executable(WhatsQt MACOSX_BUNDLE ${SOURCE_FILES})
target_link_libraries(WhatsQt ${LIBS})
qt5_use_modules(WhatsQt Widgets WebEngineWidgets WebChannel ${ADDITIONAL_QT_MODULES})
if(APPLE)
set_target_properties(WhatsQt PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in)
include(cmake/osx.install.cmake)
elseif(UNIX)
include(cmake/linux.install.cmake)
elseif(WIN32)
include(cmake/windows.install.cmake)
endif()
set(CPACK_PACKAGE_NAME WhatsQt)
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME})
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "WhatsQt is bringing WhatsApp Web natively to OS X, Linux and Windows.")
set(CPACK_PACKAGE_CONTACT mjahnen)
set(CPACK_PACKAGE_VENDOR mjahnen)
include(cmake/gitcommitid.cmake)
# Configure file with build deployment data for travis
configure_file(travis/bintray.json.in ${CMAKE_BINARY_DIR}/bintray.json)
include(CPack)