Score:0

How do I "Add the installation prefix of "Tolua++" to CMAKE_PREFIX_PATH"?

us flag

I'm trying to create a .deb for a game from its tarball. (https://github.com/Wargus/stratagus)

I believe I've installed its dependencies, but one I'm suspicious of is tolua++, which is a sort of an interface between C and Lua. It seems to be uncertainly maintained: it isn't apt-gettable but it can be downloaded from the Debian packages list, which says the upstream source has been offline since 2020.

The command I'm using is sudo debuild, and it stops at 3% with this error:-

CMake Error at CMakeLists.txt:650 (find_package):
  By not providing "FindTolua++.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Tolua++", but
  CMake did not find one.

  Could not find a package configuration file provided by "Tolua++" with any
  of the following names:

    Tolua++Config.cmake
    tolua++-config.cmake

Add the installation prefix of "Tolua++" to CMAKE_PREFIX_PATH or set
  "Tolua++_DIR" to a directory containing one of the above files.  If
  "Tolua++" provides a separate development package or SDK, be sure it has
  been installed.

$ which tolua++5.1

returns:-

/usr/bin/tolua++5.1

Having searched I'm pretty sure there is no dev or devel package for tolua++ for Ubuntu (although there is for CentOS and some other distros). If this had been an apt-gettable package, I'd have expected the installation to have included integrating with cmake, but hopefully this can be done manually as the error looks quite simple?

I think I need to append /usr/bin to CMAKE_PREFIX_PATH

My understanding is this is both a build directive and an environment variable, and that it consists of a semicolon-separated list of paths.

But I don't know if that list is a text file somewhere or if there's a command for it - that I could enter in the bash terminal, or python?

After doing

$ export CMAKE_PREFIX_PATH=/usr/bin:$CMAKE_PREFIX_PATH

the command

$ printenv CMAKE_PREFIX_PATH

returns

/usr/bin:

So have I misunderstood what the prefix is, or have I already added the correct prefix and therefore must I instead look at the second leg of the error message:- "or set Tolua++_DIR" to a directory containing one of the above files." ?

I don't have Tolua++-Config.cmake or tolua++-config.cmake anywhere. Would that file be auto-generated by cmake; or should the stratagus developers have included it?; or is it something I need to write myself? If it's the latter, where can I find out more?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.