hedgewars/CMakeLists.txt
changeset 9299 d64f80504749
parent 9285 8e8b908970c2
child 9300 e5dafb5843c6
equal deleted inserted replaced
9298:2d88d01bad07 9299:d64f80504749
    10 enable_language(Pascal)
    10 enable_language(Pascal)
    11 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc)
    11 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc)
    12 include_directories(${CMAKE_CURRENT_BINARY_DIR})
    12 include_directories(${CMAKE_CURRENT_BINARY_DIR})
    13 
    13 
    14 
    14 
       
    15 #set the sources with the correct order of dependencies so that cmake won't be confused
    15 set(engine_sources
    16 set(engine_sources
    16     SDLh.pas
    17     SDLh.pas
    17     uSinTable.pas
    18     uSinTable.pas
    18     uFloat.pas
    19     uFloat.pas
    19     uConsts.pas
    20     uConsts.pas
    34     uIO.pas
    35     uIO.pas
    35     uChat.pas
    36     uChat.pas
    36     uPhysFSLayer.pas
    37     uPhysFSLayer.pas
    37     uStore.pas
    38     uStore.pas
    38     uSound.pas
    39     uSound.pas
       
    40     ArgParsers.pas
    39     uRandom.pas
    41     uRandom.pas
    40     uLocale.pas
    42     uLocale.pas
    41     uStats.pas
    43     uStats.pas
    42     uCursor.pas
    44     uCursor.pas
    43     uVideoRec.pas
    45     uVideoRec.pas
    50     uLandGenMaze.pas
    52     uLandGenMaze.pas
    51     uLandObjects.pas
    53     uLandObjects.pas
    52     uLand.pas
    54     uLand.pas
    53     uAmmos.pas
    55     uAmmos.pas
    54 
    56 
       
    57     #this is where dependency tracking becomes hard
    55     uAIMisc.pas
    58     uAIMisc.pas
    56     uAIActions.pas
    59     uAIActions.pas
    57     uAI.pas
    60     uAI.pas
    58     uWorld.pas
    61     uWorld.pas
       
    62     uVisualGearsList.pas
       
    63     uVisualGearsHandlers.pas
    59     uVisualGears.pas
    64     uVisualGears.pas
    60     uTeams.pas
    65     uTeams.pas
    61 
    66 
    62     uGearsList.pas
    67     uGearsList.pas
    63     uCollisions.pas
    68     uCollisions.pas
    64     uAIAmmoTests.pas
    69     uAIAmmoTests.pas
    65     uGears.pas
    70     uGears.pas
    66     uGame.pas
    71     uGame.pas
    67     uCommandHandlers.pas
    72     uCommandHandlers.pas
       
    73     uGearsRender.pas
       
    74     uGearsHedgehog.pas
    68     uGearsHandlers.pas
    75     uGearsHandlers.pas
    69     uGearsHandlersRope.pas
    76     uGearsHandlersRope.pas
    70     uGearsHedgehog.pas
    77     uGearsHandlersMess.pas
    71     uGearsRender.pas
       
    72     uGearsUtils.pas
    78     uGearsUtils.pas
       
    79 
       
    80     #these interact with everything, so compile last
    73     uScript.pas
    81     uScript.pas
    74     hwengine.pas
    82     hwengine.pas
    75 
    83 
       
    84     #we also have uTouch.pas
    76     options.inc
    85     options.inc
    77     ${CMAKE_CURRENT_BINARY_DIR}/config.inc
    86     ${CMAKE_CURRENT_BINARY_DIR}/config.inc
    78     )
    87     )
    79 
    88 
    80 
    89 
   106     find_package_or_disable_msg(GLUT NOVIDEOREC "Video recording will not be built")
   115     find_package_or_disable_msg(GLUT NOVIDEOREC "Video recording will not be built")
   107 endif()
   116 endif()
   108 
   117 
   109 find_package_or_disable_msg(PNG NOPNG "Screenshots will be saved in BMP")
   118 find_package_or_disable_msg(PNG NOPNG "Screenshots will be saved in BMP")
   110 if(PNG_FOUND)
   119 if(PNG_FOUND)
   111     list(APPEND engine_sources PNGh.pas)
   120     list(INSERT engine_sources 0 PNGh.pas)
   112     list(REMOVE_AT PNG_LIBRARIES 1) #removing the zlib library path
   121     list(REMOVE_AT PNG_LIBRARIES 1) #removing the zlib library path
   113     get_filename_component(PNG_LIBRARY_DIR ${PNG_LIBRARIES} PATH)
   122     get_filename_component(PNG_LIBRARY_DIR ${PNG_LIBRARIES} PATH)
   114     add_flag_append(CMAKE_Pascal_FLAGS -Fl${PNG_LIBRARY_DIR})
   123     add_flag_append(CMAKE_Pascal_FLAGS -Fl${PNG_LIBRARY_DIR})
   115 endif()
   124 endif()
   116 
   125