how to package a GNU make project?

I have a CMake project that depends on an external project. The external project is a GNU make build.
With external_project_add i chose the binaries to install under build/dep1-prefix/bin.

Now, i also want to install these binaries to the system so they can be used by other build projects as well. How do i do that? Do i include the binaries in the package of the superbuild?

the binaries do not exist as targets. I can import them, but i cannot export or package them.

You can install them as install(FILES) or install(PROGRAMS), though you might need to do file(GET_RUNTIME_DEPENDENCIES) to get required libraries from the dependent project as well (if explicit listing isn’t viable).

1 Like