timknapen/Arduino-With-XCode — Issue #12: User libraries easy declaration
Author: rei-vilo
Created: 2012-01-24 09:34:51+00:00
State: open

```SKETCHBOOK_PATH``` is declared on the **Project > Build Settings** pane under the **User-Defined** list:

>
SKETCHBOOK_PATH = ~/Documents/Arduino/_Projets
>

Yes, the ~ works!

Makefile:

```
# Declare paths of included user libraries, even if a folder contains multiple .cpp files
# Serial_LCD contains proxySerial, Serial_LCD, GUI, Graphics .h and .cpp files
USR_LIBRARIES_LIST = NewSoftSerial Serial_LCD

# find .cpp files for user's libraries in sketchbook/libraries folder
USR_LIBRARIES_PATH = $(foreach lib, $(USR_LIBRARIES_LIST), $(wildcard $(SKETCHBOOK_PATH)/Libraries/$(lib)))
USR_LIBRARIES = $(foreach lib, $(USR_LIBRARIES_LIST), $(wildcard $(SKETCHBOOK_PATH)/Libraries/$(lib)/*.cpp))
CPP_LIBRARIES += $(USR_LIBRARIES)

```