(resolved) how to add subdirectories to build?

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

(resolved) how to add subdirectories to build?

Postby mzimmers » Mon Oct 21, 2019 5:58 pm

Hi all -

I need to port a SIP stack into a project. It's all in one directory I've located under /main. I edited my component.mk file as such:

Code: Select all

COMPONENT_ADD_INCLUDEDIRS := \
	MicroSIP-3.19.21-src \
	MicroSIP-3.19.21-src/lib \
	MicroSIP-3.19.21-src/lib/jsoncpp \
	MicroSIP-3.19.21-src/lib/jsoncpp/json \
COMPONENT_SRCDIRS := \
	MicroSIP-3.19.21-src \
	MicroSIP-3.19.21-src/lib \
	MicroSIP-3.19.21-src/lib/jsoncpp \
	MicroSIP-3.19.21-src/lib/jsoncpp/json \
But make still doesn't "see" the files in these directories. Is there a doc that describes what else I need to do?

V3.3.

Thanks...
Last edited by mzimmers on Thu Oct 24, 2019 11:01 pm, edited 1 time in total.

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: how to add subdirectories to build?

Postby mzimmers » Mon Oct 21, 2019 9:57 pm

I'm not at all sure what I'm doing here, so I'm trying different things:
  • I added a CMakeLists.txt file (based on one I found in lwip)

    Code: Select all

    set(COMPONENT_SRCS "AccountDlg.cpp"
                       "AddDlg.cpp"
    	)
    set(COMPONENT_ADD_INCLUDEDIRS
    	"main/MicroSIP-3.19.21-src"
        )
    
    It has some other stuff in it as well, but I don't think it's worth sharing here.
  • I copied the CMakeLists.txt file from esp-idf to my project

This altered the output of the make command, but it's still not building the two files in my CMakeLists.txt file.

So, I guess a good first question is: should this third-party SIP software be included in a directory under my /main directory, or is it preferable that I create a components directory and put it in there?

Thanks for any insight.

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: how to add subdirectories to build?

Postby mzimmers » Thu Oct 24, 2019 11:00 pm

This got me partway there -- adding this line to my top-level makefile:

Code: Select all

EXTRA_COMPONENT_DIRS := components/ccrtp-2.1.2
Still doesn't answer how to add non-component subdirectories, but this will do for now.

Who is online

Users browsing this forum: No registered users and 105 guests