Skip to content
Snippets Groups Projects
Commit 8a805ab3 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

Rendering/ZSpace: localize the SDK selection

Instead of making a header, just add it as a compile definition for the
one file that cares.
parent 7245f658
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,10 @@ else()
vtk_module_find_package(PACKAGE zSpace)
endif()
set_property(SOURCE vtkZSpaceSDKManager.cxx APPEND
PROPERTY
COMPILE_DEFINITIONS "VTK_ZSPACE_USE_COMPAT_SDK=$<BOOL:${ZSPACE_USE_COMPAT_SDK}>")
vtk_module_add_module(VTK::RenderingZSpace
CLASSES ${classes}
PRIVATE_CLASSES ${private_classes})
......@@ -38,7 +42,3 @@ else()
vtk_module_link(VTK::RenderingZSpace
PUBLIC zSpace::zSpace)
endif()
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/vtkZSpaceSDKVersion.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/vtkZSpaceSDKVersion.h")
......@@ -19,9 +19,8 @@ PURPOSE. See the above copyright notice for more information.
#include "vtkRenderWindow.h"
#include "vtkSmartPointer.h"
#include "vtkTransform.h"
#include "vtkZSpaceSDKVersion.h"
#ifdef ZSPACE_USE_COMPAT_SDK
#if VTK_ZSPACE_USE_COMPAT_SDK
#include "vtkZSpaceCoreCompatibilitySDKManager.h"
#else
#include "vtkZSpaceCoreSDKManager.h"
......@@ -41,7 +40,7 @@ vtkZSpaceSDKManager* vtkZSpaceSDKManager::GetInstance()
static vtkSmartPointer<vtkZSpaceSDKManager> instance = nullptr;
if (instance.GetPointer() == nullptr)
{
#ifdef ZSPACE_USE_COMPAT_SDK
#if VTK_ZSPACE_USE_COMPAT_SDK
cout << "USING CORE COMPATIBILITY ZSPACE SDK" << endl;
instance = vtkSmartPointer<vtkZSpaceCoreCompatibilitySDKManager>::New();
#else
......
/*=========================================================================
Program: Visualization Toolkit
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef vtkZSpaceSDKVersion_h
#define vtkZSpaceSDKVersion_h
#cmakedefine ZSPACE_USE_COMPAT_SDK
#endif // vtkZSpaceSDKVersion_h
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment