Commit 132bb931 authored by Brad King's avatar Brad King 💬
Browse files

ERR: VTK executable locations were not configured with the MSVC IntDir in mind.

parent 9c57000d
......@@ -10,6 +10,14 @@ SET(VTK_BUILD_VERSION 1)
SET(VTK_VERSION
"${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")
#-----------------------------------------------------------------------------
# Output directories.
SET (LIBRARY_OUTPUT_PATH ${VTK_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.")
SET (EXECUTABLE_OUTPUT_PATH ${VTK_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables.")
MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)
SET(VTK_LIBRARY_DIR ${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
SET(VTK_EXECUTABLE_DIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
#-----------------------------------------------------------------------------
# Load the VTK CMake extension module.
IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
......@@ -131,11 +139,11 @@ ENDIF(VTK_USE_PARALLEL)
#-----------------------------------------------------------------------------
# VTK executable locations
IF(VTK_WRAP_TCL)
SET(VTK_TCL_EXE ${VTK_EXECUTABLE_PATH}/vtk)
SET(VTK_TCL_EXE ${VTK_EXECUTABLE_DIR}/vtk)
SET(VTK_TCL_HOME ${VTK_SOURCE_DIR}/Wrapping/Tcl)
ENDIF(VTK_WRAP_TCL)
IF(VTK_WRAP_PYTHON)
SET(VTK_PYTHON_EXE ${VTK_EXECUTABLE_PATH}/vtkpython)
SET(VTK_PYTHON_EXE ${VTK_EXECUTABLE_DIR}/vtkpython)
ENDIF(VTK_WRAP_PYTHON)
IF(VTK_WRAP_JAVA)
SET(VTK_JAVA_JAR ${LIBRARY_OUTPUT_PATH}/vtk.jar)
......@@ -152,14 +160,6 @@ SUBDIRS(Wrapping Utilities Common Filtering Imaging Graphics IO)
INSTALL_FILES(/include/vtk .h vtkCommonInstantiator vtkFilteringInstantiator
vtkIOInstantiator vtkImagingInstantiator vtkGraphicsInstantiator)
SET (LIBRARY_OUTPUT_PATH ${VTK_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all libraries.")
SET (EXECUTABLE_OUTPUT_PATH ${VTK_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all executables.")
MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)
SET (VTK_LIBRARY_PATH ${LIBRARY_OUTPUT_PATH} CACHE INTERNAL "Where VTK libraries are. Used by projects which depend on VTK. Do not remove.")
SET (VTK_EXECUTABLE_PATH ${EXECUTABLE_OUTPUT_PATH} CACHE INTERNAL "Where VTK executables are. Used by projects which depend on VTK. Do not remove.")
OPTION (VTK_DEBUG_LEAKS "Build leak checking support into vtk." OFF)
MARK_AS_ADVANCED(VTK_DEBUG_LEAKS)
IF (APPLE)
......@@ -230,8 +230,7 @@ ENDIF(VTK_USE_MANGLED_MESA)
IF (VTK_WRAP_TCL)
INCLUDE (${CMAKE_ROOT}/Modules/FindTCL.cmake)
UTILITY_SOURCE(VTK_WRAP_TCL_EXE vtkWrapTcl Wrapping vtkWrapTcl.c)
MARK_AS_ADVANCED(VTK_WRAP_TCL_EXE)
SET(VTK_WRAP_TCL_EXE ${VTK_EXECUTABLE_DIR}/vtkWrapTcl)
FIND_FILE(VTK_WRAP_HINTS hints ${VTK_SOURCE_DIR}/Wrapping )
MARK_AS_ADVANCED(VTK_WRAP_HINTS)
SET (VTK_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/vtk)
......
......@@ -106,12 +106,6 @@ ELSE (VTK_DATA_ROOT)
ENDIF (VTK_USE_HYBRID)
ENDIF (VTK_DATA_ROOT)
IF (EXECUTABLE_OUTPUT_PATH)
SET (PARALLEL_EXEC_PATH ${EXECUTABLE_OUTPUT_PATH})
ELSE (EXECUTABLE_OUTPUT_PATH)
SET (PARALLEL_EXEC_PATH ${VTK_BINARY_DIR}/Parallel/Testing/Cxx/${CMAKE_CFG_INTDIR})
ENDIF (EXECUTABLE_OUTPUT_PATH)
# For now this test is only available on Unix because
# on Windows, python does not support forking/killing processes
IF (UNIX)
......@@ -119,8 +113,8 @@ IF (UNIX)
IF (VTK_DATA_ROOT)
ADD_TEST(Sockets-image ${PYTHON_EXECUTABLE}
${VTK_SOURCE_DIR}/Parallel/Testing/Cxx/TestSockets.py
${PARALLEL_EXEC_PATH}/SocketServer
${PARALLEL_EXEC_PATH}/SocketClient
${VTK_EXECUTABLE_DIR}/SocketServer
${VTK_EXECUTABLE_DIR}/SocketClient
${VTK_DATA_ROOT}
Baseline/Parallel/SocketClient.cxx.png)
ENDIF (VTK_DATA_ROOT)
......
......@@ -10,10 +10,6 @@ SET(expat_SRCS
INCLUDE_DIRECTORIES(${VTKEXPAT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${VTKEXPAT_BINARY_DIR})
IF (NOT VTK_LIBRARY_PATH)
LINK_DIRECTORIES(${VTKEXPAT_BINARY_DIR})
ENDIF (NOT VTK_LIBRARY_PATH)
IF(WIN32)
IF(NOT BUILD_SHARED_LIBS)
SET (VTK_EXPAT_STATIC 1)
......
......@@ -12,7 +12,7 @@ IF(VTK_USE_CARBON)
ADD_CUSTOM_COMMAND(
SOURCE vtkpython
COMMAND ${VTK_APPLE_RESOURCE}
ARGS Carbon.r -o ${EXECUTABLE_OUTPUT_PATH}/vtkpython
ARGS Carbon.r -o ${VTK_EXECUTABLE_DIR}/vtkpython
TARGET vtkpython
)
ENDIF(VTK_APPLE_RESOURCE)
......@@ -71,7 +71,7 @@ IF (VTK_USE_PARALLEL)
ADD_CUSTOM_COMMAND(
SOURCE pvtkpython
COMMAND ${VTK_APPLE_RESOURCE}
ARGS Carbon.r -o ${EXECUTABLE_OUTPUT_PATH}/pvtkpython
ARGS Carbon.r -o ${VTK_EXECUTABLE_DIR}/pvtkpython
TARGET pvtkpython
)
ENDIF(VTK_APPLE_RESOURCE)
......
......@@ -26,6 +26,12 @@
#include "vtkVersion.h"
#include "Wrapping/Python/vtkPythonAppInitConfigure.h"
#if defined(CMAKE_INTDIR)
# define VTK_PYTHON_LIBRARY_DIR VTK_PYTHON_LIBRARY_DIR_BUILD "/" CMAKE_INTDIR
#else
# define VTK_PYTHON_LIBRARY_DIR VTK_PYTHON_LIBRARY_DIR_BUILD
#endif
#include "Python.h"
#include <sys/stat.h>
......@@ -139,9 +145,9 @@ int main(int argc, char **argv)
// make sure to decrease reference counting for both path strings.
PyObject* path = PySys_GetObject("path");
PyObject* newpath;
if ( ::vtkPythonAppInitFileExists(VTK_PYTHON_LIBRARY_PATH) )
if ( ::vtkPythonAppInitFileExists(VTK_PYTHON_LIBRARY_DIR) )
{
newpath = PyString_FromString(VTK_PYTHON_LIBRARY_PATH);
newpath = PyString_FromString(VTK_PYTHON_LIBRARY_DIR);
PyList_Insert(path, 0, newpath);
Py_DECREF(newpath);
}
......
......@@ -2,6 +2,6 @@
#define __vtkPythonAppInitConfigure_h
#define VTK_PYTHON_SOURCE_DIR "@VTK_SOURCE_DIR@/Wrapping/Python"
#define VTK_PYTHON_LIBRARY_PATH "@VTK_LIBRARY_PATH@"
#define VTK_PYTHON_LIBRARY_DIR_BUILD "@LIBRARY_OUTPUT_PATH@"
#endif
......@@ -23,7 +23,7 @@ IF(VTK_USE_CARBON)
ADD_CUSTOM_COMMAND(
SOURCE vtk
COMMAND ${VTK_APPLE_RESOURCE}
ARGS Carbon.r -o ${EXECUTABLE_OUTPUT_PATH}/vtk
ARGS Carbon.r -o ${VTK_EXECUTABLE_DIR}/vtk
TARGET vtk
)
ENDIF(VTK_APPLE_RESOURCE)
......@@ -54,7 +54,7 @@ IF (VTK_USE_PARALLEL)
ADD_CUSTOM_COMMAND(
SOURCE pvtk
COMMAND ${VTK_APPLE_RESOURCE}
ARGS Carbon.r -o ${EXECUTABLE_OUTPUT_PATH}/pvtk
ARGS Carbon.r -o ${VTK_EXECUTABLE_DIR}/pvtk
TARGET pvtk
)
ENDIF(VTK_APPLE_RESOURCE)
......@@ -132,13 +132,13 @@ ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
IF(VTK_TCL_CONFIGURATION_TYPES)
FOREACH(config ${VTK_TCL_CONFIGURATION_TYPES})
SET(VTK_TCL_LIBRARY_DIR "${VTK_LIBRARY_PATH}/${config}")
SET(VTK_TCL_LIBRARY_DIR "${LIBRARY_OUTPUT_PATH}/${config}")
CONFIGURE_FILE(${VTK_SOURCE_DIR}/Wrapping/Tcl/pkgIndex.tcl.in
${VTK_BINARY_DIR}/Wrapping/Tcl/${config}/pkgIndex.tcl
@ONLY IMMEDIATE)
ENDFOREACH(config)
ELSE(VTK_TCL_CONFIGURATION_TYPES)
SET(VTK_TCL_LIBRARY_DIR "${VTK_LIBRARY_PATH}")
SET(VTK_TCL_LIBRARY_DIR "${LIBRARY_OUTPUT_PATH}")
CONFIGURE_FILE(${VTK_SOURCE_DIR}/Wrapping/Tcl/pkgIndex.tcl.in
${VTK_BINARY_DIR}/Wrapping/Tcl/pkgIndex.tcl
@ONLY IMMEDIATE)
......
......@@ -32,7 +32,7 @@ IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
# Library directory.
SET(VTK_LIBRARY_DIRS_CONFIG ${VTK_LIBRARY_PATH})
SET(VTK_LIBRARY_DIRS_CONFIG ${LIBRARY_OUTPUT_PATH})
# Determine the include directories needed.
SET(VTK_INCLUDE_DIRS_CONFIG
......@@ -53,18 +53,18 @@ SET(VTK_WRAP_JAVA_EXE_CONFIG "")
SET(VTK_WRAP_PYTHON_EXE_CONFIG "")
SET(VTK_WRAP_TCL_EXE_CONFIG "")
IF(VTK_WRAP_TCL)
SET(VTK_TCL_EXE_CONFIG ${VTK_EXECUTABLE_PATH}/vtk)
SET(VTK_TCL_EXE_CONFIG ${VTK_TCL_EXE})
SET(VTK_WRAP_TCL_EXE_CONFIG ${VTK_WRAP_TCL_EXE})
SET(VTK_TCL_HOME_CONFIG ${VTK_SOURCE_DIR}/Wrapping/Tcl)
IF(VTK_USE_PARALLEL AND VTK_USE_MPI)
SET(VTK_MPI_TCL_EXE_CONFIG ${VTK_EXECUTABLE_PATH}/pvtk)
SET(VTK_MPI_TCL_EXE_CONFIG ${VTK_EXECUTABLE_DIR}/pvtk)
ENDIF(VTK_USE_PARALLEL AND VTK_USE_MPI)
ENDIF(VTK_WRAP_TCL)
IF(VTK_WRAP_PYTHON)
SET(VTK_PYTHON_EXE_CONFIG ${VTK_PYTHON_EXE})
SET(VTK_WRAP_PYTHON_EXE_CONFIG ${VTK_WRAP_PYTHON_EXE})
SET(VTK_PYTHON_EXE_CONFIG ${VTK_EXECUTABLE_PATH}/vtkpython)
IF(VTK_USE_PARALLEL AND VTK_USE_MPI)
SET(VTK_MPI_PYTHON_EXE_CONFIG ${VTK_EXECUTABLE_PATH}/pvtkpython)
SET(VTK_MPI_PYTHON_EXE_CONFIG ${VTK_EXECUTABLE_DIR}/pvtkpython)
ENDIF(VTK_USE_PARALLEL AND VTK_USE_MPI)
ENDIF(VTK_WRAP_PYTHON)
IF(VTK_WRAP_JAVA)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment