Skip to content

darcamo/conan-vtk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conan recipe for the VTK library.

This recipe was only tested on Linux.

To use it, clone this repository and run the command below from the recipe folder.

conan create . --build=missing -s build_type=Release

Note that VTK does some extra stuff in its installed CMake config files that is not replicated in the Conan recipe. Because of this, the recipe disables generation of the CMake config files in the consumers (when using CMakeDeps generator) and instead it adds the folder where VTK installs its own CMake config files to buildirs. What this means is that VTK native CMake config files will be used instead of Conan generated ones, which also means that consumers can only use CMake build system and must consume VTK according to VTK’s documentation. The example below has the correct code in the consumers CMakeLists.txt file.

cmake_minimum_required(VERSION 3.15)
project(PackageTest CXX)

find_package(VTK REQUIRED
)

add_executable(example src/example.cpp)
target_link_libraries(example PRIVATE ${VTK_LIBRARIES})

include(vtkModule)
# vtk_module_autoinit is needed
vtk_module_autoinit(
  TARGETS example
  MODULES ${VTK_LIBRARIES}
)

Releases

No releases published

Packages

No packages published