Skip to content

Compiling and Installing

Yinan Zhou edited this page Nov 30, 2021 · 8 revisions

Compiling libmei should be fairly straightforward.

Mac

Using Xcode

On a Mac, open the attached libmei.xcodeproj file in Xcode 4+. You will notice that there are a number of build targets. Select the mei target to build the framework. Compile by clicking Build in the Product menu.

build instructions

After compiling, you should copy the product to the system-wide Frameworks folder so that it can be found by other software. Go to the Project navigator (in the left pane), expand the Products folder, right click mei.framework and select Show in Finder. Copy the mei.framework file into /Library/Frameworks.

You may also select the mei_test target to build and run the tests. In order to run the tests, you will need to download the Google Test Framework (gtest).

Using cmake

You can also compile and install using the same method as in linux if you have ossp-uuid (which replaces uuid-dev) and gtest.

You can install ossp-uuid with brew and gtest by cloning the repo.

git clone https://github.com/google/googletest
cd googletest
mkdir build
cd build
cmake ..
make
make install

If you are using cmake in macOS, you also need to add an extra argument to cmake

mkdir build; cd build
cmake -DCMAKE_FIND_FRAMEWORK=LAST ..
make && make install

Linux

Dependencies:

  • uuid-dev
  • libxml

Linux users can compile with CMake:

$ mkdir build; cd build
$ cmake ..
$ make && make install

You can run tests by calling the test target:

$ make test

Windows

Not yet. Please help us!