CIS 410/510 Project 1
- Here is a video of me reviewing the instructions from Winter 2020. Note: the versions of CMake and VTK have changed in the last two years, but everything else is the same.
- Here is the PDF of the instructions.
- You will need to install VTK and CMake.
- I recommend VTK 9.1.
- I recommend CMake 3.22.1.
- Here is a beginning VTK program.
- CMakeLists.txt files:
- Here is the CMakeLists.txt file that worked on my Mac desktop. I thought it would work well for Linux too, but you have to remove the -framework command.
- Here is the CMakeLists.txt file John Wulf got working on his Windows laptop last spring, which others have reported success with.
- Note that these CMakeLists.txt files have the VTK location in it, which changes from machine to machine. You will need to update it for your machine.
- Here is a data file that project1 requires (i.e., data.vtk).
- It needs to be in the same directory you launch the project1 executable from.
- Note: in previous years, I had to set the LD_LIBRARY_PATH on my Mac. My specific command was: export DYLD_LIBRARY_PATH=/Users/hank/Hartree/VTK/install/lib/. Your command will be different, of course, since you have a different directory structure.
- Here is a screenshot I took.
Some notes from Sudhanshu Sane about Linux porting:
- Download CMake.
- Run the CMake GUI, give it a source and bin path of VTK.
- Configure and generate through CMake GUI. (I tried building my VTK through the terminal but it would fail at 90%)
-
Install OpenGL by :
sudo apt-get install freeglut3-dev
-
Install libraries of qt4 in the same manner -
sudo apt-get install libqt4-dev libqt4-core
- (Note from Hank: this should probably be Qt5 now with the newer version of VTK)
- Some changes need to be made to the CMakeLists.txt file :
- 1. Remove the MACOSX_BUNDLE
- 2. Change directory to point to local VTK
- 3. Comment out the line - SET(CMAKE_CXX_LINK_FLAGS "-framework OpenGL")
- 4. Add find_package(Qt5Widgets)