Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use cmake? #7

Open
beOn opened this issue Mar 29, 2019 · 7 comments
Open

use cmake? #7

beOn opened this issue Mar 29, 2019 · 7 comments

Comments

@beOn
Copy link
Contributor

beOn commented Mar 29, 2019

I've got a decent cmake file for building plugins... see my fork of ZMQInterface. Nevermind the rest of what I've done to that plugin...

Need to put some attribution at the top of the file, but other than that I'd be happy to adapt it for this plugin. You use ccmake to tell it where open ephys is, and it selects the correct install location for the platform (on macs, this is under ~/Application\ Support/open-ephys/PlugIns, not in the open ephys build path).

It can make xcode projects, make files, and project files for whatever IDE's cmake supports (though I've only tested those first two).

It can also generate customized environment.xcconfig files, so should take care of that pesky python path / version issue in the xcode build process.

Let me know if you'd like me to put something together!

@Claybarn
Copy link
Collaborator

Claybarn commented Mar 30, 2019

Definitely! The python path issue is a real pain. Would be awesome to get around that. Be sure to develop with the “event_reciever” branch.

@ethanbb
Copy link
Contributor

ethanbb commented May 28, 2019

To add on, there is now this standard template for using CMake for Open Ephys plugins: https://github.com/open-ephys-plugins/OEPlugin

I haven't looked at @beOn's fork, but it sounds like it might be possible to incorporate the logic for setting the Python path into a CMake config file based on the template, and use that to replace the various python path setting mechanisms for each platform (e.g. build-linux.sh for Linux and PythonEnv.props for Windows).

@fpbattaglia
Copy link
Collaborator

Always tried to avoid cmake, but if somebody understands it well enough, and it can deal with the paths stuff etc, then that's great

@beOn
Copy link
Contributor Author

beOn commented May 29, 2019 via email

@fpbattaglia
Copy link
Collaborator

just created a "cmake_build" branch. Do you want to send a PR onto that? Then we can all take a look...

@beOn
Copy link
Contributor Author

beOn commented May 31, 2019

Sure thing. Will have to hit this tonight or over the weekend... updating my branch from master just now created a bit of a mess.

@beOn
Copy link
Contributor Author

beOn commented Jun 14, 2019

Submitted. Some quick notes I'll need to edit, extend and add to the readme:

readme notes

  • need to install cmake (link for platform-specific instructions)
  • cmake build should be run using whatever python environment you're gonna use
    • or specify PYTHON_EXECUTABLE, PYTHON_LIBRARIES, PYTHON_INCLUDE_DIRS, PYTHON_HOME
    • example cmake command: cmake ../ -G Xcode -DOPEN_EPHYS_DIR=../../openEphysGUI
  • they seem to use the root anaconda version... we'll fix this
  • note that if you're on a mac, and you've built the plugin previously, you should delete the stuff it put in your open ephys dir
  • after cmake, you need to build:
    • xcode
      • xcodebuild -target install build >/dev/null
      • or open the project and build it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants