Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Library depending on debug build of PythonQt will link against correc…
…t python library

Since CTK now depends on the 'patched-2' branch of PythonQt, this is
required to ensure the _DEBUG macro will be undefined
within PythonQtPythonInclude.h. By undefining _DEBUG, both PythonQt or any
library linking against it can successfully link against release
python library.

See https://github.com/commontk/PythonQt/blob/6366f002a93aa238c55f58de949d09c552cda5a9/src/PythonQtPythonInclude.h#L62

This will fix error like the following:

19>3>5>Generating moc_ctkVTKConnection.cxx
19>3>4>LINK : fatal error LNK1104: cannot open file 'python26_d.lib'

See issue commontk#203
  • Loading branch information
jcfr committed Jul 20, 2012
1 parent 0cbd451 commit 7780507
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Utilities/CMake/FindPythonQt.cmake
Expand Up @@ -25,6 +25,9 @@ endif()

set(PYTHONQT_FOUND 0)
if(PYTHONQT_INCLUDE_DIR AND PYTHONQT_LIBRARY)
# Currently CMake'ified PythonQt only supports building against a python Release build.
# This applies independently of CTK build type (Release, Debug, ...)
add_definitions(-DPYTHONQT_USE_RELEASE_PYTHON_FALLBACK)
set(PYTHONQT_FOUND 1)
set(PYTHONQT_LIBRARIES ${PYTHONQT_LIBRARY} ${PYTHONQT_LIBUTIL})
endif()

0 comments on commit 7780507

Please sign in to comment.