Subversion Repositories Scribus

Rev

Rev 5735 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5138 cbradney 1
#Based on QT4_QRAP_UI/CPP from cmake 2.3.4
2
  MACRO(SCRIBUS_QT_WRAP_UI outfiles )
3
 
4
    FOREACH(it ${ARGN})
5
      GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
6
      SET(infile ${CMAKE_CURRENT_SOURCE_DIR}/${it})
7
      SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
8
      ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
9
        COMMAND ${QT_UIC_EXECUTABLE}
10
        ARGS -o ${outfile} ${infile}
11
        MAIN_DEPENDENCY ${infile})
12
      SET(${outfiles} ${${outfiles}} ${outfile})
13
    ENDFOREACH(it)
14
 
15
  ENDMACRO(SCRIBUS_QT_WRAP_UI)
16
 
17
  MACRO(SCRIBUS_QT_WRAP_CPP outfiles )
18
 
19
    # get include dirs
20
    GET_DIRECTORY_PROPERTY(moc_includes_tmp INCLUDE_DIRECTORIES)
21
    SET(moc_includes)
22
    #FOREACH(it ${moc_includes_tmp})
23
    #  SET(moc_includes ${moc_includes} "-I${it}")
24
    #ENDFOREACH(it)
25
 
26
    FOREACH(it ${ARGN})
27
      GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
28
 
29
      SET(infile ${CMAKE_CURRENT_SOURCE_DIR}/${it})
30
      SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/${outfile}.moc)
31
      ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
32
        COMMAND ${QT_MOC_EXECUTABLE}
33
#         ARGS ${moc_includes} -o ${outfile} ${infile}
34
          ARGS -o ${outfile} ${infile}
35
        MAIN_DEPENDENCY ${infile})
36
      SET(${outfiles} ${${outfiles}} ${outfile})
37
    ENDFOREACH(it)
38
 
39
  ENDMACRO(SCRIBUS_QT_WRAP_CPP)