Page 1 of 1

(resolved) how to add subdirectories to build?

Posted: Mon Oct 21, 2019 5:58 pm
by mzimmers
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...

Re: how to add subdirectories to build?

Posted: Mon Oct 21, 2019 9:57 pm
by mzimmers
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.

Re: how to add subdirectories to build?

Posted: Thu Oct 24, 2019 11:00 pm
by mzimmers
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.