External project using makefile

I think there are two ways to go about this:

  • adding a CMakeLists.txt to LuaJIT and using it directly (i.e., making your own add_library calls) (note that others may have already done this and searching GitHub for such examples may be of use); or
  • using FetchContent (which does the ExternalProject for you) and should make LuaJIT available for use in the rest of your project.

@craig.scott is way more versed in these bits than I am, so he likely would have more useful information beyond just these pointers.