Changeset 135 in pacpusframework


Ignore:
Timestamp:
Jul 30, 2013, 3:15:25 PM (11 years ago)
Author:
Marek Kurdej
Message:

Update: minor formatting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0-beta1/cmake/PacpusUtilities.cmake

    r134 r135  
    88#################################################
    99
    10 
    11 # TODO  Compatibility macro
    1210## ========================================
    1311## Qt macro compatibility Qt4 / Qt5
    1412## ========================================
    1513function(qt_wrap_cpp OUT_MOC_SRCS FILES_TO_MOC)
    16 
    17     if(QT4_FOUNDED)
     14    if(QT4_FOUND)
    1815        qt4_wrap_cpp(MOC_SRCS ${FILES_TO_MOC})
    19 
    2016    elseif(Qt5Core_FOUND)
    2117        qt5_wrap_cpp(MOC_SRCS ${FILES_TO_MOC})
    22 
    2318    else()
    2419        message(WARNING "QT not found, can't wrap moc File")
     
    2621
    2722    set(${OUT_MOC_SRCS} ${MOC_SRCS} PARENT_SCOPE)
    28 
    2923endfunction(qt_wrap_cpp)
    3024
     
    3529    if(QT4_FOUND)
    3630        qt4_wrap_ui( UI_SRCS ${UI_FILES})
    37 
    3831    elseif(Qt5Core_FOUND)
    3932        qt5_wrap_ui( UI_SRCS ${UI_FILES})
    40 
    4133    else()
    4234        message(WARNING "QT not found, can't wrap ui File")
     
    4436
    4537    set(${OUT_UI_SRCS} ${UI_SRCS} PARENT_SCOPE)
    46 
    4738endfunction()
    4839
     
    5142# ========================================
    5243function(PACPUS_PLUGIN OUT_CPP OUT_H PLUGIN_NAME)
    53 
    5444    if(QT4_FOUND)
    5545        pacpus_plugin_qt4(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} )
    56         #message("Create QT4 Plugin")
    57 
    5846    elseif(Qt5Core_FOUND)
    5947        pacpus_plugin_qt5(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} )
    60 
    6148    else()
    6249        message(WARNING "QT not found, can't create Plugin")
     
    6552    set(${OUT_CPP} ${PLUGIN_CPP} PARENT_SCOPE)
    6653    set(${OUT_H} ${PLUGIN_H} PARENT_SCOPE)
    67 
    6854endfunction(PACPUS_PLUGIN)
    6955
     
    7258# ========================================
    7359function(PACPUS_PLUGIN_QT4 OUT_CPP OUT_H PLUGIN_NAME)
    74 
    7560    set(PLUGIN_NAME ${PLUGIN_NAME}Plugin)
    7661    set(${OUT_CPP} ${PLUGIN_NAME}.cpp PARENT_SCOPE)
     
    139124# ========================================
    140125function(PACPUS_PLUGIN_QT5 OUT_CPP OUT_H PLUGIN_NAME)
    141 
    142126    set(PLUGIN_NAME ${PLUGIN_NAME}Plugin)
    143127    set(${OUT_CPP} ${PLUGIN_NAME}.cpp ${PLUGIN_NAME}.json PARENT_SCOPE)
     
    166150        "    Q_OBJECT\n"
    167151        "    //Qt5 Plugins Macro\n"
    168         "    Q_PLUGIN_METADATA(IID \"papus." ${PLUGIN_NAME} "\" FILE \"" ${PLUGIN_NAME} ".json\")\n"
     152        "    Q_PLUGIN_METADATA(IID \"pacpus." ${PLUGIN_NAME} "\" FILE \"" ${PLUGIN_NAME} ".json\")\n"
    169153        "    Q_INTERFACES(PacpusPluginInterface)\n"   
    170154        "\n"
     
    208192        "    \"Keys\": [\""${PLUGIN_NAME} "\"]\n"
    209193        "}\n"
    210         )
     194    )
    211195endfunction(PACPUS_PLUGIN_QT5)
    212196
Note: See TracChangeset for help on using the changeset viewer.