Commit b2f5c4bb authored by Sebastien Barre's avatar Sebastien Barre
Browse files

ENH/FIX: add option to use VTK output path's for the project's path. This fix...

ENH/FIX: add option to use VTK output path's for the project's path. This fix the testing pb, and allow users to forget about adding the VTK bin path to PATH, since all libs and exe will be at the same place
parent 9a737e0f
......@@ -20,10 +20,15 @@ IF (BUILD_TESTING)
${VTK_SOURCE_DIR}/Examples/Build/vtkMy
${VTK_BINARY_DIR}/Examples/Build/vtkMy
vtkmyEx1
${VTK_BINARY_DIR}/Examples/Build/vtkMy/bin
${VTK_EXECUTABLE_PATH}
vtkMy
CMAKE_ARGS
-DVTK_BINARY_PATH:PATH=${VTK_BINARY_DIR})
-DVTK_BINARY_PATH:PATH=${VTK_BINARY_DIR}
-DUSE_BUILT_VTK:BOOL=1
-DUSE_INSTALLED_VTK:BOOL=0
-DBUILD_SHARED_LIBS:BOOL=ON
-DUSE_VTK_OUTPUT_PATHS:BOOL=ON
)
ENDIF (CMAKETEST_COMMAND)
......
#
# Output path(s)
#
SET (LIBRARY_OUTPUT_PATH ${VTKMY_BINARY_DIR}/bin/ CACHE PATH
"Single output directory for building all libraries.")
SET (EXECUTABLE_OUTPUT_PATH ${VTKMY_BINARY_DIR}/bin/ CACHE PATH
"Single output directory for building all executables.")
MARK_AS_ADVANCED (
LIBRARY_OUTPUT_PATH
EXECUTABLE_OUTPUT_PATH
)
#
# Try to find VTK and include its settings (otherwise complain)
#
......@@ -44,8 +29,35 @@ IF (USE_VTK_FILE)
SET(VTKMY_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS} CACHE INTERNAL
"Is this VTKMY built with shared libraries.")
#
# Output path(s)
#
SET (LIBRARY_OUTPUT_PATH ${VTKMY_BINARY_DIR}/bin/ CACHE PATH
"Single output directory for building all libraries.")
SET (EXECUTABLE_OUTPUT_PATH ${VTKMY_BINARY_DIR}/bin/ CACHE PATH
"Single output directory for building all executables.")
MARK_AS_ADVANCED (
LIBRARY_OUTPUT_PATH
EXECUTABLE_OUTPUT_PATH
)
IF (VTK_LIBRARY_PATH AND VTK_EXECUTABLE_PATH)
OPTION(USE_VTK_OUTPUT_PATHS
"Use VTK library path (VTK_LIBRARY_PATH) and executable path (VTK_EXECUTABLE_PATH) as project's LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH."
OFF)
MARK_AS_ADVANCED (USE_VTK_OUTPUT_PATHS)
IF (USE_VTK_OUTPUT_PATHS)
SET (LIBRARY_OUTPUT_PATH ${VTK_LIBRARY_PATH})
SET (EXECUTABLE_OUTPUT_PATH ${VTK_EXECUTABLE_PATH})
ENDIF (USE_VTK_OUTPUT_PATHS)
ENDIF (VTK_LIBRARY_PATH AND VTK_EXECUTABLE_PATH)
ENDIF (USE_VTK_FILE)
#
# Wrap Tcl, Java, Python
#
......
......@@ -24,7 +24,7 @@ ADD_LIBRARY (vtkmyCommon Common_SRCS)
IF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
VTK_WRAP_TCL (vtkmyCommonTCL CommonTCL_SRCS Common_SRCS)
ADD_LIBRARY (vtkmyCommonTCL SHARED CommonTCL_SRCS)
ADD_LIBRARY (vtkmyCommonTCL CommonTCL_SRCS)
TARGET_LINK_LIBRARIES (vtkmyCommonTCL
vtkCommonTCL
${TCL_LIBRARY})
......
......@@ -24,7 +24,7 @@ ADD_LIBRARY (vtkmyImaging Imaging_SRCS)
IF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
VTK_WRAP_TCL (vtkmyImagingTCL ImagingTCL_SRCS Imaging_SRCS)
ADD_LIBRARY (vtkmyImagingTCL SHARED ImagingTCL_SRCS)
ADD_LIBRARY (vtkmyImagingTCL ImagingTCL_SRCS)
TARGET_LINK_LIBRARIES (vtkmyImagingTCL
vtkImagingTCL
vtkFilteringTCL
......
......@@ -24,7 +24,7 @@ ADD_LIBRARY (vtkmyUnsorted Unsorted_SRCS)
IF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
VTK_WRAP_TCL (vtkmyUnsortedTCL UnsortedTCL_SRCS Unsorted_SRCS)
ADD_LIBRARY (vtkmyUnsortedTCL SHARED UnsortedTCL_SRCS)
ADD_LIBRARY (vtkmyUnsortedTCL UnsortedTCL_SRCS)
TARGET_LINK_LIBRARIES (vtkmyUnsortedTCL
vtkIOTCL
vtkGraphicsTCL
......
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