$NetBSD: patch-pagelayout_editor_CMakeLists.txt,v 1.3 2019/06/14 15:59:32 bouyer Exp $

Force proper LDFLAGS for MODULE, as cmake doens't set rpath for theses

--- pagelayout_editor/CMakeLists.txt.orig	2018-07-13 19:53:52.000000000 +0000
+++ pagelayout_editor/CMakeLists.txt
@@ -68,7 +68,7 @@ if( APPLE )
 endif()
 
 # a very small program launcher for pl_editor_kiface
-add_executable( pl_editor WIN32 MACOSX_BUNDLE
+add_executable( pl_editor WIN32 
     ../common/single_top.cpp
     ../common/pgm_base.cpp
     ${PL_EDITOR_RESOURCES}
@@ -120,6 +120,9 @@ if( MAKE_LINK_MAPS )
         LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pl_editor.kiface.map" )
 endif()
 
+set_property(TARGET pl_editor_kiface APPEND_STRING
+	PROPERTY LINK_FLAGS " $ENV{LDFLAGS}")
+
 # if building pl_editor, then also build pl_editor_kiface if out of date.
 add_dependencies( pl_editor pl_editor_kiface )
 
