On Sun, Mar 14, 2021 at 04:00:22PM -0600, Anthony J. Bentley wrote: > > Kevin Lo writes: > > On Sun, Mar 14, 2021 at 04:39:24AM -0600, Anthony J. Bentley wrote: > > > CONFIGURE_ARGS = -DCMAKE_SHARED_LINKER_FLAGS="-L${LOCALBASE}/lib" > > > > > > This line should not be necessary. Removing it causes the build to fail, > > > which I assume is because of the 'link_directories()' call's relative > > > position within CMakeLists.txt (cmake's upstream documentation says > > > "The command will apply only to targets created after it is called"). > > > > Understood. I used CMAKE_SHARED_LINKER_FLAGS because I thought it wouldn't > > require a patch :( > > For something permanent, avoiding a patch is nice. But in this case, > where the problem is an upstream bug, better to use a patch, since it > will be removed once the port is updated to a release that no longer > needs it. A makefile setting will probably be forgotten by whoever > updates the port in the future, and kept even after the bug is fixed > upstream.
It makes sense. Thank you Anthony :)