Cmake on Windows¶
Ash's notes on how to build/compile flusspferd under windows. Since MSVC seems to have some issues with the C++ template/meta-fu we use, I decided to see if i couldn't get MinGW working instead.
Setup toolchain¶
First I cross-compiled and installed spidermonkey as documented on Spidermonkey on Windows.
- I used the MinGW distribution that comes with boost prebuilt: http://nuwen.net/mingw.html.
- iconv I got from http://gnuwin32.sourceforge.net/packages/libiconv.htm - pick the "Developer files" zipfile, unpack it and copy the lib and include directories into C:\MinGW
Building flusspferd¶
set PATH=C:\mingw\bin;%PATH% rem This is needed for the 'can we run SM tests' to find the mozjs.dll set PATH=C:\spidermonkey\lib;%PATH% cd build cmake -G "MinGW Makefiles" .. -DSPIDERMONKEY_ROOT=C:\spidermonkey ^ -DCMAKE_PREFIX_PATH=C:\mingw\ -DCMAKE_MAKE_PROGRAM=C:\mingw\bin\make.exe ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_INSTALL_PREFIX=C:\flusspferd cd .. make
Taadaa! Now just to work out how to get it to install cleanly.
Actually, the last time i built it (for 0.8) I used this invocation of cmake:
Y:\code\js\flusspferd\build>cmake -G "Unix Makefiles" .. -DSQLITE3_INCLUDE_DIRS= C:\sqlite -DSQLITE3_LIBRARY_DIRS=C:\sqlite -DSPIDERMONKEY_ROOT=C:\spidermonkey - DFLUSSPFERD_VERSION=0.8 -DCMAKE_INSTALL_PREFIX=C:\flusspferd -DCMAKE_PREFIX_PATH =C:\mingw\ -DPLUGIN_SQLITE3=ON -DPLUGIN_GMP=OFF -DCMAKE_BUILD_TYPE=Release