build: Move and rename demo_conf.h header
We want to use the same header in the inspector, so move it to the toplevel. And since it is no longer for demos only, rename it to profile_conf.h, and also rename the build option back to profile.
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
#include "demos.h"
|
#include "demos.h"
|
||||||
#include "fontify.h"
|
#include "fontify.h"
|
||||||
|
|
||||||
#include "demo_conf.h"
|
#include "profile_conf.h"
|
||||||
|
|
||||||
static GtkWidget *info_view;
|
static GtkWidget *info_view;
|
||||||
static GtkWidget *source_view;
|
static GtkWidget *source_view;
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ foreach flag: common_cflags
|
|||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
gtkdemo_deps += [ demo_conf_h ]
|
gtkdemo_deps += [ profile_conf_h ]
|
||||||
|
|
||||||
executable('gtk4-demo',
|
executable('gtk4-demo',
|
||||||
sources: [demos, demos_h, extra_demo_sources, gtkdemo_resources],
|
sources: [demos, demos_h, extra_demo_sources, gtkdemo_resources],
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "iconbrowserapp.h"
|
#include "iconbrowserapp.h"
|
||||||
#include "iconbrowserwin.h"
|
#include "iconbrowserwin.h"
|
||||||
|
|
||||||
#include "demo_conf.h"
|
#include "profile_conf.h"
|
||||||
|
|
||||||
struct _IconBrowserApp
|
struct _IconBrowserApp
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ iconbrowser_resources = gnome.compile_resources('iconbrowser_resources',
|
|||||||
executable('gtk4-icon-browser',
|
executable('gtk4-icon-browser',
|
||||||
sources: [iconbrowser_sources, iconbrowser_resources],
|
sources: [iconbrowser_sources, iconbrowser_resources],
|
||||||
c_args: common_cflags,
|
c_args: common_cflags,
|
||||||
dependencies: [ libgtk_dep, demo_conf_h ],
|
dependencies: [ libgtk_dep, profile_conf_h ],
|
||||||
include_directories: confinc,
|
include_directories: confinc,
|
||||||
win_subsystem: 'windows',
|
win_subsystem: 'windows',
|
||||||
link_args: extra_demo_ldflags,
|
link_args: extra_demo_ldflags,
|
||||||
|
|||||||
@@ -1,16 +1,3 @@
|
|||||||
gen_demo_header = find_program('../build-aux/meson/gen-demo-header.py')
|
|
||||||
demo_profile = get_option('demo-profile')
|
|
||||||
|
|
||||||
demo_conf_h = declare_dependency(
|
|
||||||
sources: custom_target('demo-header',
|
|
||||||
command: [gen_demo_header, meson.project_source_root(), demo_profile],
|
|
||||||
capture: true,
|
|
||||||
output: 'demo_conf.h',
|
|
||||||
build_by_default: true,
|
|
||||||
build_always_stale: true,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
# appdata
|
# appdata
|
||||||
|
|
||||||
appdata_config = configuration_data()
|
appdata_config = configuration_data()
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ node_editor_resources = gnome.compile_resources('node_editor_resources',
|
|||||||
|
|
||||||
executable('gtk4-node-editor',
|
executable('gtk4-node-editor',
|
||||||
sources: [node_editor_sources, node_editor_resources],
|
sources: [node_editor_sources, node_editor_resources],
|
||||||
dependencies: [ libgtk_dep, demo_conf_h ],
|
dependencies: [ libgtk_dep, profile_conf_h ],
|
||||||
include_directories: confinc,
|
include_directories: confinc,
|
||||||
c_args: common_cflags,
|
c_args: common_cflags,
|
||||||
win_subsystem: 'windows',
|
win_subsystem: 'windows',
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "node-editor-window.h"
|
#include "node-editor-window.h"
|
||||||
|
|
||||||
#include "demo_conf.h"
|
#include "profile_conf.h"
|
||||||
|
|
||||||
static const char *css =
|
static const char *css =
|
||||||
"textview.editor {"
|
"textview.editor {"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
executable('gtk4-print-editor',
|
executable('gtk4-print-editor',
|
||||||
sources: ['print-editor.c'],
|
sources: ['print-editor.c'],
|
||||||
c_args: common_cflags,
|
c_args: common_cflags,
|
||||||
dependencies: [ libgtk_dep, demo_conf_h ],
|
dependencies: [ libgtk_dep, profile_conf_h ],
|
||||||
include_directories: confinc,
|
include_directories: confinc,
|
||||||
win_subsystem: 'windows',
|
win_subsystem: 'windows',
|
||||||
link_args: extra_demo_ldflags,
|
link_args: extra_demo_ldflags,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include "demo_conf.h"
|
#include "profile_conf.h"
|
||||||
|
|
||||||
static GtkWidget *main_window;
|
static GtkWidget *main_window;
|
||||||
static GFile *filename = NULL;
|
static GFile *filename = NULL;
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ endif
|
|||||||
executable('gtk4-widget-factory',
|
executable('gtk4-widget-factory',
|
||||||
sources: ['widget-factory.c', widgetfactory_resources],
|
sources: ['widget-factory.c', widgetfactory_resources],
|
||||||
c_args: common_cflags,
|
c_args: common_cflags,
|
||||||
dependencies: [ libgtk_dep, demo_conf_h ],
|
dependencies: [ libgtk_dep, profile_conf_h ],
|
||||||
include_directories: confinc,
|
include_directories: confinc,
|
||||||
win_subsystem: 'windows',
|
win_subsystem: 'windows',
|
||||||
link_args: extra_demo_ldflags,
|
link_args: extra_demo_ldflags,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include "demo_conf.h"
|
#include "profile_conf.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
change_dark_state (GSimpleAction *action,
|
change_dark_state (GSimpleAction *action,
|
||||||
|
|||||||
@@ -1028,6 +1028,7 @@ gtk_deps = [
|
|||||||
epoxy_dep,
|
epoxy_dep,
|
||||||
libm,
|
libm,
|
||||||
graphene_dep,
|
graphene_dep,
|
||||||
|
profile_conf_h,
|
||||||
]
|
]
|
||||||
|
|
||||||
if x11_enabled
|
if x11_enabled
|
||||||
|
|||||||
12
meson.build
12
meson.build
@@ -785,6 +785,18 @@ project_build_root = meson.current_build_dir()
|
|||||||
|
|
||||||
gen_visibility_macros = find_program('build-aux/meson/gen-visibility-macros.py')
|
gen_visibility_macros = find_program('build-aux/meson/gen-visibility-macros.py')
|
||||||
|
|
||||||
|
gen_profile_conf = find_program('build-aux/meson/gen-profile-conf.py')
|
||||||
|
|
||||||
|
profile_conf_h = declare_dependency(
|
||||||
|
sources: custom_target('profile-conf',
|
||||||
|
command: [gen_profile_conf, meson.project_source_root(), get_option('profile')],
|
||||||
|
capture: true,
|
||||||
|
output: 'profile_conf.h',
|
||||||
|
build_by_default: true,
|
||||||
|
build_always_stale: true,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
subdir('gdk/version')
|
subdir('gdk/version')
|
||||||
subdir('gtk/css')
|
subdir('gtk/css')
|
||||||
subdir('gdk')
|
subdir('gdk')
|
||||||
|
|||||||
@@ -126,13 +126,13 @@ option('demo-profile',
|
|||||||
type: 'combo',
|
type: 'combo',
|
||||||
choices: [ 'default', 'devel' ],
|
choices: [ 'default', 'devel' ],
|
||||||
value: 'default',
|
value: 'default',
|
||||||
description : 'Profile to use for demos')
|
deprecated: 'profile')
|
||||||
|
|
||||||
option('profile',
|
option('profile',
|
||||||
type: 'combo',
|
type: 'combo',
|
||||||
choices: [ 'default', 'devel' ],
|
choices: [ 'default', 'devel' ],
|
||||||
value: 'default',
|
value: 'default',
|
||||||
deprecated: 'demo-profile')
|
description : 'Profile to use for demos')
|
||||||
|
|
||||||
option('build-demos',
|
option('build-demos',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
|
|||||||
Reference in New Issue
Block a user