-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathCMakeLists.txt
121 lines (93 loc) · 3.95 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Copyright (C) 2015 Alexander Lamaison <[email protected]>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
# Street, Fifth Floor, Boston, MA 02110-1301 USA.
cmake_minimum_required(VERSION 3.1)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
# Package management ###########################################################
include(HunterGate)
HunterGate(
URL "https://github.com/alamaison/hunter/archive/ee83a15960b5d74098d8704bc9cf82ad8ec1734f.tar.gz"
SHA1 "d02301fee68f00198e7941129da446f80189017e"
LOCAL
)
################################################################################
project(swish VERSION 0.8.3)
set(SWISH_FRIENDLY_NAME "Swish")
set(SWISH_VENDOR "swish-sftp.org")
set(SWISH_DESCRIPTION "Easy SFTP for Windows Explorer")
set(SWISH_COPYRIGHT "Copyright (C) 2006-2015 Alexander Lamaison and contributors")
#include(max_warnings)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/taskdialog98)
# Prevent Winsock errors and gives quicker builds
add_definitions(-DWIN32_LEAN_AND_MEAN)
# Silence bogus MSVC warnings
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
# Currently required because not all Win32 calls use A or W form explicitly
add_definitions(-DUNICODE -D_UNICODE)
hunter_add_package(Boost
COMPONENTS filesystem system test date_time regex signals locale)
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.49 REQUIRED
COMPONENTS filesystem date_time system regex signals thread locale)
if(MSVC)
add_definitions(-DBOOST_ALL_NO_LIB=1)
endif()
include_directories(${Boost_INCLUDE_DIRS})
add_subdirectory(ezel)
add_subdirectory(ssh)
add_subdirectory(swish)
add_subdirectory(po)
option(BUILD_TESTING "Build test suite" ON)
if(BUILD_TESTING)
enable_testing()
add_subdirectory(test)
endif()
set(INSTALLER_URL
"https://sourceforge.net/projects/swish/files/swish/swish-${swish_VERSION}/swish-${swish_VERSION}.exe")
string(TIMESTAMP PUBLICATION_DATE UTC)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/appcast.xml.in
${CMAKE_CURRENT_BINARY_DIR}/appcast.xml
@ONLY)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/setup_conf.xml.in
${CMAKE_CURRENT_BINARY_DIR}/setup_conf.xml
@ONLY)
file(DOWNLOAD "http://the.earth.li/~sgtatham/putty/0.64/x86/pageant.exe"
"${CMAKE_CURRENT_BINARY_DIR}/pageant.exe"
SHOW_PROGRESS
EXPECTED_HASH SHA1=4f7ec7e53b7dd557603c2447fd177d85f14006ad)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/pageant.exe" NEWS LICENSE.txt README.md
DESTINATION .)
include(InstallRequiredSystemLibraries)
set(CPACK_GENERATOR WIX)
set(CPACK_PACKAGE_NAME "${SWISH_FRIENDLY_NAME}")
set(CPACK_PACKAGE_VENDOR "${SWISH_VENDOR}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${SWISH_DESCRIPTION}")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_WIX_UPGRADE_GUID "97CF376F-FFDE-472A-946B-E3F5D45229DA")
set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cpack_wix_patch.xml")
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${SWISH_FRIENDLY_NAME}")
set(CMAKE_WIX_PROPERTY_ARPCONTACT [email protected])
set(CMAKE_WIX_PROPERTY_ARPHELPLINK http://www.swish-sftp.org)
set(CMAKE_WIX_PROPERTY_ARPURLINFOABOUT http://www.swish-sftp.org)
set(CMAKE_WIX_PROPERTY_ARPURLUPDATEINFO http://sourceforge.net/projects/swish/)
#set(CPACK_WIX_UI_REF WixUI_Minimal)
include(CPack)