Skip to content

Commit

Permalink
Remove install path config (use -Dprefix=/usr instead)
Browse files Browse the repository at this point in the history
  • Loading branch information
anoopmsivadas committed Jul 16, 2024
1 parent 7a3ceaf commit 496c25d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
2 changes: 1 addition & 1 deletion icons/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
install_subdir(
['48x48'],
install_dir: data_dir + '/icons/hicolor',
install_dir: get_option('datadir') + '/icons/hicolor',
)
24 changes: 1 addition & 23 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,6 @@ fcitx5_core_dep = dependency('Fcitx5Core')
fcitx5_module_dep = dependency('Fcitx5Module', components: ['Punctuation'])
varnam_dep = dependency('govarnam')

# fcitx5 install paths
# ---------------------
# The default fcitx5 addon lib install path depends on CMAKE_INSTALL_FULL_LIBDIR variable.
# Since it is not possible to directly access this value, we have to check the directories and
# set the install path.
if (
fs.exists('/usr/lib/x86_64-linux-gnu/cmake/Fcitx5Utils/Fcitx5CompilerSettings.cmake')
)
# Debian based distros
lib_dir = '/usr/lib/x86_64-linux-gnu'
elif (fs.exists('/usr/lib/cmake/Fcitx5Utils/Fcitx5CompilerSettings.cmake'))
# Arch
lib_dir = '/usr/lib'
elif (fs.exists('/usr/lib64/cmake/Fcitx5Utils/Fcitx5CompilerSettings.cmake'))
# Fedora
lib_dir = '/usr/lib64'
else
lib_dir = get_option('libdir')
endif

data_dir = get_option('datadir')

if get_option('varnam_debug')
add_global_arguments('-DDEBUG_MODE', language: 'cpp')
endif
Expand All @@ -53,5 +31,5 @@ subdir('icons')
install_data(
'com.varnamproject.Fcitx5.Addon.varnamfcitx.metainfo.xml.in',
rename: 'com.varnamproject.Fcitx5.Addon.varnamfcitx.metainfo.xml',
install_dir: data_dir + '/metainfo',
install_dir: get_option('datadir') + '/metainfo',
)
6 changes: 3 additions & 3 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ shared_library(
varnam_fcitx_sources,
dependencies: [fcitx5_core_dep, fcitx5_module_dep, varnam_dep],
install: true,
install_dir: lib_dir + '/fcitx5',
install_dir: get_option('libdir') + '/fcitx5',
)

# Input Method registration file
install_data(
'varnamfcitx.conf',
install_dir: data_dir + '/fcitx5/inputmethod',
install_dir: get_option('datadir') +'/fcitx5/inputmethod',
)

# Addon config file
configure_file(
configuration: config_data,
input: 'varnamfcitx-addon.conf.in',
output: 'varnamfcitx.conf',
install_dir: data_dir + '/fcitx5/addon',
install_dir: get_option('datadir') + '/fcitx5/addon',
)

0 comments on commit 496c25d

Please sign in to comment.