hedgewars/CMakeLists.txt
branchcmake_pascal
changeset 8761 801cf78707f2
parent 8756 671f6ef4f7f1
child 8770 53481d654691
equal deleted inserted replaced
8758:cb3b470f1000 8761:801cf78707f2
    34 else()
    34 else()
    35     set(required_fpc_version 2.2)
    35     set(required_fpc_version 2.2)
    36 endif()
    36 endif()
    37 
    37 
    38 set(engine_sources
    38 set(engine_sources
    39     ${hwengine_project}
    39     SDLh.pas
       
    40     uSinTable.pas
       
    41     uFloat.pas
       
    42     uConsts.pas
    40     LuaPas.pas
    43     LuaPas.pas
    41     PNGh.pas
    44     PNGh.pas
    42     SDLh.pas
    45     uTypes.pas
       
    46     uUtils.pas
       
    47     uVariables.pas
       
    48     uMisc.pas
       
    49     uConsole.pas
       
    50     uDebug.pas
       
    51     uCommands.pas
       
    52     uInputHandler.pas
       
    53     uTextures.pas
       
    54     uRenderUtils.pas
       
    55     uRender.pas
       
    56     uCaptions.pas
       
    57     uLandTexture.pas
       
    58     uIO.pas
       
    59     uChat.pas
       
    60     uPhysFSLayer.pas
       
    61     uStore.pas
       
    62     uSound.pas
       
    63     uRandom.pas
       
    64     uLocale.pas
       
    65     uStats.pas
       
    66     uCursor.pas
       
    67     uVideoRec.pas
       
    68     uAILandMarks.pas
       
    69     adler32.pas
       
    70     uLandTemplates.pas
       
    71     uLandGraphics.pas
       
    72     uLandPainted.pas
       
    73     uLandOutline.pas
       
    74     uLandGenMaze.pas
       
    75     uLandObjects.pas
       
    76     uLand.pas
       
    77     uAmmos.pas
       
    78 
       
    79 
       
    80     uGearsList.pas
       
    81     uCollisions.pas
       
    82     uAIMisc.pas
       
    83     uAIActions.pas
       
    84     uAIAmmoTests.pas
    43     uAI.pas
    85     uAI.pas
    44     uAIActions.pas
    86     uTeams.pas
    45     uAILandMarks.pas
    87     uGears.pas
    46     uAIAmmoTests.pas
    88     uGame.pas
    47     uAIMisc.pas
       
    48     uAmmos.pas
       
    49     uCaptions.pas
       
    50     uChat.pas
       
    51     uCollisions.pas
       
    52     uCommands.pas
       
    53     uCommandHandlers.pas
    89     uCommandHandlers.pas
    54     uConsole.pas
       
    55     uConsts.pas
       
    56     uCursor.pas
       
    57     uDebug.pas
       
    58     uFloat.pas
       
    59     uGame.pas
       
    60     uGears.pas
       
    61     uGearsHandlers.pas
    90     uGearsHandlers.pas
    62     uGearsHandlersRope.pas
    91     uGearsHandlersRope.pas
    63     uGearsHedgehog.pas
    92     uGearsHedgehog.pas
    64     uGearsList.pas
       
    65     uGearsRender.pas
    93     uGearsRender.pas
    66     uGearsUtils.pas
    94     uGearsUtils.pas
    67     uIO.pas
       
    68     uInputHandler.pas
       
    69     uLand.pas
       
    70     uLandGenMaze.pas
       
    71     uLandGraphics.pas
       
    72     uLandObjects.pas
       
    73     uLandOutline.pas
       
    74     uLandPainted.pas
       
    75     uLandTemplates.pas
       
    76     uLandTexture.pas
       
    77     uLocale.pas
       
    78     uMisc.pas
       
    79     uPhysFSLayer.pas
       
    80     uRandom.pas
       
    81     uRender.pas
       
    82     uRenderUtils.pas
       
    83     uScript.pas
    95     uScript.pas
    84     uSinTable.pas
    96     uWorld.pas
    85     uSound.pas
       
    86     uStats.pas
       
    87     uStore.pas
       
    88     uTeams.pas
       
    89     uTextures.pas
       
    90     uTouch.pas
       
    91     uTypes.pas
       
    92     uUtils.pas
       
    93     uVariables.pas
       
    94     uVideoRec.pas
       
    95     uVisualGears.pas
    97     uVisualGears.pas
    96     uWorld.pas
    98     hwengine.pas
       
    99 
    97     GSHandlers.inc
   100     GSHandlers.inc
    98     VGSHandlers.inc
   101     VGSHandlers.inc
    99     ArgParsers.inc
   102     ArgParsers.inc
   100     options.inc
   103     options.inc
   101     adler32.pas
       
   102     ${CMAKE_CURRENT_BINARY_DIR}/config.inc
   104     ${CMAKE_CURRENT_BINARY_DIR}/config.inc
   103     )
   105     )
   104 
   106 
   105 if(${BUILD_ENGINE_LIBRARY})
   107 if(${BUILD_ENGINE_LIBRARY})
   106     message(${WARNING} "Engine will be built as library (experimental)")
   108     message(${WARNING} "Engine will be built as library (experimental)")
   202         add_library(avwrapper STATIC avwrapper.c)
   204         add_library(avwrapper STATIC avwrapper.c)
   203     endif()
   205     endif()
   204 endif()
   206 endif()
   205 
   207 
   206 
   208 
   207 set(CMAKE_Pascal_FLAGS "-B  -vm4079,4080,4081 -Fl${PROJECT_BINARY_DIR}/bin -k-L${PROJECT_BINARY_DIR}/bin -Cs2000000 -vewnq -dDEBUGFILE")
   209 set(CMAKE_Pascal_FLAGS " -vm4079,4080,4081 -Fl${PROJECT_BINARY_DIR}/bin -k-L${PROJECT_BINARY_DIR}/bin -Cs2000000 -vewnq -dDEBUGFILE")
   208 add_executable(hwengine hwengine.pas)
   210 add_executable(hwengine ${engine_sources})
   209 
   211 
   210 if(APPLE)
   212 if(APPLE)
   211     set(CMAKE_Pascal_FLAGS "-Px86_64  -k-llua -k${SDLMAIN_LIB} ${CMAKE_Pascal_FLAGS}")
   213     set(CMAKE_Pascal_FLAGS "-Px86_64  -k-llua -k${SDLMAIN_LIB} ${CMAKE_Pascal_FLAGS}")
   212 else()
   214 else()
   213     set(CMAKE_Pascal_FLAGS "-Pi386 ${CMAKE_Pascal_FLAGS}")
   215     set(CMAKE_Pascal_FLAGS "-Pi386 ${CMAKE_Pascal_FLAGS}")
   233 if(${FFMPEG_FOUND})
   235 if(${FFMPEG_FOUND})
   234     add_dependencies(hwengine avwrapper)
   236     add_dependencies(hwengine avwrapper)
   235 endif()
   237 endif()
   236 
   238 
   237 #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6
   239 #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6
   238 if((FREEPASCAL_VERSION VERSION_LESS "2.6") AND (NOT ${FFMPEG_FOUND}))
   240 #if((FREEPASCAL_VERSION VERSION_LESS "2.6") AND (NOT ${FFMPEG_FOUND}))
   239     add_dependencies(hwengine ENGINECLEAN)
   241 #    add_dependencies(hwengine ENGINECLEAN)
   240 endif()
   242 #endif()
   241 
   243 
   242 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hwengine" DESTINATION ${destination_dir})
   244 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hwengine" DESTINATION ${destination_dir})