2002-01-20 05:24:55 +03:00
|
|
|
#
|
|
|
|
# Wrapping
|
|
|
|
#
|
|
|
|
PROJECT (Wrapping)
|
|
|
|
|
2005-02-09 19:40:01 +03:00
|
|
|
# Disable cleaning of custom command outputs to preserve the hacks
|
|
|
|
# used to generate the files using CONFIGURE_FILE.
|
|
|
|
SET_DIRECTORY_PROPERTIES(PROPERTIES CLEAN_NO_CUSTOM 1)
|
|
|
|
|
2002-01-20 05:24:55 +03:00
|
|
|
#
|
|
|
|
# Lib and exe path
|
|
|
|
#
|
|
|
|
SET (LIBRARY_OUTPUT_PATH
|
2006-01-02 23:01:43 +03:00
|
|
|
${Wrapping_BINARY_DIR}/bin/ CACHE INTERNAL
|
2003-07-30 21:28:32 +04:00
|
|
|
"Single output directory for building all libraries.")
|
2002-01-20 05:24:55 +03:00
|
|
|
|
|
|
|
SET (EXECUTABLE_OUTPUT_PATH
|
2006-01-02 23:01:43 +03:00
|
|
|
${Wrapping_BINARY_DIR}/bin/ CACHE INTERNAL
|
2003-07-30 21:28:32 +04:00
|
|
|
"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 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")
|
2005-09-12 17:32:21 +04:00
|
|
|
INCLUDE( FindQt3 )
|
2002-09-12 21:20:05 +04:00
|
|
|
|
2006-11-22 22:22:43 +03:00
|
|
|
IF (QT_FOUND AND QT_WRAP_UI)
|
2006-11-22 21:30:59 +03:00
|
|
|
message("found qt 3 test it...")
|
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
|
|
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/foo.ui.in
|
2003-09-25 01:51:13 +04:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/foo.ui IMMEDIATE)
|
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}")
|
2003-09-25 01:51:13 +04:00
|
|
|
|
|
|
|
|
2003-07-30 21:28:32 +04:00
|
|
|
SET (QTUI_SRCS
|
|
|
|
qtwrapping.ui
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/foo.ui
|
|
|
|
)
|
2003-09-25 01:51:13 +04:00
|
|
|
QT_WRAP_UI (myqtlib QTUI_H_SRCS QTUI_S_SRCS ${QTUI_SRCS})
|
2004-01-05 19:13:50 +03:00
|
|
|
QT_WRAP_CPP (myqtlib QT_MOC_SRCS ${SRCS} vtkTestMoc.h)
|
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-07 22:37:35 +04:00
|
|
|
MESSAGE("QT other files are ${QTUI_H_SRCS}")
|
2003-08-02 03:13:38 +04:00
|
|
|
ADD_DEFINITIONS(${QT_DEFINITIONS})
|
2003-09-25 01:51:13 +04:00
|
|
|
ADD_LIBRARY(myqtlib ${QTUI_S_SRCS} ${QT_MOC_SRCS})
|
|
|
|
ADD_EXECUTABLE (qtwrapping qtwrappingmain.cxx)
|
|
|
|
TARGET_LINK_LIBRARIES(qtwrapping myqtlib)
|
2002-01-20 09:06:09 +03:00
|
|
|
|
2003-08-01 17:18:43 +04:00
|
|
|
TARGET_LINK_LIBRARIES( qtwrapping ${QT_LIBRARIES} )
|
2007-11-02 17:46:03 +03:00
|
|
|
ELSE (QT_FOUND AND QT_WRAP_UI)
|
|
|
|
ADD_EXECUTABLE (qtwrapping qtnoqtmain.cxx)
|
2006-11-22 22:22:43 +03:00
|
|
|
ENDIF (QT_FOUND AND QT_WRAP_UI)
|
2002-09-12 21:20:05 +04:00
|
|
|
|
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
|
|
|
)
|
2006-01-09 22:40:31 +03:00
|
|
|
ADD_EXECUTABLE(fakefluid fakefluid.cxx)
|
|
|
|
GET_TARGET_PROPERTY(FLUID_LOC fakefluid LOCATION)
|
2002-01-20 09:06:09 +03:00
|
|
|
SET (FLTK_WRAP_UI "On")
|
2006-01-09 22:40:31 +03:00
|
|
|
SET (FLTK_FLUID_EXECUTABLE "${FLUID_LOC}")
|
2005-06-08 22:11:25 +04:00
|
|
|
FLTK_WRAP_UI (wraplibFLTK ${FLTK_SRCS})
|
2005-06-10 18:09:39 +04:00
|
|
|
ADD_LIBRARY(wraplibFLTK ${wraplibFLTK_FLTK_UI_SRCS})
|
2006-01-09 22:40:31 +03:00
|
|
|
ADD_DEPENDENCIES(wraplibFLTK fakefluid)
|
|
|
|
ADD_DEPENDENCIES(fakefluid Wrap)
|
2002-01-20 09:06:09 +03:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|