$NetBSD: patch-gerbview_CMakeLists.txt,v 1.5 2023/02/13 07:59:01 tnn Exp $

Force proper LDFLAGS for MODULE, as cmake doesn't set rpath for these

--- gerbview/CMakeLists.txt.orig	2023-02-11 21:35:58.397373228 +0000
+++ gerbview/CMakeLists.txt
@@ -169,6 +169,9 @@ if( MAKE_LINK_MAPS )
         LINK_FLAGS "-Wl,-cref,-Map=_gerbview.kiface.map" )
 endif()
 
+set_property(TARGET gerbview_kiface APPEND_STRING
+	PROPERTY LINK_FLAGS " $ENV{LDFLAGS}")
+
 # if building gerbview, then also build gerbview_kiface if out of date.
 add_dependencies( gerbview gerbview_kiface )
 
