Commit 4cd9aa98 authored by Sebastien Barre's avatar Sebastien Barre
Browse files

ENH: avoid conflict with VTK's BUILD_SHARED_LIB. Add support for Tcl wrapped...

ENH: avoid conflict with VTK's BUILD_SHARED_LIB. Add support for Tcl wrapped libs when BUILD_SHARED_LIB is OFF. Cleaner option names.
parent 635392d1
......@@ -37,6 +37,13 @@ IF (USE_VTK_FILE)
"Build with shared libraries."
${VTK_BUILD_SHARED_LIBS})
# This value has to be set so that it can be use in vtkmyConfigure.h.in
# otherwise the BUILD_SHARED_LIB from VTK's vtkConfigure.h file is picked
# first :(
SET(VTKMY_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS} CACHE INTERNAL
"Is this VTKMY built with shared libraries.")
ENDIF (USE_VTK_FILE)
#
......@@ -54,10 +61,13 @@ ENDIF (USE_VTK_FILE)
IF (VTK_WRAP_TCL)
OPTION(VTKMY_WRAP_TCL
OPTION(WRAP_TCL
"Wrap classes into the TCL interpreted language."
ON)
SET(VTKMY_WRAP_TCL ${WRAP_TCL} CACHE INTERNAL
"Wrap classes into the TCL interpreted language.")
IF (VTKMY_WRAP_TCL)
IF (NOT VTK_WRAP_TCL_EXE)
......@@ -84,9 +94,9 @@ IF (VTK_WRAP_TCL)
ELSE (VTK_WRAP_TCL)
IF (VTKMY_WRAP_TCL)
MESSAGE("Warning. VTKMY_WRAP_TCL is ON but the VTK version you have chosen has not support for Tcl (VTK_WRAP_TCL is OFF). Please set VTKMY_WRAP_TCL to OFF.")
ENDIF (VTKMY_WRAP_TCL)
IF (WRAP_TCL)
MESSAGE("Warning. WRAP_TCL is ON but the VTK version you have chosen has not support for Tcl (VTK_WRAP_TCL is OFF). Please set WRAP_TCL to OFF.")
ENDIF (WRAP_TCL)
ENDIF (VTK_WRAP_TCL)
......@@ -96,10 +106,13 @@ ENDIF (VTK_WRAP_TCL)
IF (VTK_WRAP_PYTHON)
OPTION(VTKMY_WRAP_PYTHON
OPTION(WRAP_PYTHON
"Wrap classes into the Python interpreted language."
ON)
SET(VTKMY_WRAP_PYTHON ${WRAP_PYTHON} CACHE INTERNAL
"Wrap classes into the Python interpreted language.")
IF (VTKMY_WRAP_PYTHON)
IF (NOT VTK_WRAP_PYTHON_EXE)
......@@ -133,9 +146,9 @@ IF (VTK_WRAP_PYTHON)
ELSE (VTK_WRAP_PYTHON)
IF (VTKMY_WRAP_PYTHON)
MESSAGE("Warning. VTKMY_WRAP_PYTHON is ON but the VTK version you have chosen has not support for Python (VTK_WRAP_PYTHON is OFF). Please set VTKMY_WRAP_PYTHON to OFF.")
ENDIF (VTKMY_WRAP_PYTHON)
IF (WRAP_PYTHON)
MESSAGE("Warning. WRAP_PYTHON is ON but the VTK version you have chosen has not support for Python (VTK_WRAP_PYTHON is OFF). Please set WRAP_PYTHON to OFF.")
ENDIF (WRAP_PYTHON)
ENDIF (VTK_WRAP_PYTHON)
......@@ -145,10 +158,13 @@ ENDIF (VTK_WRAP_PYTHON)
IF (VTK_WRAP_JAVA)
OPTION(VTKMY_WRAP_JAVA
OPTION(WRAP_JAVA
"Wrap classes into the Java interpreted language."
ON)
SET(VTKMY_WRAP_JAVA ${WRAP_JAVA} CACHE INTERNAL
"Wrap classes into the Java interpreted language.")
IF (VTKMY_WRAP_JAVA)
IF (NOT VTK_WRAP_JAVA_EXE)
......@@ -200,9 +216,9 @@ IF (VTK_WRAP_JAVA)
ELSE (VTK_WRAP_JAVA)
IF (VTKMY_WRAP_JAVA)
MESSAGE("Warning. VTKMY_WRAP_JAVA is ON but the VTK version you have chosen has not support for Java (VTK_WRAP_JAVA is OFF). Please set VTKMY_WRAP_JAVA to OFF.")
ENDIF (VTKMY_WRAP_JAVA)
IF (WRAP_JAVA)
MESSAGE("Warning. WRAP_JAVA is ON but the VTK version you have chosen has not support for Java (VTK_WRAP_JAVA is OFF). Please set WRAP_JAVA to OFF.")
ENDIF (WRAP_JAVA)
ENDIF (VTK_WRAP_JAVA)
......@@ -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 CommonTCL_SRCS)
ADD_LIBRARY (vtkmyCommonTCL SHARED CommonTCL_SRCS)
TARGET_LINK_LIBRARIES (vtkmyCommonTCL
vtkCommonTCL
${TCL_LIBRARY})
......
......@@ -25,7 +25,7 @@
#include <vtkmyConfigure.h>
#if defined(WIN32) && !defined(VTK_MY_STATIC)
#if defined(WIN32) && !defined(VTKMY_STATIC)
#if defined(vtkmyCommon_EXPORTS)
#define VTK_MY_COMMON_EXPORT __declspec( dllexport )
#else
......
......@@ -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 ImagingTCL_SRCS)
ADD_LIBRARY (vtkmyImagingTCL SHARED ImagingTCL_SRCS)
TARGET_LINK_LIBRARIES (vtkmyImagingTCL
vtkImagingTCL
vtkFilteringTCL
......
......@@ -25,7 +25,7 @@
#include <vtkmyConfigure.h>
#if defined(WIN32) && !defined(VTK_MY_STATIC)
#if defined(WIN32) && !defined(VTKMY_STATIC)
#if defined(vtkmyImaging_EXPORTS)
#define VTK_MY_IMAGING_EXPORT __declspec( dllexport )
#else
......
......@@ -20,7 +20,7 @@ What you should do:
- Build your repository.
- Add the path to your build-dir bin/ directory to your PATH environment variable, so these C++ and Tcl DLL can be found (if any).
- Add the path to your build-dir bin/ directory to your PATH environment variable (as well as LD_LIBRARY_PATH for Unix users), so these C++ and Tcl DLL can be found (if any).
- Add the path to your vtkMy/Wrapping/Tcl directory to your TCLLIBPATH environment variable. TCLLIBPATH is a space separated set of paths to Tcl libraries. Windows users should use forward slashes (/) instead of the usual backward slashes (\), and should surround the path by quotes (") if it contains any space.
......
......@@ -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 UnsortedTCL_SRCS)
ADD_LIBRARY (vtkmyUnsortedTCL SHARED UnsortedTCL_SRCS)
TARGET_LINK_LIBRARIES (vtkmyUnsortedTCL
vtkIOTCL
vtkGraphicsTCL
......
......@@ -25,7 +25,7 @@
#include <vtkmyConfigure.h>
#if defined(WIN32) && !defined(VTK_MY_STATIC)
#if defined(WIN32) && !defined(VTKMY_STATIC)
#if defined(vtkmyUnsorted_EXPORTS)
#define VTK_MY_UNSORTED_EXPORT __declspec( dllexport )
#else
......
......@@ -14,7 +14,7 @@
#define WORDS_LITTLEENDIAN
#endif
#cmakedefine BUILD_SHARED_LIBS
#ifndef BUILD_SHARED_LIBS
#define VTK_MY_STATIC
#cmakedefine VTKMY_BUILD_SHARED_LIBS
#ifndef VTKMY_BUILD_SHARED_LIBS
#define VTKMY_STATIC
#endif
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