Addon_config.mk and libs for OSX

I am not sure if I missed something simple but I would like to make an addon I am working on include dyld files that are installed via homebrew (obviously I am on OSX). I want to add some but not all of the libs in a folder (this should be in the same place for every brew install). Is there a way to specify this in the addon_config.mk for the project generator? I see there is an option for linux with ADDON_PKG_CONFIG_LIBRARIES but I don’t see how I can do this for OSX.
Is this possible?

is a great piece of mechanics which allows any addon in the make system to include libraries and external codes to your own on any platform. linux, arm, android, ios, osx, dos, …

simply configure accordingly addon_config.mk for each platform, and libs & other code are loaded for compilation.

if you want to include a library like for example libname.dylib you can use ADDON_LDFLAGS=-lname

Cheers, sorry for asking simple questions but I still dont make this work:

For multiple libs should I use this format:

ADDON_LDFLAGS = libpcl_keypoints.1.9.1.dylib 
ADDON_LDFLAGS += libpcl_ml.1.9.1.dylib 
ADDON_LDFLAGS += libpcl_octree.1.9.1.dylib 
ADDON_LDFLAGS += libpcl_outofcore.1.9.1.dylib 

Also how do I specify the path of the libs?

Should I add it like this for each lib?
ADDON_LDFLAGS = /usr/local/Cellar/pcl/1.9.1_4/lib/libpcl_keypoints.1.9.1.dylib
(this does not seem to work for me)

I also tried to add:
ADDON_SOURCES += /usr/local/Cellar/pcl/1.9.1_4/lib/
As this is the folder where the libs I want to link are, but it also does not pick them up.

Lastly, is there a way to alter user defined parameters in xcode with the addon_config.mk?
For this project I need to change:

HEADER_BOOST ="$(OF_PATH)/libs/boost/include"
to
HEADER_BOOST = /usr/local/Cellar/boost/1.72.0/include

It is pretty simple to do it manually, but it would be cool if the PG did the work for me.

Cheers

no, you don’t need to specify the full file name, you need to pass the -l flag to the linker with the actual name of the library. That is, minus the lib prefix and the extension so something like:

ADDON_LDFLAGS = -lpcl_keypoints.1.9.1 
ADDON_LDFLAGS += -lpcl_ml.1.9.1
ADDON_LDFLAGS += -lpcl_octree.1.9.1
ADDON_LDFLAGS += -lpcl_outofcore.1.9.1

if this libraries are in the system they should be in the default includes path so that should be enough but in case it’s not you can specify a libraries search path with the -L flag as in:

ADDON_LDFLAGS += -L /usr/local/Cellar/pcl/1.9.1_4/lib/

Ok, this makes sense, but even when specifying the path I get
ld: library not found for -libpcl_apps.1.9.1