VTKTargets installation location issues
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Please review the following 4 changes. I think they might be helpful.
- VTK_TARGETS_FILE was defined twice
- adding #include was necessary for gcc-4.6
On a Debian system I am installing into /usr/lib/
- VTKTargets.cmake gets installed in the same folder as the libs (in my case /usr/lib/ but I need them in /usr/lib/vtk-5.8)
- libPath always points to /usr/lib/vtk-5.8 (please don't apply this patch, it's just to show you that something is wrong)
Thanks Dominique
--- vtk-5.8.0.orig/vtkGenerateVTKConfig.cmake +++ vtk-5.8.0/vtkGenerateVTKConfig.cmake @@ -147,9 +147,6 @@ SET(VTK_TCL_TK_MACROS_MODULE_CONFIG "${VTK_CMAKE_DIR}/vtkTclTkMacros.cmake") SET(VTK_CMAKE_EXTENSIONS_DIR_CONFIG ${VTK_BINARY_DIR}/CMake)
{VTK_BINARY_DIR}/
{VTK_INSTALL_EXPORT_NAME}.cmake")
-# Export Targets file.
-SET(VTK_TARGETS_FILE "Build configuration information.
SET(VTK_CONFIGURATION_TYPES_CONFIG ${CMAKE_CONFIGURATION_TYPES}) SET(VTK_BUILD_TYPE_CONFIG ${CMAKE_BUILD_TYPE})
--- vtk-5.8.0.orig/Utilities/DICOMParser/DICOMParser.cxx +++ vtk-5.8.0/Utilities/DICOMParser/DICOMParser.cxx @@ -41,6 +41,7 @@
#include <string.h> #include +#include
// Define DEBUG_DICOM to get debug messages sent to dicom_stream::cerr // #define DEBUG_DICOM
--- vtk-5.8.0.orig/Utilities/LastConfigureStep/CMakeLists.txt
+++ vtk-5.8.0/Utilities/LastConfigureStep/CMakeLists.txt
@@ -11,7 +11,7 @@
#-----------------------------------------------------------------------------
GET_PROPERTY(VTK_TARGETS GLOBAL PROPERTY VTK_TARGETS)
EXPORT(TARGETS ${VTK_TARGETS} FILE
{VTK_BINARY_DIR}/
{VTK_INSTALL_EXPORT_NAME}.cmake)
-INSTALL(EXPORT ${VTK_INSTALL_EXPORT_NAME} DESTINATION
${VTK_INSTALL_LIB_DIR_CM24})
+INSTALL(EXPORT ${VTK_INSTALL_EXPORT_NAME} DESTINATION
${VTK_INSTALL_PACKAGE_DIR_CM24})
GET_PROPERTY(VTK_LIBRARIES GLOBAL PROPERTY VTK_LIBRARIES)
#-----------------------------------------------------------------------------
Create the VTKConfig.cmake file containing the VTK configuration.
--- vtk-5.8.0.orig/Wrapping/Tcl/pkgIndex.tcl.in +++ vtk-5.8.0/Wrapping/Tcl/pkgIndex.tcl.in @@ -5,6 +5,7 @@ package ifneeded vtkinit {@VTK_MAJOR_VER proc load_library_package {libName libPath {libPrefix {@VTK_TCL_LIBNAME_PREFIX@}}} { set libExt [info sharedlibextension] set currentDirectory [pwd]
-
set libPath /usr/@VTK_INSTALL_LIB_DIR@/ set libFile [file join $libPath "$libPrefix$libName$libExt"] if {[catch "cd {$libPath}; load {$libFile}" errorMessage]} { puts $errorMessage