You have to be able to compile OpenCPN itself - Get the info at http://opencpn.org/ocpn/developers_manual
- This plugin now builds out of the OpenCPN source tree
git clone https://github.com/cowelld/tackandlay_pi.git
###Build:
mkdir tackandlay_pi/build
cd tackandlay_pi/build
cmake ..
cmake --build .
Note for Windows users: To link the plugin DLL, the library with OpenCPN exports (opencpn.lib) is needed. Either copy it from your OpenCPN build directory, where it is created or, if you don't want to build OpenCPN by yourself at all, get one corresponding to your desired API level from http://sourceforge.net/projects/opencpnplugins/files/opencpn_lib/
If you want to build inside the OpenCPN source tree, which is good for debugging, it is still possible, just make sure you did the above configure (cmake ..) step before and version.h is created in src directory, otherwise you will end up with errors about undefined PLUGIN_VERSION_[MAJOR,MINOR]
###Build on Mac OS X: Tools: Can be installed either manually or from Homebrew (http://brew.sh)
#brew install git #If I remember well, it is already available on the system
brew install cmake
brew install gettext
ln -s /usr/local/Cellar/gettext/0.19.2/bin/msgmerge /usr/local/bin/msgmerge
ln -s /usr/local/Cellar/gettext/0.19.2/bin/msgfmt /usr/local/bin/msgfmt
To target older OS X versions than the one you are running, you need the respective SDKs installed. The easiest way to achieve that is using https://github.com/devernay/xcodelegacy
####Building wxWidgets (do not use wxmac from Homebrew, it is not compatible with OpenCPN) Get wxWidgets 3.0.x source from http://wxwidgets.org Configure, build and install
cd wxWidgets-3.0.2
./configure --enable-unicode --with-osx-cocoa --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7/ --with-macosx-version-min=10.7 --enable-aui --disable-debug --enable-opengl
make
sudo make install
####Building the plugin Before running cmake, you must set the deployment target to OS X 10.7 to be compatible with the libraries used by core OpenCPN
export MACOSX_DEPLOYMENT_TARGET=10.7
Followed by the standard
cmake ..
make
####Packaging on OS X Get and install the Packages application from http://s.sudre.free.fr/Software/Packages/about.html
make create-pkg
The plugin code is licensed under the terms of the GPL v2 or, at your will, later.