Commit 71861a1c authored by Brad King's avatar Brad King
Browse files

ERR: Do not use separate debug/optimized linking of python libraries if they...

ERR: Do not use separate debug/optimized linking of python libraries if they are both the same library.
parent 5f1e9f7a
......@@ -656,7 +656,21 @@ IF(VTK_WRAP_PYTHON)
IF(VTK_USE_PARALLEL AND VTK_USE_MPI)
SET(PVTK_PYTHON_EXE ${EXECUTABLE_OUTPUT_PATH}/pvtkpython)
ENDIF(VTK_USE_PARALLEL AND VTK_USE_MPI)
SET(PYTHON_DEBUG_LIBRARY ${PYTHON_LIBRARY})
# Use separate debug/optimized libraries if they are different.
IF(PYTHON_DEBUG_LIBRARY)
STRING(COMPARE EQUAL "${PYTHON_DEBUG_LIBRARY}" "${PYTHON_LIBRARY}"
VTK_PYTHON_LIBRARIES_MATCH)
IF(VTK_PYTHON_LIBRARIES_MATCH)
SET(VTK_PYTHON_LIBRARIES ${PYTHON_LIBRARY})
ELSE(VTK_PYTHON_LIBRARIES_MATCH)
SET(VTK_PYTHON_LIBRARIES
optimized ${PYTHON_LIBRARY}
debug ${PYTHON_DEBUG_LIBRARY})
ENDIF(VTK_PYTHON_LIBRARIES_MATCH)
ELSE(PYTHON_DEBUG_LIBRARY)
SET(VTK_PYTHON_LIBRARIES ${PYTHON_LIBRARY})
ENDIF(PYTHON_DEBUG_LIBRARY)
ENDIF(VTK_WRAP_PYTHON)
#-----------------------------------------------------------------------------
......
......@@ -344,7 +344,8 @@ IF (VTK_WRAP_PYTHON)
IF (APPLE)
ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS} ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS}
${VTK_PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
INSTALL_TARGETS(/lib/vtk vtk${KIT}PythonD)
ELSE (APPLE)
......@@ -352,7 +353,7 @@ IF (VTK_WRAP_PYTHON)
TARGET_LINK_LIBRARIES (vtk${KIT}Python vtk${KIT} ${KIT_PYTHON_LIBS})
ENDIF(APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtk${KIT}Python ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES (vtk${KIT}Python ${VTK_PYTHON_LIBRARIES})
ENDIF(WIN32)
INSTALL_TARGETS(/lib/vtk vtk${KIT}Python)
ENDIF (VTK_WRAP_PYTHON)
......
......@@ -166,7 +166,8 @@ IF (VTK_WRAP_PYTHON)
IF (APPLE)
ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS} ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS}
${VTK_PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
INSTALL_TARGETS(/lib/vtk vtk${KIT}PythonD)
ELSE (APPLE)
......@@ -174,9 +175,7 @@ IF (VTK_WRAP_PYTHON)
TARGET_LINK_LIBRARIES (vtk${KIT}Python vtk${KIT} ${KIT_PYTHON_LIBS})
ENDIF(APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtk${KIT}Python
debug ${PYTHON_DEBUG_LIBRARY}
optimized ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES (vtk${KIT}Python ${VTK_PYTHON_LIBRARIES})
ENDIF(WIN32)
INSTALL_TARGETS(/lib/vtk vtk${KIT}Python)
ENDIF (VTK_WRAP_PYTHON)
......
......@@ -229,7 +229,8 @@ IF (VTK_WRAP_PYTHON)
IF (APPLE)
ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS} ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS}
${VTK_PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
INSTALL_TARGETS(/lib/vtk vtk${KIT}PythonD)
ELSE (APPLE)
......@@ -237,9 +238,7 @@ IF (VTK_WRAP_PYTHON)
TARGET_LINK_LIBRARIES (vtk${KIT}Python vtk${KIT} ${KIT_PYTHON_LIBS})
ENDIF(APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtk${KIT}Python
debug ${PYTHON_DEBUG_LIBRARY}
optimized ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES (vtk${KIT}Python ${VTK_PYTHON_LIBRARIES})
ENDIF(WIN32)
INSTALL_TARGETS(/lib/vtk vtk${KIT}Python)
ENDIF (VTK_WRAP_PYTHON)
......
......@@ -131,7 +131,8 @@ IF (VTK_WRAP_PYTHON)
IF (APPLE)
ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS} ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS}
${VTK_PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
INSTALL_TARGETS(/lib/vtk vtk${KIT}PythonD)
ELSE (APPLE)
......@@ -139,9 +140,7 @@ IF (VTK_WRAP_PYTHON)
TARGET_LINK_LIBRARIES (vtk${KIT}Python vtk${KIT} ${KIT_PYTHON_LIBS})
ENDIF(APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtk${KIT}Python
debug ${PYTHON_DEBUG_LIBRARY}
optimized ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES (vtk${KIT}Python ${VTK_PYTHON_LIBRARIES})
ENDIF(WIN32)
INSTALL_TARGETS(/lib/vtk vtk${KIT}Python)
ENDIF (VTK_WRAP_PYTHON)
......
......@@ -205,7 +205,8 @@ IF (VTK_WRAP_PYTHON)
IF (APPLE)
ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS} ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS}
${VTK_PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
INSTALL_TARGETS(/lib/vtk vtk${KIT}PythonD)
ELSE (APPLE)
......@@ -213,9 +214,7 @@ IF (VTK_WRAP_PYTHON)
TARGET_LINK_LIBRARIES (vtk${KIT}Python vtk${KIT} ${KIT_PYTHON_LIBS})
ENDIF(APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtk${KIT}Python
debug ${PYTHON_DEBUG_LIBRARY}
optimized ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES (vtk${KIT}Python ${VTK_PYTHON_LIBRARIES})
ENDIF(WIN32)
INSTALL_TARGETS(/lib/vtk vtk${KIT}Python)
ENDIF (VTK_WRAP_PYTHON)
......
......@@ -175,7 +175,8 @@ IF (VTK_WRAP_PYTHON)
IF (APPLE)
ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS} ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS}
${VTK_PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
INSTALL_TARGETS(/lib/vtk vtk${KIT}PythonD)
ELSE (APPLE)
......@@ -183,9 +184,7 @@ IF (VTK_WRAP_PYTHON)
TARGET_LINK_LIBRARIES (vtk${KIT}Python vtk${KIT} ${KIT_PYTHON_LIBS})
ENDIF(APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtk${KIT}Python
debug ${PYTHON_DEBUG_LIBRARY}
optimized ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES (vtk${KIT}Python ${VTK_PYTHON_LIBRARIES})
ENDIF(WIN32)
INSTALL_TARGETS(/lib/vtk vtk${KIT}Python)
ENDIF (VTK_WRAP_PYTHON)
......
......@@ -172,7 +172,8 @@ IF (VTK_WRAP_PYTHON)
IF (APPLE)
ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS} ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS}
${VTK_PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
INSTALL_TARGETS(/lib/vtk vtk${KIT}PythonD)
ELSE (APPLE)
......@@ -180,9 +181,7 @@ IF (VTK_WRAP_PYTHON)
TARGET_LINK_LIBRARIES (vtk${KIT}Python vtk${KIT} ${KIT_PYTHON_LIBS})
ENDIF(APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtk${KIT}Python
debug ${PYTHON_DEBUG_LIBRARY}
optimized ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES (vtk${KIT}Python ${VTK_PYTHON_LIBRARIES})
ENDIF(WIN32)
INSTALL_TARGETS(/lib/vtk vtk${KIT}Python)
ENDIF (VTK_WRAP_PYTHON)
......
......@@ -78,7 +78,8 @@ IF (VTK_WRAP_PYTHON)
IF (APPLE)
ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS} ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS}
${VTK_PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
INSTALL_TARGETS(/lib/vtk vtk${KIT}PythonD)
ELSE (APPLE)
......@@ -86,9 +87,7 @@ IF (VTK_WRAP_PYTHON)
TARGET_LINK_LIBRARIES (vtk${KIT}Python vtk${KIT} ${KIT_PYTHON_LIBS})
ENDIF(APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtk${KIT}Python
debug ${PYTHON_DEBUG_LIBRARY}
optimized ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES (vtk${KIT}Python ${VTK_PYTHON_LIBRARIES})
ENDIF(WIN32)
INSTALL_TARGETS(/lib/vtk vtk${KIT}Python)
ENDIF (VTK_WRAP_PYTHON)
......
......@@ -388,7 +388,8 @@ IF (VTK_WRAP_PYTHON)
IF (APPLE)
ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS} ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS}
${VTK_PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
INSTALL_TARGETS(/lib/vtk vtk${KIT}PythonD)
ELSE (APPLE)
......@@ -396,9 +397,7 @@ IF (VTK_WRAP_PYTHON)
TARGET_LINK_LIBRARIES (vtk${KIT}Python vtk${KIT} ${KIT_PYTHON_LIBS})
ENDIF(APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtk${KIT}Python
debug ${PYTHON_DEBUG_LIBRARY}
optimized ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES (vtk${KIT}Python ${VTK_PYTHON_LIBRARIES})
ENDIF(WIN32)
INSTALL_TARGETS(/lib/vtk vtk${KIT}Python)
ENDIF (VTK_WRAP_PYTHON)
......
Markdown is supported
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