$NetBSD: patch-cvpcb_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

--- cvpcb/CMakeLists.txt.orig	2018-07-13 19:53:52.000000000 +0000
+++ cvpcb/CMakeLists.txt
@@ -74,7 +74,7 @@ endif()
 
 
 if( false ) # no CVPCB exe any more, only the *.kiface
-    add_executable( cvpcb WIN32 MACOSX_BUNDLE
+    add_executable( cvpcb WIN32 
         ../common/single_top.cpp
         ../common/pgm_base.cpp
         ${CVPCB_RESOURCES}
@@ -174,6 +174,9 @@ if( MAKE_LINK_MAPS )
         LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_cvpcb.kiface.map" )
 endif()
 
+set_property(TARGET cvpcb_kiface APPEND_STRING
+	PROPERTY LINK_FLAGS " $ENV{LDFLAGS}")
+
 # these 2 binaries are a matched set, keep them together:
 if( APPLE )
     # puts binaries into the *.app bundle while linking
