CMakeLists: Adding files in a plugin

Probably not a cookiecutter issue but I can’t find a solution.

I’m gearing up to release a plugin for DBAP but have two SC classes, both of which have their own documentation. I can’t add another file in the CMakeLists.txt without the install failing. Example: I have this in CMakeLists:

set(DBAP_schelp_files
    plugins/DBAP/DBAP.schelp
    plugins/DBAP/DBAPSpeakerArray.schelp
)

The DBAPSpeakerArray.schelp is the added file. I get this output at install:

CMake Error at cmake_install.cmake:77 (file):
  file INSTALL cannot find
  "/home/jacob/Documents/jacob/github/dbap/plugins/DBAP/DBAP.schelp;plugins/DBAP/DBAPSpeakerArray.schelp".


make: *** [Makefile:86: install] Error 1

It’s obvious it’s concatenating the filenames but what gives? Giving DBAPSpeakerArray.schelp it’s own set command stops it from failing but does not cause the install to actually install any of the additional files.

Please advise.

This was actually fixed recently thanks to @elgiano (https://github.com/supercollider/supercollider/pull/5079); if you regenerate the CMake files with the latest files on the develop branch on the supercollider git repo, with tools/cmake_gen/generate_server_plugin_cmake.py, that will fix it.

what gives?

what gives is that this is still alpha-stage software, and i’m not perfect ^^’

1 Like

Well you’re pretty damn close given how quickly you respond on a Friday afternoon!

Just tried regenerating after pulling the most recent version of the develop branch and it gives a similar error, now on the SC files:

CMake Error at cmake_install.cmake:73 (file):
  file INSTALL cannot find
  "/home/jacob/Documents/jacob/github/dbap/plugins/DBAP/array.sc;plugins/DBAP/DBAP.sc".


make: *** [Makefile:86: install] Error 1

Did I make a mistake somewhere?

hmm. i would try cleaning out the build folder completely and starting over, just to make sure.

-Brian

Solved.

I needed to copy over the updated .cmake files from the SC source to my cmake_modules in the plugin directory.

ah okay! glad you figured it out. i’d forgotten about that aspect, it’s been awhile since i touched it.