Convert makefile in nvsipl into cmakelist

Hi there,
I’m wondering how can we convert makefile of nvsipl test projects like camera and sample into cmakelists?

Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.6

DRIVE OS 6.0.5

DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other

Target Operating System

Linux

QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)

DRIVE AGX Orin Developer Kit (not sure its number)

other

SDK Manager Version

1.9.2.10884

other

Host Machine Version

native Ubuntu Linux 20.04 Host installed with SDK Manager

native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

Dear @bohan.zhang,
Generally, the cmakefile generates Makefile in the end to compile application. We have provided makefile directly to build nvmedia samples.
You may have to check in other forums. I found one thread cmake - Convert Makefile into CMakeLists, where to start - Stack Overflow. Please check if it helps

Hi @SivaRamaKrishnaNV @VickNV ,

I’ve been trying to convert it, but one of the biggest problem is that after converting the nvsipl library is not included.

Some of the problems appreared:
1.In cmakelists how to apply variabes pre-defined in nvdefs.mk
2. In terms of CXXFLAGS, CPPFLAGS, LDFLAGS, and LDLIBS, what’s the alternatives in cmakelists?
3. At the very beginning of the makefile, it has “include …/…/…/…/…/make/nvdefs.mk”, which adds the very basic makefile defined for variables, how to convert this? Is that okay just using include(…/…/…/…/…/make/nvdefs.mk)?
4. How to deal with
ifeq ($(NV_PLATFORM_OS), QNX)

endif
and
ifeq ($(NV_PLATFORM_SAFETY), 0)

endif
???
Do you have any examples?
Could you please give us an example of how the cmake would be converted based on makefile in nvsipl? So we can have a look and make it easier

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.