gplugin/gplugin
Clone
Summary
Browse
Changes
Graph
Fix man pages generated with meson.
feature/meson
2016-09-26, Elliott Sales de Andrade
bb6e861b1101
Fix man pages generated with meson.
###############################################################################
# Project Info
###############################################################################
project
(
'gplugin'
,
'c'
,
meson_version
:
'>0.34.0'
,
default_options
:
[
'c_std=c99'
])
GPLUGIN_MAJOR_VERSION
=
0
GPLUGIN_MINOR_VERSION
=
25
GPLUGIN_MICRO_VERSION
=
0
GPLUGIN_EXTRA_VERSION
=
''
GPLUGIN_VERSION
=
'@0@.@1@.@2@@3@'
.
format
(
GPLUGIN_MAJOR_VERSION
,
GPLUGIN_MINOR_VERSION
,
GPLUGIN_MICRO_VERSION
,
GPLUGIN_EXTRA_VERSION
)
version_conf
=
configuration_data
()
version_conf
.
set
(
'GPLUGIN_MAJOR_VERSION'
,
GPLUGIN_MAJOR_VERSION
)
version_conf
.
set
(
'GPLUGIN_MINOR_VERSION'
,
GPLUGIN_MINOR_VERSION
)
version_conf
.
set
(
'GPLUGIN_MICRO_VERSION'
,
GPLUGIN_MICRO_VERSION
)
version_conf
.
set
(
'GPLUGIN_EXTRA_VERSION'
,
GPLUGIN_EXTRA_VERSION
)
version_conf
.
set
(
'GPLUGIN_VERSION'
,
GPLUGIN_VERSION
)
LOCALE_DIR
=
get_option
(
'prefix'
)
+
'/locale'
add_global_arguments
(
'-DLOCALEDIR="@0@"'
.
format
(
LOCALE_DIR
),
language
:
'c'
)
###############################################################################
# Dependencies
###############################################################################
if
get_option
(
'help2man'
)
help2man
=
find_program
(
'help2man'
)
endif
GLIB
=
dependency
(
'glib-2.0'
,
version
:
'>=2.32.0'
)
GOBJECT
=
dependency
(
'gobject-2.0'
)
# we separate gmodule out so our test aren't linked to it
GMODULE
=
dependency
(
'gmodule-2.0'
)
gnome
=
import
(
'gnome'
)
if
get_option
(
'testing'
)
GTESTER
=
find_program
(
'gtester'
)
XSLTPROC
=
find_program
(
'xsltproc'
)
endif
###############################################################################
# NLS
###############################################################################
GETTEXT_PACKAGE
=
'gplugin'
add_global_arguments
(
'-DGETTEXT_PACKAGE="@0@"'
.
format
(
GETTEXT_PACKAGE
),
language
:
'c'
)
if
get_option
(
'nls'
)
i18n
=
import
(
'i18n'
)
endif
###############################################################################
# Build Info
###############################################################################
compiler
=
meson
.
get_compiler
(
'c'
)
add_global_arguments
(
'-DPREFIX="@0@"'
.
format
(
get_option
(
'prefix'
)),
'-DLIBDIR="@0@"'
.
format
(
get_option
(
'libdir'
)),
'-DGPLUGIN_WEBSITE="http://bitbucket.org/gplugin/main"'
,
language
:
'c'
)
if
compiler
.
has_argument
(
'-Wformat'
)
add_global_arguments
(
'-Wformat'
,
language
:
'c'
)
if
compiler
.
compiles
(
'int i;\n'
,
name
:
'-Werror=format-security'
,
args
:
[
'-Wformat'
,
'-Werror=format-security'
])
add_global_arguments
(
'-Werror=format-security'
,
language
:
'c'
)
endif
endif
# check if we're using gcc
if
compiler
.
get_id
()
==
'gcc'
add_global_arguments
(
'-DGPLUGIN_UNUSED=__attribute__((unused))'
,
'-ggdb'
,
language
:
'c'
)
else
add_global_arguments
(
'-DGPLUGIN_UNUSED='
,
language
:
'c'
)
endif
toplevel_inc
=
include_directories
(
'.'
)
###############################################################################
# Subdirectories
###############################################################################
subdir
(
'gplugin'
)
subdir
(
'gplugin-gtk'
)
subdir
(
'plugins'
)
subdir
(
'po'
)
subdir
(
'lua'
)
subdir
(
'perl'
)
subdir
(
'python'
)
###############################################################################
# Install stuff
###############################################################################
# documentation
install_data
(
'ChangeLog'
,
'INSTALL'
,
'README'
,
'HACKING'
,
install_dir
:
get_option
(
'datadir'
))
###############################################################################
# make dist
###############################################################################
#set(ARCHIVES
# gplugin-${GPLUGIN_VERSION}.tar.bz2
# gplugin-${GPLUGIN_VERSION}.tar.gz
# gplugin-${GPLUGIN_VERSION}.zip
#)
#set(SIGNATURES)
#foreach(ARCHIVE ${ARCHIVES})
# add_custom_command(
# COMMAND hg archive ${ARCHIVE}
# OUTPUT ${ARCHIVE}
# DEPENDS .
# WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
# )
#
# add_custom_command(
# COMMAND gpg --yes -abs ${ARCHIVE}
# OUTPUT ${ARCHIVE}.asc
# DEPENDS . ${ARCHIVE}
# WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
# )
#
# list(APPEND SIGNATURES ${ARCHIVE}.asc)
#endforeach(ARCHIVE)
#
#add_custom_target(dist DEPENDS ${ARCHIVES} ${SIGNATURES})