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

cmake: create and pass around a `VTK::vtkbuild` utility target

This target may be used to propagate flags to all of VTK easily.
parent b861b5b3
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,9 @@ endif ()
include(GNUInstallDirs)
add_library(vtkbuild INTERFACE)
add_library(VTK::vtkbuild ALIAS vtkbuild)
include(vtkCompilerChecks)
include(vtkCompilerPlatformFlags)
include(vtkCompilerExtraFlags)
......@@ -346,6 +349,7 @@ if (NOT DEFINED vtk_cmake_destination)
set(vtk_target_package PACKAGE "${vtk_install_export}")
endif ()
endif ()
install(TARGETS vtkbuild EXPORT "${vtk_install_export}")
set(VTK_CUSTOM_LIBRARY_SUFFIX "<DEFAULT>"
CACHE STRING "Custom library file name suffix (defaults to the version number)")
......@@ -381,6 +385,7 @@ vtk_module_build(
BUILD_WITH_KITS "${VTK_ENABLE_KITS}"
USE_EXTERNAL "${VTK_USE_EXTERNAL}"
ENABLE_WRAPPING "${VTK_ENABLE_WRAPPING}"
UTILITY_TARGET "VTK::vtkbuild"
TARGET_SPECIFIC_COMPONENTS "${VTK_TARGET_SPECIFIC_COMPONENTS}"
TEST_INPUT_DATA_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/Testing"
TEST_OUTPUT_DATA_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/ExternalData/Testing")
......@@ -427,6 +432,7 @@ if (VTK_WRAP_PYTHON)
INSTALL_HEADERS "${VTK_INSTALL_SDK}"
SOABI "${vtk_soabi}"
USE_DEBUG_SUFFIX "${VTK_WINDOWS_PYTHON_DEBUGGABLE}"
UTILITY_TARGET "VTK::vtkbuild"
WRAPPED_MODULES vtk_python_wrapped_modules
TARGET_SPECIFIC_COMPONENTS "${VTK_TARGET_SPECIFIC_COMPONENTS}"
TARGET VTK::vtkpythonmodules)
......
......@@ -15,6 +15,7 @@ vtk_module_wrap_java(
JAVA_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vtk"
MODULES ${vtk_modules}
WRAPPED_MODULES vtk_java_wrapped_modules
UTILITY_TARGET "VTK::vtkbuild"
LIBRARY_DESTINATION "${CMAKE_INSTALL_LIBDIR}"
# Update vtkSettings.java.in if this changes.
JNILIB_DESTINATION "${CMAKE_INSTALL_JNILIBDIR}")
......
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