-
Notifications
You must be signed in to change notification settings - Fork 95
Using CMake on Windows with special requirements
This page provides instructions for building STIR with CMake on Windows in special corner cases. Most people will not need this and just want to refer to the Installing_STIR_with_CMake normal build instructions.
If you need to let CMake find executables or dlls in a particular location, you can either
- add its location to your system path,
- or modify the CMake-gui shortcut to set this location as the CMake startup,
- or open a command
prompt, cd to the directory and launch CMake from there, possibly via something like
"c:\Program Files (x86)\CMake 2.8\bin\cmake-gui.exe"
Below are some examples where this strategy would work.
You might want the use the compilers from the Windows SDK, for instance for compatibility with some external library.
If you didn't add the SDK to the system path, CMake will not find it. One solution for this is as follows:
- launch CMake from an SDK command prompt (there is probably an SDK folder in your Start menu with an appropriate entry)
- When pressing "Configure", you will have to use a "generator" that is compatible with the SDK. "nmake" should work. For SDK 7.1, you could use "Visual Studio 10" and then build via "msbuild" (see main page).
STIR can use SWIG to generate an interface to Python (or soon MATLAB). You can download SWIG executables for Windows from its website. However, in case you want to use a brand-new version of SWIG, you will need to build it yourself. At present (end 2014), SWIG can only be build on Linux-type systems. You could try to use MSYS (after downloading a number of packages), but it is relatively easy with Cygwin (after installing autoconf, bison etc). However, now you need to point CMake to the swig executable, which will only run if CMake will find your cygwin1.dll. Add its location (which could be c:\cygwin64\bin) to your path as above.