Commit d0c86c4e authored by saubatn's avatar saubatn

FEATURE 144 Add VTK Include directories in CMake configuration to wrapp classes using VTK.

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@1199 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 434b0d15
......@@ -52,6 +52,7 @@ add_subdirectory(libraries)
# message(WARNING "QT_INCLUDE_DIR = ${QT_INCLUDE_DIR}")
# message(WARNING "QT_QTCORE_INCLUDE_DIR = ${QT_QTCORE_INCLUDE_DIR}")
# message(WARNING "SHIBOKEN_CAMITK_SDK_PATH = ${SHIBOKEN_CAMITK_SDK_PATH}")
# message(WARNING "VTK_INCLUDE_DIRS = ${VTK_INCLUDE_DIRS}")
#--------------------------------------------
#
......@@ -74,10 +75,12 @@ set(PYSIDE_INCLUDE_ALL_DIR_SHIBOKEN
# For each of them, it create a CPython C++ decorated class in the build directory
add_custom_target( sdk_wrap_to_python
# OUTPUT ${lib_python_SRC}
COMMAND ${CMAKE_COMMAND} -E echo "Cleaning C++ classes generated from previous wrapping."
COMMAND ${CMAKE_COMMAND} -E remove_directory camitk_sdk
COMMAND ${CMAKE_COMMAND} -E echo "Wrapping CamiTK SDK for Python exposure."
COMMAND ${CAMITK_BINDING_PYTHON_GENERATOR} --enable-parent-ctor-heuristic --enable-return-value-heuristic --enable-pyside-extensions --debug-level=full
COMMAND ${CAMITK_BINDING_PYTHON_GENERATOR} --enable-parent-ctor-heuristic --enable-return-value-heuristic --enable-pyside-extensions #--debug-level=full
${CMAKE_CURRENT_SOURCE_DIR}/global_sdk.h
--include-paths=${PYSIDE_INCLUDE_ALL_DIR_SHIBOKEN}:${QT_INCLUDE_DIR}:${QT_QTCORE_INCLUDE_DIR}:${SHIBOKEN_GLOBAL_H_PATH}:${SHIBOKEN_CAMITK_SDK_PATH}
--include-paths=${PYSIDE_INCLUDE_ALL_DIR_SHIBOKEN}:${QT_INCLUDE_DIR}:${QT_QTCORE_INCLUDE_DIR}:${SHIBOKEN_GLOBAL_H_PATH}:${SHIBOKEN_CAMITK_SDK_PATH}:${VTK_INCLUDE_DIRS}
--typesystem-paths=${PYSIDE_TYPESYSTEMS}:${SHIBOKEN_TYPESYSTEM_PATH}
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/typesystem_sdk.xml
......@@ -106,9 +109,10 @@ if(NOT SDK_WRAPPED_CLASSES STREQUAL "") # only create camitk_sdk target if camit
# Qt libraries dependencies
set(QT_LIBRARIES "${QT_QTCORE_LIBRARY};${QT_QTGUI_LIBRARY}")
# message(WARNING "QT_LIBRARIES = ${QT_LIBRARIES}")
set(CAMITK_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/../sdk/libraries/core) #build directories required for ui wrapping includes !
include_directories(${PROJECT_NAME} ${CAMITK_SDK_INCLUDE_DIR} ${PYSIDE_INCLUDE_ALL_DIR} ${SHIBOKEN_INCLUDE_DIR} ${PYTHON_INCLUDE_PATH} ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${VTK_INCLUDE_DIRS})
add_library(${PROJECT_NAME} SHARED ${SDK_WRAPPED_CLASSES}) # TODO test if SHARED library type generation works
include_directories(${PROJECT_NAME} ${CAMITK_SDK_INCLUDE_DIR} ${PYSIDE_INCLUDE_ALL_DIR} ${SHIBOKEN_INCLUDE_DIR} ${PYTHON_INCLUDE_PATH} ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${VTK_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ${CAMITK_BUILD_DIR})
add_library(${PROJECT_NAME} SHARED ${SDK_WRAPPED_CLASSES})
# # set_property(TARGET ${PROJECT_NAME} PROPERTY PREFIX "")
set_property(TARGET ${PROJECT_NAME} PROPERTY PREFIX "")
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} ${VTK_LIBRARIES} ${PYSIDE_LIBRARY} ${SHIBOKEN_PYTHON_LIBRARIES} ${SHIBOKEN_LIBRARY} ${CAMITK_SDK_LIBRARIES})
......
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