[gtk-doc/wip/tintou/cmake-find-exec] cmake: do not hardcode the executable path
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc/wip/tintou/cmake-find-exec] cmake: do not hardcode the executable path
- Date: Fri, 5 Oct 2018 10:10:42 +0000 (UTC)
commit b234be9331ae73d414ce6ba214094fe513929170
Author: Corentin Noël <corentin elementary io>
Date: Fri Oct 5 12:09:19 2018 +0200
cmake: do not hardcode the executable path
This allows to use the environment variables to specify the wanted executables
.../cmake/{GtkDocConfig.cmake.in => GtkDocConfig.cmake} | 10 +++++-----
buildsystems/cmake/Makefile.am | 10 +---------
buildsystems/cmake/meson.build | 15 ++-------------
configure.ac | 1 -
4 files changed, 8 insertions(+), 28 deletions(-)
---
diff --git a/buildsystems/cmake/GtkDocConfig.cmake.in b/buildsystems/cmake/GtkDocConfig.cmake
similarity index 98%
rename from buildsystems/cmake/GtkDocConfig.cmake.in
rename to buildsystems/cmake/GtkDocConfig.cmake
index 9d41696..23f7984 100644
--- a/buildsystems/cmake/GtkDocConfig.cmake.in
+++ b/buildsystems/cmake/GtkDocConfig.cmake
@@ -36,11 +36,11 @@ include(CMakeParseArguments)
set(GTKDOC_FOUND 1)
-set(GTKDOC_SCAN_EXE @bindir@/gtkdoc-scan)
-set(GTKDOC_SCANGOBJ_EXE @bindir@/gtkdoc-scangobj)
-set(GTKDOC_MKDB_EXE @bindir@/gtkdoc-mkdb)
-set(GTKDOC_MKHTML_EXE @bindir@/gtkdoc-mkhtml)
-set(GTKDOC_FIXXREF_EXE @bindir@/gtkdoc-fixxref)
+find_program(GTKDOC_SCAN_EXE gtkdoc-scan)
+find_program(GTKDOC_SCANGOBJ_EXE gtkdoc-scangobj)
+find_program(GTKDOC_MKDB_EXE gtkdoc-mkdb)
+find_program(GTKDOC_MKHTML_EXE gtkdoc-mkhtml)
+find_program(GTKDOC_FIXXREF_EXE gtkdoc-fixxref)
get_filename_component(_this_dir ${CMAKE_CURRENT_LIST_FILE} PATH)
find_file(GTKDOC_SCANGOBJ_WRAPPER GtkDocScanGObjWrapper.cmake PATH ${_this_dir})
diff --git a/buildsystems/cmake/Makefile.am b/buildsystems/cmake/Makefile.am
index d4f43b8..cdccd53 100644
--- a/buildsystems/cmake/Makefile.am
+++ b/buildsystems/cmake/Makefile.am
@@ -1,19 +1,11 @@
EXTRA_DIST = \
- GtkDocConfig.cmake.in \
+ GtkDocConfig.cmake \
GtkDocConfigVersion.cmake.in \
GtkDocScanGObjWrapper.cmake
CLEANFILES = \
- GtkDocConfig.cmake \
GtkDocConfigVersion.cmake
-# Generate this here rather than via configure.ac so that
-# bindir is substituted as an expanded path rather than
-# using ${exec_prefix} as it would if substituted via
-# configure.ac.
-GtkDocConfig.cmake: GtkDocConfig.cmake.in
- $(SED) -e 's|[@]bindir@|$(bindir)|g' < "$<" > "$@"
-
cmakedir = $(libdir)/cmake/GtkDoc
cmake_DATA = \
GtkDocConfig.cmake \
diff --git a/buildsystems/cmake/meson.build b/buildsystems/cmake/meson.build
index b5efe28..2ba7545 100644
--- a/buildsystems/cmake/meson.build
+++ b/buildsystems/cmake/meson.build
@@ -1,17 +1,5 @@
cmake_in = configuration_data()
cmake_in.set('PACKAGE_VERSION', version)
-cmake_in.set('bindir', bindir)
-
-configure_file(
- input: 'GtkDocConfig.cmake.in',
- output: 'GtkDocConfig.cmake',
- configuration: cmake_in,
- install: true,
- install_dir: join_paths(
- cmakedatadir,
- 'GtkDoc',
- )
-)
configure_file(
input: 'GtkDocConfigVersion.cmake.in',
@@ -25,6 +13,7 @@ configure_file(
)
gtkdoc_cmake_data = [
+ 'GtkDocConfig.cmake',
'GtkDocScanGObjWrapper.cmake',
]
@@ -34,4 +23,4 @@ install_data(
cmakedatadir,
'GtkDoc',
)
-)
\ No newline at end of file
+)
diff --git a/configure.ac b/configure.ac
index eee1b50..1503ca4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -210,7 +210,6 @@ if test "x$have_yelp_tools" != "xyes"; then
fi
AM_CONDITIONAL([HAVE_YELP_TOOLS],[test x$have_yelp_tools = xyes])
-# buildsystems/cmake/GtkDocConfig.cmake is handled in the Makefile, not here.
AC_CONFIG_FILES([Makefile
gtk-doc.pc
buildsystems/autotools/Makefile
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]