$NetBSD: patch-gerbview_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 --- gerbview/CMakeLists.txt.orig 2018-07-13 19:53:52.000000000 +0000 +++ gerbview/CMakeLists.txt @@ -106,7 +106,7 @@ if( APPLE ) set( MACOSX_BUNDLE_NAME gerbview ) endif() -add_executable( gerbview WIN32 MACOSX_BUNDLE +add_executable( gerbview WIN32 ../common/single_top.cpp ../common/pgm_base.cpp ${GERBVIEW_RESOURCES} @@ -158,6 +158,9 @@ if( MAKE_LINK_MAPS ) LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-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 )