2002-01-20 05:24:55 +03:00
|
|
|
#
|
|
|
|
# Wrapping
|
|
|
|
#
|
|
|
|
PROJECT (Wrapping)
|
|
|
|
|
|
|
|
#
|
|
|
|
# Lib and exe path
|
|
|
|
#
|
|
|
|
SET (LIBRARY_OUTPUT_PATH
|
2003-07-30 21:28:32 +04:00
|
|
|
${Wrapping_BINARY_DIR}/bin/ CACHE PATH
|
|
|
|
"Single output directory for building all libraries.")
|
2002-01-20 05:24:55 +03:00
|
|
|
|
|
|
|
SET (EXECUTABLE_OUTPUT_PATH
|
2003-07-30 21:28:32 +04:00
|
|
|
${Wrapping_BINARY_DIR}/bin/ CACHE PATH
|
|
|
|
"Single output directory for building all executables.")
|
2002-01-20 05:24:55 +03:00
|
|
|
|
|
|
|
#
|
|
|
|
# Where will executable tests be written ?
|
|
|
|
#
|
|
|
|
IF (EXECUTABLE_OUTPUT_PATH)
|
|
|
|
SET (CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH})
|
|
|
|
ELSE (EXECUTABLE_OUTPUT_PATH)
|
|
|
|
SET (CXX_TEST_PATH .)
|
|
|
|
ENDIF (EXECUTABLE_OUTPUT_PATH)
|
|
|
|
|
2002-01-20 08:11:19 +03:00
|
|
|
#
|
|
|
|
# Add exe
|
|
|
|
#
|
|
|
|
ADD_EXECUTABLE (wrapping wrapping.cxx)
|
2002-01-20 05:24:55 +03:00
|
|
|
|
2003-07-30 21:11:04 +04:00
|
|
|
ADD_EXECUTABLE (Wrap Wrap.c)
|
2003-07-31 16:50:21 +04:00
|
|
|
IF(WIN32)
|
|
|
|
SET(EXE_EXT ".exe")
|
|
|
|
ENDIF(WIN32)
|
|
|
|
SET(WRAP ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/Wrap${EXE_EXT})
|
2003-07-30 21:11:04 +04:00
|
|
|
|
2002-01-20 05:24:55 +03:00
|
|
|
#
|
2002-01-20 08:11:19 +03:00
|
|
|
# Test VTK wrappers
|
|
|
|
#
|
2002-12-12 16:42:33 +03:00
|
|
|
SET (SRCS
|
2002-01-20 08:11:19 +03:00
|
|
|
vtkExcluded
|
|
|
|
vtkIncluded
|
2003-07-30 21:28:32 +04:00
|
|
|
)
|
2002-01-20 08:11:19 +03:00
|
|
|
|
|
|
|
WRAP_EXCLUDE_FILES (
|
|
|
|
vtkExcluded
|
2003-07-30 21:28:32 +04:00
|
|
|
)
|
2002-01-20 08:11:19 +03:00
|
|
|
|
|
|
|
#
|
|
|
|
# Specify (empty) VTK hint files
|
|
|
|
#
|
|
|
|
FIND_FILE(VTK_WRAP_HINTS hints ${Wrapping_SOURCE_DIR})
|
|
|
|
|
|
|
|
#
|
|
|
|
# Wrap VTK -> Tcl
|
|
|
|
#
|
|
|
|
SET (VTK_WRAP_TCL "On")
|
2003-07-30 21:11:04 +04:00
|
|
|
SET (VTK_WRAP_TCL_EXE "${WRAP}")
|
2002-01-20 08:11:19 +03:00
|
|
|
VTK_WRAP_TCL (wraplibTCL TCL_SRCS SRCS)
|
2003-06-04 18:46:18 +04:00
|
|
|
ADD_CUSTOM_TARGET(wraplibTCL ALL
|
2003-07-30 21:28:32 +04:00
|
|
|
${CMAKE_COMMAND} -E echo "dummy target"
|
|
|
|
)
|
2002-01-20 08:11:19 +03:00
|
|
|
|
|
|
|
#
|
|
|
|
# Wrap VTK -> Python
|
|
|
|
#
|
|
|
|
SET (VTK_WRAP_PYTHON "On")
|
2003-07-30 21:11:04 +04:00
|
|
|
SET (VTK_WRAP_PYTHON_EXE "${WRAP}")
|
2002-01-20 08:11:19 +03:00
|
|
|
VTK_WRAP_PYTHON (wraplibPython Python_SRCS SRCS)
|
2003-06-04 18:46:18 +04:00
|
|
|
ADD_CUSTOM_TARGET(wraplibPython ALL
|
2003-07-30 21:28:32 +04:00
|
|
|
${CMAKE_COMMAND} -E echo "dummy target"
|
|
|
|
)
|
2002-01-20 08:11:19 +03:00
|
|
|
|
|
|
|
#
|
|
|
|
# Wrap VTK -> Java
|
|
|
|
#
|
|
|
|
# VTK_WRAP_JAVA puts dependencie between wraplibJavaJavaClasses (in ALL)
|
2002-02-13 01:38:41 +03:00
|
|
|
# and each Java wrapped class (here, vtkIncluded, so let's create a dummy one
|
|
|
|
# so that the build succeeds.
|
2002-01-20 05:24:55 +03:00
|
|
|
#
|
2002-01-20 08:11:19 +03:00
|
|
|
SET (VTK_WRAP_JAVA "On")
|
2003-07-30 21:11:04 +04:00
|
|
|
SET (VTK_WRAP_JAVA_EXE "${WRAP}")
|
|
|
|
SET (VTK_PARSE_JAVA_EXE "${WRAP}")
|
2002-02-13 01:38:41 +03:00
|
|
|
SET (VTK_JAVA_HOME "${Wrapping_BINARY_DIR}/java")
|
2002-01-20 08:11:19 +03:00
|
|
|
VTK_WRAP_JAVA (wraplibJava Java_SRCS SRCS)
|
2002-02-13 01:38:41 +03:00
|
|
|
CONFIGURE_FILE(
|
|
|
|
${Wrapping_SOURCE_DIR}/dummy
|
|
|
|
${VTK_JAVA_HOME}/vtkIncluded.java
|
|
|
|
COPYONLY IMMEDIATE)
|
2003-06-04 18:46:18 +04:00
|
|
|
ADD_CUSTOM_TARGET(wraplibJava ALL
|
2003-07-30 21:28:32 +04:00
|
|
|
${CMAKE_COMMAND} -E echo "dummy target"
|
|
|
|
)
|
2002-01-20 05:24:55 +03:00
|
|
|
|
2002-01-20 09:06:09 +03:00
|
|
|
#
|
|
|
|
# QT Wrappers
|
|
|
|
#
|
2002-09-12 00:41:46 +04:00
|
|
|
|
2002-09-12 19:37:16 +04:00
|
|
|
SET (QT_WRAP_CPP "On")
|
|
|
|
SET (QT_MOC_EXE "echo")
|
|
|
|
|
2002-09-12 21:20:05 +04:00
|
|
|
INCLUDE( ${CMAKE_ROOT}/Modules/FindQt.cmake )
|
|
|
|
|
|
|
|
IF (QT_FOUND)
|
|
|
|
|
2003-07-30 21:28:32 +04:00
|
|
|
INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} )
|
|
|
|
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )
|
2002-09-12 21:20:05 +04:00
|
|
|
|
2002-09-12 00:41:46 +04:00
|
|
|
|
2003-07-30 21:28:32 +04:00
|
|
|
QT_WRAP_CPP (wraplibQT QT_SRCS SRCS)
|
|
|
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/foo.ui.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/foo.ui)
|
2002-09-12 00:41:46 +04:00
|
|
|
|
2003-07-30 21:28:32 +04:00
|
|
|
SET (QT_WRAP_UI "On")
|
|
|
|
SET (QT_UIC_EXE "${QT_UIC_EXECUTABLE}")
|
|
|
|
SET (QTUI_SRCS
|
|
|
|
qtwrapping.ui
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/foo.ui
|
|
|
|
)
|
|
|
|
QT_WRAP_UI (qtwrapping QTUI_H_SRCS QTUI_S_SRCS QTUI_SRCS)
|
2002-01-20 09:06:09 +03:00
|
|
|
|
2003-08-02 02:52:57 +04:00
|
|
|
MESSAGE("QT files are ${QTUI_S_SRCS}")
|
2003-08-02 03:13:38 +04:00
|
|
|
ADD_DEFINITIONS(${QT_DEFINITIONS})
|
2003-07-30 21:28:32 +04:00
|
|
|
ADD_EXECUTABLE (qtwrapping qtwrappingmain.cxx QTUI_S_SRCS)
|
2002-01-20 09:06:09 +03:00
|
|
|
|
2003-08-01 17:18:43 +04:00
|
|
|
TARGET_LINK_LIBRARIES( qtwrapping ${QT_LIBRARIES} )
|
2002-09-12 21:20:05 +04:00
|
|
|
ENDIF (QT_FOUND)
|
|
|
|
|
2002-01-20 09:06:09 +03:00
|
|
|
#
|
|
|
|
# FLTK Wrappers
|
|
|
|
#
|
|
|
|
# Since FLTK_FLUID_EXE is supposed to create a .cxx/.h from a .fl/.fld,
|
|
|
|
# create an empty one so that the dependencies can be met.
|
|
|
|
#
|
2002-12-12 16:42:33 +03:00
|
|
|
SET (FLTK_SRCS
|
2002-01-20 09:06:09 +03:00
|
|
|
fltk1.fl
|
2003-07-30 21:28:32 +04:00
|
|
|
)
|
2002-01-20 09:06:09 +03:00
|
|
|
SET (FLTK_WRAP_UI "On")
|
2002-09-04 19:17:26 +04:00
|
|
|
SET (FLTK_FLUID_EXECUTABLE "echo")
|
2002-01-20 09:06:09 +03:00
|
|
|
FLTK_WRAP_UI (wraplibFLTK FLTK_SRCS)
|
|
|
|
ADD_LIBRARY (wraplibFLTK)
|
|
|
|
CONFIGURE_FILE(
|
|
|
|
${Wrapping_SOURCE_DIR}/fltk1.fl
|
|
|
|
${Wrapping_BINARY_DIR}/fltk1.cxx
|
|
|
|
COPYONLY)
|
|
|
|
|
|
|
|
#
|
|
|
|
# Mangled Mesa
|
|
|
|
#
|
2002-03-26 22:42:10 +03:00
|
|
|
CONFIGURE_FILE(
|
|
|
|
${Wrapping_SOURCE_DIR}/dummy
|
|
|
|
${Wrapping_BINARY_DIR}/gl.h
|
|
|
|
COPYONLY IMMEDIATE)
|
2002-03-26 22:41:33 +03:00
|
|
|
USE_MANGLED_MESA (${Wrapping_BINARY_DIR} ${Wrapping_BINARY_DIR}/mangled_mesa)
|
2002-01-20 09:06:09 +03:00
|
|
|
|
2002-01-21 23:30:19 +03:00
|
|
|
#
|
|
|
|
# Instantiator
|
|
|
|
#
|
|
|
|
VTK_MAKE_INSTANTIATOR(vtkWraplibInstantiator
|
2003-07-30 21:28:32 +04:00
|
|
|
Instantiator_SRCS
|
|
|
|
SRCS
|
|
|
|
EXPORT_MACRO VTK_WRAPLIB_EXPORT
|
|
|
|
HEADER_LOCATION ${Wrapping_BINARY_DIR}
|
|
|
|
GROUP_SIZE 5)
|
2002-05-09 01:45:56 +04:00
|
|
|
|
|
|
|
#
|
|
|
|
# ITK Tcl Wrapping
|
|
|
|
#
|
|
|
|
SET(CABLE "echo")
|
|
|
|
SET(CABLE_INCLUDE_DIR ${Wrapping_SOURCE_DIR})
|
|
|
|
ADD_LIBRARY(wrapITK)
|
|
|
|
ITK_WRAP_TCL(wrapITK itkWrapperConfig.cxx)
|
|
|
|
CONFIGURE_FILE(${Wrapping_SOURCE_DIR}/itkWrapperConfig.cxx
|
2003-07-30 21:28:32 +04:00
|
|
|
${Wrapping_BINARY_DIR}/itkWrapperConfig_tcl.cxx
|
|
|
|
COPYONLY IMMEDIATE)
|