QTfrontend/CMakeLists.txt
branchhedgeroid
changeset 6224 42b256eca362
parent 6223 cc3eb9b7230f
child 6441 9e5a3b2a3c38
equal deleted inserted replaced
6055:88cfcd9161d3 6224:42b256eca362
    12 
    12 
    13 find_package(Qt4 REQUIRED)
    13 find_package(Qt4 REQUIRED)
    14 include(${QT_USE_FILE})
    14 include(${QT_USE_FILE})
    15 
    15 
    16 # Check if we need zlib
    16 # Check if we need zlib
    17 check_library_exists(${QT_QTCORE_LIBRARY} inflateInit2_ ${QT_LIBRARY_DIR} QT_PROVIDES_ZLIB_FUNCTIONS)
    17 check_library_exists("${QT_QTCORE_LIBRARY}" inflateInit2_ ${QT_LIBRARY_DIR} QT_PROVIDES_ZLIB_FUNCTIONS)
    18 
    18 
    19 if(NOT QT_PROVIDES_ZLIB_FUNCTIONS)
    19 if(NOT QT_PROVIDES_ZLIB_FUNCTIONS)
    20     find_package(ZLIB REQUIRED)
    20     find_package(ZLIB REQUIRED)
    21 
    21 
    22     set(HW_LINK_LIBS ${ZLIB_LIBRARIES} ${HW_LINK_LIBS})
    22     set(HW_LINK_LIBS ${ZLIB_LIBRARIES} ${HW_LINK_LIBS})
    26 # Configure for SDL
    26 # Configure for SDL
    27 find_package(SDL REQUIRED)
    27 find_package(SDL REQUIRED)
    28 find_package(SDL_mixer REQUIRED)
    28 find_package(SDL_mixer REQUIRED)
    29 
    29 
    30 include_directories(.)
    30 include_directories(.)
       
    31 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/model)
       
    32 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/net)
       
    33 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ui)
       
    34 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ui/dialog)
       
    35 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ui/page)
       
    36 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ui/widget)
       
    37 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/util)
    31 include_directories(${SDL_INCLUDE_DIR})
    38 include_directories(${SDL_INCLUDE_DIR})
    32 include_directories(${SDLMIXER_INCLUDE_DIR})
    39 include_directories(${SDLMIXER_INCLUDE_DIR})
    33 include_directories(${CMAKE_SOURCE_DIR}/misc/quazip)
    40 include_directories(${CMAKE_SOURCE_DIR}/misc/quazip)
    34 if(UNIX)
    41 if(UNIX)
    35     # HACK: in freebsd cannot find iconv.h included via SDL.h
    42     # HACK: in freebsd cannot find iconv.h included via SDL.h
    55 endif()
    62 endif()
    56 
    63 
    57 
    64 
    58 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/hwconsts.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp)
    65 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/hwconsts.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp)
    59 
    66 
       
    67 file(GLOB NetCpp net/*.cpp)
       
    68 file(GLOB ModelCpp model/*.cpp)
       
    69 file(GLOB_RECURSE UIcpp ui/*.cpp)
       
    70 file(GLOB UtilCpp util/*.cpp)
       
    71 
    60 set(hwfr_src
    72 set(hwfr_src
       
    73     ${ModelCpp}
       
    74     ${NetCpp}
       
    75     ${UIcpp}
       
    76     ${UtilCpp}
       
    77     achievements.cpp
       
    78     binds.cpp
       
    79     drawmapscene.cpp
       
    80     game.cpp
       
    81     gameuiconfig.cpp
    61     HWApplication.cpp
    82     HWApplication.cpp
    62     game.cpp
    83     hwform.cpp
    63     main.cpp
    84     main.cpp
    64     hwform.cpp
       
    65     team.cpp
    85     team.cpp
    66     namegen.cpp
       
    67     teamselect.cpp
       
    68     teamselhelper.cpp
       
    69     frameTeam.cpp
       
    70     vertScrollArea.cpp
       
    71     gameuiconfig.cpp
       
    72     ui_hwform.cpp
    86     ui_hwform.cpp
    73     gamecfgwidget.cpp
       
    74     pagemain.cpp
       
    75     pageeditteam.cpp
       
    76     pagemultiplayer.cpp
       
    77     pageoptions.cpp
       
    78     pagenet.cpp
       
    79     pagenetserver.cpp
       
    80     pagenetgame.cpp
       
    81     pageinfo.cpp
       
    82     pagedata.cpp
       
    83     pagesingleplayer.cpp
       
    84     pagetraining.cpp
       
    85     pagecampaign.cpp
       
    86     pageselectweapon.cpp
       
    87     pageingame.cpp
       
    88     pageroomslist.cpp
       
    89     pageconnecting.cpp
       
    90     pagescheme.cpp
       
    91     pagegamestats.cpp
       
    92     pageplayrecord.cpp
       
    93     pageadmin.cpp
       
    94     pagenettype.cpp
       
    95     pagedrawmap.cpp
       
    96     SquareLabel.cpp
       
    97     hats.cpp
       
    98     hedgehogerWidget.cpp
       
    99     hwmap.cpp
       
   100     mapContainer.cpp
       
   101     tcpBase.cpp
       
   102     about.cpp
       
   103     proto.cpp
       
   104     fpsedit.cpp
       
   105     netserver.cpp
       
   106     newnetclient.cpp
       
   107     netudpserver.cpp
       
   108     netudpwidget.cpp
       
   109     netregister.cpp
       
   110     netserverslist.cpp
       
   111     chatwidget.cpp
       
   112     binds.cpp
       
   113     SDLs.cpp
       
   114     ${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp
    87     ${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp
   115     selectWeapon.cpp
       
   116     itemNum.cpp
       
   117     input_ip.cpp
       
   118     igbox.cpp
       
   119     weaponItem.cpp
       
   120     misc.cpp
       
   121     ammoSchemeModel.cpp
       
   122     togglebutton.cpp
       
   123     bgwidget.cpp
       
   124     achievements.cpp
       
   125     qaspectratiolayout.cpp
       
   126     drawmapwidget.cpp
       
   127     drawmapscene.cpp
       
   128     themesmodel.cpp
       
   129     databrowser.cpp
       
   130     )
    88     )
   131 
    89 
   132 #xfire integration
    90 #xfire integration
   133 if(WIN32)
    91 if(WIN32)
   134     set(hwfr_src ${hwfr_src} xfire.cpp ../misc/xfire/xfiregameclient.cpp)
    92     set(hwfr_src ${hwfr_src} xfire.cpp ../misc/xfire/xfiregameclient.cpp)
   143     set(hwfr_src ${hwfr_src} ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
   101     set(hwfr_src ${hwfr_src} ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
   144 else(MINGW)
   102 else(MINGW)
   145     set(hwfr_src ${hwfr_src} hedgewars.rc)
   103     set(hwfr_src ${hwfr_src} hedgewars.rc)
   146 endif(MINGW)
   104 endif(MINGW)
   147 
   105 
       
   106 file(GLOB ModelHdr model/*.h)
       
   107 file(GLOB NetHdr net/*.h)
       
   108 file(GLOB_RECURSE UIhdr ui/*.h)
       
   109 file(GLOB UtilHdr util/*.h)
       
   110 
       
   111 
   148 set(hwfr_moc_hdrs
   112 set(hwfr_moc_hdrs
       
   113     ${ModelHdr}
       
   114     ${NetHdr}
       
   115     ${UIhdr}
       
   116     drawmapscene.h
       
   117     game.h
       
   118     gameuiconfig.h
   149     HWApplication.h
   119     HWApplication.h
   150     game.h
       
   151     hats.h
       
   152     hwform.h
   120     hwform.h
   153     teamselect.h
   121     team.h
   154     teamselhelper.h
       
   155     frameTeam.h
       
   156     vertScrollArea.h
       
   157     gameuiconfig.h
       
   158     gamecfgwidget.h
       
   159     AbstractPage.h
       
   160     pagenet.h
       
   161     pagemultiplayer.h
       
   162     pagenetserver.h
       
   163     pageingame.h
       
   164     pagetraining.h
       
   165     pageeditteam.h
       
   166     pageoptions.h
       
   167     pagemain.h
       
   168     pageinfo.h
       
   169     pagedata.h
       
   170     pagesingleplayer.h
       
   171     pagenettype.h
       
   172     pageconnecting.h
       
   173     pagedrawmap.h
       
   174     pagecampaign.h
       
   175     pagenetgame.h
       
   176     pageroomslist.h
       
   177     pagegamestats.h
       
   178     pageadmin.h
       
   179     pagescheme.h
       
   180     pageselectweapon.h
       
   181     pageplayrecord.h
       
   182     SquareLabel.h
       
   183     hedgehogerWidget.h
       
   184     hwmap.h
       
   185     mapContainer.h
       
   186     tcpBase.h
       
   187     about.h
       
   188     proto.h
       
   189     fpsedit.h
       
   190     netserver.h
       
   191     newnetclient.h
       
   192     netudpserver.h
       
   193     netudpwidget.h
       
   194     netregister.h
       
   195     netserverslist.h
       
   196     chatwidget.h
       
   197     SDLs.h
       
   198     selectWeapon.h
       
   199     itemNum.h
       
   200     input_ip.h
       
   201     igbox.h
       
   202     weaponItem.h
       
   203     misc.h
       
   204     ammoSchemeModel.h
       
   205     togglebutton.h
       
   206     bgwidget.h
       
   207     qaspectratiolayout.h
       
   208     drawmapwidget.h
       
   209     drawmapscene.h
       
   210     themesmodel.h
       
   211     databrowser.h
       
   212     )
   122     )
   213 
   123 
   214 set(hwfr_hdrs
   124 set(hwfr_hdrs
       
   125     ${UtilHdr}
       
   126     team.h
       
   127     achievements.h
   215     binds.h
   128     binds.h
   216     ui_hwform.h
   129     ui_hwform.h
   217     KB.h
   130     KB.h
   218     hwconsts.h
   131     hwconsts.h
       
   132     sdlkeys.h
   219     )
   133     )
   220 
   134 
   221 set(hwfr_rez hedgewars.qrc)
   135 set(hwfr_rez hedgewars.qrc)
   222 
   136 
   223 qt4_add_resources(hwfr_rez_src ${hwfr_rez})
   137 qt4_add_resources(hwfr_rez_src ${hwfr_rez})