forked from elfmz/far2l
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
454 lines (378 loc) · 17.1 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
cmake_minimum_required (VERSION 3.5)
project (far2m)
set(APP_NAME "far2m")
set(APP_IDENTIFIER "com.far2m")
set(CPACK_PACKAGE_NAME "far2m")
string(ASCII 27 Esc)
set(ColorNormal "${Esc}[m")
set(ColorRed "${Esc}[1;31m")
include(GNUInstallDirs)
# just to force reconfigure if packaging/version changed
configure_file(${CMAKE_SOURCE_DIR}/packaging/version ${CMAKE_BINARY_DIR}/packaging/version @ONLY)
# reconfigure in case .git directory changed to update version correctly
IF(EXISTS ${CMAKE_SOURCE_DIR}/.git)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/.git)
endif()
file(READ "${CMAKE_SOURCE_DIR}/packaging/version" VERSION)
string(REGEX REPLACE "[\r\n\t ]$" "" VERSION "${VERSION}")
string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" VERSION_MAJOR "${VERSION}")
string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${VERSION}")
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.(.*)" "\\1" VERSION_PATCH "${VERSION}")
if("${VERSION_MAJOR}" STREQUAL "" OR "${VERSION_MAJOR}" STREQUAL "${VERSION}"
OR "${VERSION_MINOR}" STREQUAL "" OR "${VERSION_MINOR}" STREQUAL "${VERSION}"
OR "${VERSION_PATCH}" STREQUAL "" OR "${VERSION_PATCH}" STREQUAL "${VERSION}")
message(FATAL_ERROR "${ColorRed}packaging/version is corrupted, please write actual X.Y.Z version into it.${ColorNormal}")
endif()
find_package(Git)
if(GIT_FOUND)
execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tag
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(NOT "${GIT_TAG}" STREQUAL "v_${VERSION}")
if(GIT_FOUND)
if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git)
execute_process(COMMAND "${GIT_EXECUTABLE}" show --no-patch --format=%ci HEAD
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT "${GIT_DATE}" STREQUAL "")
string(SUBSTRING ${GIT_DATE} 0 10 GIT_DATE)
message(STATUS "git date: ${GIT_DATE}")
set(VERSION_PATCH "${VERSION_PATCH}-${GIT_DATE}")
endif()
execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse --short HEAD
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
endif()
if(NOT "${GIT_HASH}" STREQUAL "")
message(STATUS "git hash: ${GIT_HASH}")
set(VERSION_PATCH "${VERSION_PATCH}-${GIT_HASH}")
else()
message(WARNING "git information unavailable, assuming its a build from v_${VERSION}")
endif()
endif()
set(VERSION_PATCH "${VERSION_PATCH}-beta")
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE} Version: ${VERSION}")
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_INSTALL_PREFIX "/usr/local")
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
set(CMAKE_INSTALL_PREFIX "/usr/local")
else()
set(CMAKE_INSTALL_PREFIX "/usr")
endif()
endif()
##############################
if (NOT DEFINED TESTING)
set(TESTING "NO")
endif()
if (NOT DEFINED USEWX)
set(USEWX "YES")
endif()
if (NOT DEFINED USELUA)
set(USELUA "YES")
endif()
if (NOT DEFINED UNRAR)
set(UNRAR "bundled")
endif()
# EACP disabled by default for now as FAR's GetCodePageInfo rejects all multibyte charsets due to BUGBUG.
# Uncomment EACP-stuff here when that will be fixed. See https://github.com/elfmz/far2l/issues/1179
#if (NOT DEFINED EACP)
# set(EACP "YES")
#endif()
if (NOT DEFINED LEGACY)
# TODO: default it to NO somewhere in 2022, after all obsolete settings
# registry-upgrade-to-ini stuff will be safe to remove
set(LEGACY "YES")
endif()
#if (NOT EACP)
# message(STATUS "${ColorRed}Building without East Asian codepages support due to EACP=${EACP}${ColorNormal}")
#endif()
# set(RM rm) actually not needed: use $(CMAKE_COMMAND) -E remove
if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
set(M4_NAME gm4)
else()
set(M4_NAME m4)
endif()
find_program(M4_PROG NAMES ${M4_NAME})
if(NOT M4_PROG)
message(FATAL_ERROR "${ColorRed}${M4_NAME} not found - please install it${ColorNormal}")
endif ()
set(M4 ${M4_PROG} -P "-DARCH=${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR}" "-DMAJOR=${VERSION_MAJOR}" "-DMINOR=${VERSION_MINOR}" "-DPATCH=${VERSION_PATCH}")
# set(RM rm) actually not needed: use $(CMAKE_COMMAND) -E remove
find_program (GAWK NAMES gawk)
if(NOT GAWK)
message(FATAL_ERROR "${ColorRed}gawk not found - please install it${ColorNormal}")
endif ()
if("${ICU_MODE}" STREQUAL "runtime")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRUNTIME_ICU")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DRUNTIME_ICU")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC -Wno-unused-function -D_FILE_OFFSET_BITS=64") # -fsanitize=address
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=c99 -fPIC -Wno-unused-function -D_FILE_OFFSET_BITS=64") # -fsanitize=address
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
set(CMAKE_C_FLAGS_RELEASE "-O2")
set(TOOLS_DIR ${CMAKE_BINARY_DIR}/tools)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(APP_DIR ${CMAKE_BINARY_DIR}/install)
set(INSTALL_DIR ${APP_DIR}/${APP_NAME}.app/Contents/MacOS)
set(EXECUTABLE_NAME ${APP_NAME})
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffunction-sections -fdata-sections")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")
set(INSTALL_DIR ${CMAKE_BINARY_DIR}/install)
set(EXECUTABLE_NAME far2m)
if (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--gc-sections")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,--gc-sections")
endif()
endif()
if (CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=600")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=600")
message(STATUS "Running under cygwin, wow!")
endif()
if (CMAKE_SYSTEM_NAME MATCHES "Haiku")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE -D_DEFAULT_SOURCE -Wno-attributes")
endif()
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_C_VISIBILITY_PRESET hidden)
if (LEGACY)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWINPORT_REGISTRY")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWINPORT_REGISTRY")
message(STATUS "Enabling registry support due to enabled LEGACY")
else()
message(STATUS "LEGACY is not enabled, your old registry settings will be forgotten, if any")
endif()
if(CMAKE_VERSION VERSION_GREATER "3.3")
cmake_policy(SET CMP0063 NEW)
cmake_policy(SET CMP0057 NEW)
endif()
include_directories(utils/include)
add_subdirectory (farlng)
add_subdirectory (WinPort)
add_subdirectory (utils)
add_subdirectory (far)
add_dependencies (far2m farlng)
set_target_properties(farlng
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${TOOLS_DIR}"
)
if (NOT ${USEWX})
message(STATUS "Building without GUI/wxWidgets backend due to USEWX=${USEWX}")
else()
message(STATUS "Building with GUI/wxWidgets backend")
if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
if (DEFINED wxWidgets_CONFIG_EXECUTABLE)
message(STATUS "Using pre-defined wx config: ${wxWidgets_CONFIG_EXECUTABLE}")
elseif(EXISTS "/usr/local/bin/wxgtk3u-3.2-config")
set(wxWidgets_CONFIG_EXECUTABLE "/usr/local/bin/wxgtk3u-3.2-config")
set(wxWidgets_wxrc_EXECUTABLE "/usr/local/bin/wxrc-gtk3u-3.2")
message(STATUS "Using known location of wx-config 3.2")
elseif(EXISTS "/usr/local/bin/wxgtk3u-3.1-config")
set(wxWidgets_CONFIG_EXECUTABLE "/usr/local/bin/wxgtk3u-3.1-config")
set(wxWidgets_wxrc_EXECUTABLE "/usr/local/bin/wxrc-gtk3u-3.1")
message(STATUS "Using known location of wx-config 3.1")
elseif (EXISTS "/usr/local/bin/wxgtk3u-3.0-config")
set(wxWidgets_CONFIG_EXECUTABLE "/usr/local/bin/wxgtk3u-3.0-config")
set(wxWidgets_wxrc_EXECUTABLE "/usr/local/bin/wxrc-gtk3u-3.0")
message(STATUS "Using known location of wx-config 3.0")
else()
message(STATUS "No wxgtk3u-3.*-config in expected locations")
endif()
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if (EXISTS "/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.2/bin/wx-config")
# MacPorts
set(wxWidgets_CONFIG_EXECUTABLE "/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.2/bin/wx-config")
set(wxWidgets_wxrc_EXECUTABLE "/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.2/bin/wxrc")
message(STATUS "Using known location of wx-config 3.2")
elseif (EXISTS "/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/bin/wx-config")
# MacPorts
set(wxWidgets_CONFIG_EXECUTABLE "/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/bin/wx-config")
set(wxWidgets_wxrc_EXECUTABLE "/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/bin/wxrc")
message(STATUS "Using known location of wx-config 3.1")
else()
message(STATUS "No wx-config in expected locations")
endif()
endif()
add_subdirectory(WinPort/src/Backend/WX)
endif()
if (NOT DEFINED TTYX)
find_package(X11)
if(X11_FOUND)
message(STATUS "Building with TTY X11 extensions due to X11 found")
add_subdirectory(WinPort/src/Backend/TTY/TTYX)
else()
message(STATUS "Building without TTY X11 extensions due to X11 not found")
endif()
elseif (TTYX)
message(STATUS "Building with TTY X11 extensions due to TTYX=${TTYX}")
add_subdirectory(WinPort/src/Backend/TTY/TTYX)
else()
message(STATUS "Building without TTY X11 extensions due to TTYX=${TTYX}")
endif()
##############################
# plugins directives
function(AddPlugin Name Suffix Active)
string(TOUPPER ${Name} Var)
if ((DEFINED ${Var} AND ${Var}) OR (NOT DEFINED ${Var} AND ${Active}))
message(STATUS "${Var} plugin enabled")
add_subdirectory (${Name})
else()
if (${Active})
message(STATUS "${ColorRed}${Var} plugin disabled due to ${Var}=${${Var}}${ColorNormal}")
else()
message(STATUS "${ColorRed}${Var} plugin disabled, use -D${Var}=yes if you need it${ColorNormal}")
endif()
install(CODE "
execute_process(COMMAND ${CMAKE_COMMAND} -E rm -f ${CMAKE_INSTALL_PREFIX}/lib/far2m/Plugins/${Name}/plug/${Name}.far-plug-${Suffix})
" COMPONENT system)
endif()
endfunction()
if (${USELUA})
find_package(LibLua REQUIRED)
find_package(LibUuid)
if (NOT LibUuid_FOUND)
message(STATUS "${ColorRed}Building without LibUuid due to it was not found${ColorNormal}")
endif()
message(STATUS "LUAFAR library enabled")
add_subdirectory (luafar)
AddPlugin (luamacro wide 1)
AddPlugin (hlfviewer wide 1)
else()
message(STATUS "${ColorRed}LuaFAR plugins disabled due to -DUSELUA=${USELUA}${ColorNormal}")
endif()
AddPlugin( align wide 1 )
AddPlugin( autowrap wide 1 )
AddPlugin( calc wide 1 )
AddPlugin( colorer wide 1 )
AddPlugin( compare wide 1 )
AddPlugin( drawline wide 1 )
AddPlugin( editcase wide 1 )
AddPlugin( editorcomp wide 1 )
AddPlugin( filecase wide 1 )
AddPlugin( incsrch wide 1 )
AddPlugin( inside mb 1 )
AddPlugin( netcfg wide 1 )
AddPlugin( SimpleIndent wide 1 )
AddPlugin( tmppanel wide 1 )
if (NOT DEFINED MULTIARC OR MULTIARC)
message(STATUS "MULTIARC plugin enabled")
find_package(PkgConfig REQUIRED)
pkg_search_module(LibArchive QUIET libarchive)
if(NOT LibArchive_FOUND)
# workaround for MacOS brew's/macports' libarchive
if(IS_DIRECTORY "/usr/local/opt/libarchive/include")
set(LibArchive_INCLUDE_DIR "/usr/local/opt/libarchive/include")
set(LibArchive_LIBRARY "/usr/local/opt/libarchive/lib/libarchive.dylib")
elseif(EXISTS "/opt/local/lib/libarchive.dylib")
set(LibArchive_LIBRARY "/opt/local/lib/libarchive.dylib")
endif()
find_package(LibArchive)
if(NOT LibArchive_FOUND)
message(WARNING "${ColorRed}libarchive not found, multiarc will have weaker archives support. Its recommended to install libarchive-dev and reconfigure far2m.${ColorNormal}")
endif()
endif()
add_subdirectory (multiarc)
else()
AddPlugin(multiarc mb 0)
endif()
if (NOT DEFINED NETROCKS OR NETROCKS)
message(STATUS "NETROCKS plugin enabled")
find_package(OpenSSL)
if(OPENSSL_FOUND)
message(STATUS "OpenSSL found -> enjoy FTPS support in NetRocks")
else()
message(WARNING "${ColorRed}OpenSSL not found, NetRocks will not have FTPS protocol support. Install libssl-dev if you want FTPS protocol available in NetRocks.${ColorNormal}")
endif(OPENSSL_FOUND)
find_package(LibSSH 0.5.0)
if(LIBSSH_FOUND)
message(STATUS "libssh found -> enjoy SFTP support in NetRocks")
else()
message(WARNING "${ColorRed}libssh not found, NetRocks will not have SFTP protocol support. Install libssh-dev if you want SFTP protocol available in NetRocks.${ColorNormal}")
endif(LIBSSH_FOUND)
find_package(Libsmbclient)
if(LIBSMBCLIENT_FOUND)
message(STATUS "libsmbclient found -> enjoy SMB support in NetRocks")
else()
message(WARNING "${ColorRed}libsmbclient not found, NetRocks will not have SMB protocol support. Install libsmbclient-dev if you want SMB protocol available in NetRocks.${ColorNormal}")
endif(LIBSMBCLIENT_FOUND)
find_package(LibNfs)
if(LIBNFS_FOUND)
message(STATUS "libnfs found -> enjoy NFS support in NetRocks")
else()
message(WARNING "${ColorRed}libnfs not found, NetRocks will not have NFS protocol support. Install libnfs-dev if you want NFS protocol available in NetRocks.${ColorNormal}")
endif(LIBNFS_FOUND)
find_package(LibNEON)
if(LIBNEON_FOUND)
message(STATUS "libneon found -> enjoy WebDav support in NetRocks")
else()
message(WARNING "${ColorRed}libneon not found, NetRocks will not have WebDav protocol support. Install libneon*-dev if you want WebDav protocol available in NetRocks.${ColorNormal}")
endif(LIBNEON_FOUND)
add_subdirectory (NetRocks)
else()
AddPlugin(NetRocks wide 0)
endif()
if (DEFINED PYTHON AND PYTHON)
message(STATUS "PYTHON plugin with interpreter from virtualenv enabled")
add_subdirectory (python)
# Copy this explicitly cuz generic copier command excludes 'far2l'
install(DIRECTORY "${INSTALL_DIR}/Plugins/python/plug/far2l"
DESTINATION "lib/far2m/Plugins/python/plug/" USE_SOURCE_PERMISSIONS
COMPONENT base FILES_MATCHING
PATTERN "*")
install(DIRECTORY "${INSTALL_DIR}/Plugins/python/plug/plugins"
DESTINATION "lib/far2m/Plugins/python/plug/" USE_SOURCE_PERMISSIONS
COMPONENT base FILES_MATCHING
PATTERN "*")
else()
AddPlugin(python wide 0)
endif()
##############################
# common install directives
add_subdirectory (packaging)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(FIXUP_SCRIPT packaging/osx/FixupBundle.cmake)
configure_file(${FIXUP_SCRIPT} ${PROJECT_BINARY_DIR}/${FIXUP_SCRIPT} @ONLY)
install(DIRECTORY ${APP_DIR}/${APP_NAME}.app DESTINATION . USE_SOURCE_PERMISSIONS COMPONENT app EXCLUDE_FROM_ALL)
install(SCRIPT ${PROJECT_BINARY_DIR}/${FIXUP_SCRIPT} COMPONENT app EXCLUDE_FROM_ALL)
endif()
install(PROGRAMS "${INSTALL_DIR}/${EXECUTABLE_NAME}" DESTINATION "bin" RENAME far2m COMPONENT base)
install(DIRECTORY "${INSTALL_DIR}/" DESTINATION "lib/far2m" USE_SOURCE_PERMISSIONS COMPONENT base FILES_MATCHING
PATTERN "colorer/base" EXCLUDE
PATTERN "far2m_gui.so"
PATTERN "far2m_ttyx.broker"
PATTERN "plug/*.far-plug-*"
PATTERN "plug/*.broker"
PATTERN "luafar/luafar.so"
PATTERN "Manuals" EXCLUDE
PATTERN "lua_share" EXCLUDE)
install(DIRECTORY "${INSTALL_DIR}/" DESTINATION "share/far2m" USE_SOURCE_PERMISSIONS COMPONENT base FILES_MATCHING
PATTERN "${EXECUTABLE_NAME}" EXCLUDE
PATTERN "far2medit" EXCLUDE
PATTERN "far2m_*" EXCLUDE
PATTERN "*.far-plug-*" EXCLUDE
PATTERN "*.broker" EXCLUDE
PATTERN "python/plug/python" EXCLUDE
PATTERN "luafar/luafar.so" EXCLUDE
PATTERN "lua_share/far2/test" EXCLUDE
PATTERN "*")
# setup some symlinks
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../../bin/far2m ${PROJECT_BINARY_DIR}/far/far2m_askpass)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../../bin/far2m ${PROJECT_BINARY_DIR}/far/far2m_sudoapp)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink far2m ${PROJECT_BINARY_DIR}/far/far2medit)
install(FILES "${PROJECT_BINARY_DIR}/far/far2m_askpass" DESTINATION "lib/far2m" COMPONENT system)
install(FILES "${PROJECT_BINARY_DIR}/far/far2m_sudoapp" DESTINATION "lib/far2m" COMPONENT system)
install(FILES "${PROJECT_BINARY_DIR}/far/far2medit" DESTINATION "bin" COMPONENT base)