Help us understand the problem. What is going on with this article?

VTKサンプルのビルド(システムのVTKを使わない場合のcmake修正)

More than 1 year has passed since last update.

VTKオフィシャルサイトからは様々なexampleが公開されているわけですが、システムのVTKが古い場合

CMake Error at /usr/lib/cmake/vtk-6.3/vtkModuleAPI.cmake:120 (message):
Requested modules not available:
vtkRenderingOpenGL2

等のメッセージがでてコンパイルできません。これはDebian Strecthのvtk-6.3ではOpenGL2でのレンダリングをサポートしていないことによるエラーの例です。現行のvtkを独自でコンパイルすればこの問題は解決しますが、その場合VTKの場所などを指定する必要があります。具体的には

  • VTKディレクトリの指定

をします。vtkのexample配布物の中で、CMakeLists.txt内で find_package(VTK REQUIRED) を実行する前に

set(VTK_DIR "/my/own/vtk/path/")

VTKConfig.cmakeの含まれるディレクトリを指定します。あとは通常のcmakeビルドプロセスと同様です。

sohni
Qt, VTK, C++の備忘録
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした