4 cmake_minimum_required (VERSION 2.6)
7 # Disable cleaning of custom command outputs to preserve the hacks
8 # used to generate the files using CONFIGURE_FILE.
9 SET_DIRECTORY_PROPERTIES(PROPERTIES CLEAN_NO_CUSTOM 1)
14 SET (LIBRARY_OUTPUT_PATH
15 ${Wrapping_BINARY_DIR}/bin/ CACHE INTERNAL
16 "Single output directory for building all libraries.")
18 SET (EXECUTABLE_OUTPUT_PATH
19 ${Wrapping_BINARY_DIR}/bin/ CACHE INTERNAL
20 "Single output directory for building all executables.")
23 # Where will executable tests be written ?
25 IF (EXECUTABLE_OUTPUT_PATH)
26 SET (CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH})
27 ELSE (EXECUTABLE_OUTPUT_PATH)
29 ENDIF (EXECUTABLE_OUTPUT_PATH)
34 ADD_EXECUTABLE (wrapping wrapping.cxx)
36 ADD_EXECUTABLE (Wrap Wrap.c)
40 SET(WRAP ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/Wrap${EXE_EXT})
46 SET (QT_WRAP_CPP "On")
47 SET (QT_MOC_EXE "echo")
50 IF (QT_FOUND AND QT_WRAP_UI)
51 message("found qt 3 test it...")
52 INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} )
53 INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )
56 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/foo.ui.in
57 ${CMAKE_CURRENT_BINARY_DIR}/foo.ui IMMEDIATE)
60 SET (QT_UIC_EXE "${QT_UIC_EXECUTABLE}")
65 ${CMAKE_CURRENT_BINARY_DIR}/foo.ui
67 QT_WRAP_UI (myqtlib QTUI_H_SRCS QTUI_S_SRCS ${QTUI_SRCS})
68 QT_WRAP_CPP (myqtlib QT_MOC_SRCS ${SRCS} vtkTestMoc.h)
70 MESSAGE("QT files are ${QTUI_S_SRCS}")
71 MESSAGE("QT other files are ${QTUI_H_SRCS}")
72 ADD_DEFINITIONS(${QT_DEFINITIONS})
73 ADD_LIBRARY(myqtlib ${QTUI_S_SRCS} ${QT_MOC_SRCS})
74 ADD_EXECUTABLE (qtwrapping qtwrappingmain.cxx)
75 TARGET_LINK_LIBRARIES(qtwrapping myqtlib)
77 TARGET_LINK_LIBRARIES( qtwrapping ${QT_LIBRARIES} )
78 ELSE (QT_FOUND AND QT_WRAP_UI)
79 ADD_EXECUTABLE (qtwrapping qtnoqtmain.cxx)
80 ENDIF (QT_FOUND AND QT_WRAP_UI)
85 # Since FLTK_FLUID_EXE is supposed to create a .cxx/.h from a .fl/.fld,
86 # create an empty one so that the dependencies can be met.
91 ADD_EXECUTABLE(fakefluid fakefluid.cxx)
92 GET_TARGET_PROPERTY(FLUID_LOC fakefluid LOCATION)
93 SET (FLTK_WRAP_UI "On")
94 SET (FLTK_FLUID_EXECUTABLE "${FLUID_LOC}")
95 FLTK_WRAP_UI (wraplibFLTK ${FLTK_SRCS})
96 ADD_LIBRARY(wraplibFLTK ${wraplibFLTK_FLTK_UI_SRCS})
97 ADD_DEPENDENCIES(wraplibFLTK fakefluid)
98 ADD_DEPENDENCIES(fakefluid Wrap)
103 ${Wrapping_SOURCE_DIR}/dummy
104 ${Wrapping_BINARY_DIR}/gl.h
106 USE_MANGLED_MESA (${Wrapping_BINARY_DIR} ${Wrapping_BINARY_DIR}/mangled_mesa)