summary refs log tree commit diff stats
path: root/src/fe-gtk/meson.build
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2021-05-27 20:39:07 -0300
committerSoniEx2 <endermoneymod@gmail.com>2021-05-27 20:39:07 -0300
commit5571d277b93b62c73568b78c652c85b2e8e95183 (patch)
tree0d97d65058e31ccdeab4006384442a8e378d5f06 /src/fe-gtk/meson.build
parentf58165fd33919951e2ca594c6f19a785420fc4f9 (diff)
parent7f8b0a19cff46f7d27451fb9942eea5018f0c5b5 (diff)
Merge upstream changes
Diffstat (limited to 'src/fe-gtk/meson.build')
-rw-r--r--src/fe-gtk/meson.build13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/fe-gtk/meson.build b/src/fe-gtk/meson.build
index f11580bb..3dfc7427 100644
--- a/src/fe-gtk/meson.build
+++ b/src/fe-gtk/meson.build
@@ -39,13 +39,9 @@ if gtk_dep.get_pkgconfig_variable('target') == 'x11'
   hexchat_gtk_deps += dependency('x11')
 endif
 
-hexchat_gtk_cflags = [
-  '-fPIE'
-]
+hexchat_gtk_cflags = []
 
-hexchat_gtk_ldflags = [
-  '-pie'
-]
+hexchat_gtk_ldflags = []
 
 if get_option('with-libnotify')
   hexchat_gtk_sources += 'notifications/notification-libnotify.c'
@@ -84,11 +80,16 @@ resources = gnome.compile_resources('resources',
   extra_args: ['--manual-register']
 )
 
+if host_machine.system() == 'windows'
+  hexchat_gtk_ldflags += '-Wl,-e,mainCRTStartup'
+endif
+
 executable('hexchat',
   sources:  resources + hexchat_gtk_sources,
   dependencies: hexchat_gtk_deps,
   c_args: hexchat_gtk_cflags,
   link_args: hexchat_gtk_ldflags,
+  pie: true,
   install: true,
   gui_app: true,
 )