How to create Paraview MVS solution using CMake

How to create Paraview MVS solution using CMake

To build Paraview, you need these other tools:

  • Perl
    • Need Perl to build Qt [1]
  • Qt
    • You should build Qt using the same compiler you are going to use to build Paraview. (I used Qt 4.7 with Microsoft Visual Studio 2008. You can follow the steps here for installing Qt: [2])
  • DirectX SDK (not really required if only building this for your personal use i.e. not for redistribution)
    • You can download this from the Microsoft website
  • Python
    • You can download this from [3]
  • CMake
    • This is the software that we use to convert the Paraview source code to the compiler of your choice. You can download CMake from [4]
  • Download Paraview source code. It takes some time to download. Start CMake and specify your source and build directory. Your build directory should be different from your source directory. Check “Group”,”Advanced”. Click “Configure”. Select the generator (The compiler you are going to use. I selected Visual Studio 9 2008). This will take a while.
  • If there are any errors (usually, there will be),it is likely to be related to Python,DirectX. Even no error shows up, it is still worthy to check the following items. (The DirectX entries are not needed if you don’t have DirectX)
    • DirectX -> DirectX_INCLUDE_DIR, type in the include floder path in your DirectX installation. For example, C:/Program Files/Microsoft DirectX SDK-August-2006/Include
    • DirectX -> DirectX_LIBRARY, the full path of d3d9.lib. ATTENTION! It is not the path of the “lib” folder, it is the .lib file itself.For example C:/Program Files/Microsoft DirectX SDK-August-2006/Lib/x86/d3d9.lib
    • PYTHON_DEBUG_LIBRARY, leave it nofound
    • PYTHON_LIBRARY,the full path of the file python27.lib,or different version of this file,ATTENTION again! Not the “lib” folder. For example, C:\Python27\libs\python27.lib
    • PYTHON_INCLUDE_DIR, include folder path in the python installation. For example C:\Python27\include
    • PYTHON_EXECUTABLE (This may be under “Ungrouped Entries”), full pathname of python.exe, for example,C:\Python27\python.exe
  • Click “Configure” again and CMake will process everything a second time. This time you should not see any items in red.
  • Click “ Generate”. It will take a few minutes to generate the solution. Then go to the build directory specified in CMake, open the solution,usually,ParaView.sln
  • In Microsoft Visual Studio, select the entire Solution. Compile. This will take ~ 1 hour. (Make sure you select the actual compilation mode, i.e. Debug or Release, or you would have to spend another hour recompiling)

visual studio

[edit]Successful Compilation of ParaView sourcecode on my machines

    • PYTHON_UTIL_LIBRARY – leave as unknown. RE-clicked “Configure” after CMake complains. The warning went away. Clicked Generate.
    • INSTALL failed in Microsoft Visual Studio (all others succeeded). Recompiled. Succeeded
    • Unsuccessful attempt: Ran paraview.exe from bin/Release. Added QtGui4.dll, QtCore4.dll
    • Add Qt DLL path as Reference: [5]
  • personal laptop

About Alexis Chan
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s