diff --git a/.gitignore b/.gitignore index 70a647057..c59197494 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ build/ lib/ .vs/ -.idea/ \ No newline at end of file +.idea/ +CMakeSettings.json +out/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..d5fd89cb5 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,154 @@ +cmake_minimum_required(VERSION 3.24) + +project(ja2) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +# lua51.lib and lua51.vc9.lib have been built with /MTx, so we must as well +# TODO: build our own Lua 5.1.2 from source so we can use whichever +add_compile_options($,/MTd,/MT>) + +add_compile_definitions(CINTERFACE XML_STATIC VFS_STATIC VFS_WITH_SLF VFS_WITH_7ZIP USE_VFS _CRT_SECURE_NO_DEPRECATE) +include_directories(${CMAKE_SOURCE_DIR} "ext/VFS/include" Utils TileEngine TacticalAI ModularizedTacticalAI Tactical Strategic "Standard Gaming Platform" Res Lua Laptop Multiplayer "Multiplayer/raknet" Editor Console) + +# external libraries +add_subdirectory("ext/libpng") +add_subdirectory("ext/zlib") +add_subdirectory("ext/VFS") +target_link_libraries(bfVFS PRIVATE 7z) + +# internal libraries that are Good +add_subdirectory(Lua) + +# internal libraries that live in Preprocessor Hell, because they are Bad +add_subdirectory(TileEngine) +add_subdirectory(TacticalAI) +add_subdirectory(Utils) +add_subdirectory(Strategic) +add_subdirectory("Standard Gaming Platform") +add_subdirectory(Laptop) +add_subdirectory(Editor) +add_subdirectory(Console) +add_subdirectory(Tactical) +add_subdirectory(ModularizedTacticalAI) +# TODO: Rename 'Standard Gaming Platform' directory to 'SGP' so this can be refactored away +set(Ja2_Libs +TileEngine +TacticalAI +Utils +Strategic +SGP +Laptop +Editor +Console +Tactical +ModularizedTacticalAI +) + +# TODO: Move these units into their own directory to declutter the root dir and CMakeLists.txt file +set(Ja2Src +"aniviewscreen.cpp" +"Credits.cpp" +"Fade Screen.cpp" +"FeaturesScreen.cpp" +"GameInitOptionsScreen.cpp" +"gameloop.cpp" +"gamescreen.cpp" +"GameSettings.cpp" +"GameVersion.cpp" +"HelpScreen.cpp" +"Init.cpp" +"Intro.cpp" +"JA2 Splash.cpp" +"Ja25Update.cpp" +"jascreens.cpp" +"Language Defines.cpp" +"Loading Screen.cpp" +"MainMenuScreen.cpp" +"MessageBoxScreen.cpp" +"MPChatScreen.cpp" +"MPConnectScreen.cpp" +"MPHostScreen.cpp" +"MPJoinScreen.cpp" +"MPScoreScreen.cpp" +"MPXmlTeams.cpp" +"Multiplayer/client.cpp" +"Multiplayer/server.cpp" +"Multiplayer/transfer_rules.cpp" +"Options Screen.cpp" +"profiler.cpp" +"SaveLoadGame.cpp" +"SaveLoadScreen.cpp" +"SCREENS.cpp" +"Sys Globals.cpp" +"ub_config.cpp" +"XML_DifficultySettings.cpp" +"XML_IntroFiles.cpp" +"XML_Layout_MainMenu.cpp" +Res/ja2.rc +) + +set(Ja2_Libraries +"${PROJECT_SOURCE_DIR}/libexpatMT.lib" +"Dbghelp.lib" +Lua +"${PROJECT_SOURCE_DIR}/lua51.lib" +"${PROJECT_SOURCE_DIR}/lua51.vc9.lib" +"Winmm.lib" +"${PROJECT_SOURCE_DIR}/SMACKW32.LIB" +"${PROJECT_SOURCE_DIR}/binkw32.lib" +bfVFS +"${PROJECT_SOURCE_DIR}/Multiplayer/raknet/RakNetLibStatic.lib" +"ws2_32.lib" +) + +include(cmake/ValidateOptions.cmake) + +set(ValidLanguages CHINESE DUTCH ENGLISH FRENCH GERMAN ITALIAN POLISH RUSSIAN) +ValidateOptions("${ValidLanguages}" "Languages" "ENGLISH" "${Languages}" "LangTargets") + +set(ValidApplications JA2 JA2MAPEDITOR JA2UB JA2UBMAPEDITOR) +ValidateOptions("${ValidApplications}" "Applications" "JA2" "${Applications}" "ApplicationTargets") + + +# Due to widespread preprocessor definition abuse in the codebase, practically +# every library-language-executable combination is its own compilation target +# TODO: refactor preprocessor usage onto, ideally, a single translation unit +foreach(lang IN LISTS LangTargets) + foreach(exe IN LISTS ApplicationTargets) + set(targPrefix ${exe}_${lang}) + + # make a copy of the library list for each language/library combination + list(SUBLIST Ja2_Libs 0 -1 ${targPrefix}_Targets) + + add_executable(${targPrefix} WIN32) + target_sources(${targPrefix} PRIVATE ${Ja2Src}) + target_link_libraries(${targPrefix} PRIVATE ${Ja2_Libraries}) + + foreach(lib IN LISTS ${targPrefix}_Targets) + set(tgt ${targPrefix}_${lib}) + + add_library(${tgt}) + target_sources(${tgt} PRIVATE ${${lib}Src}) + + set(isEditor $) + set(isUb $) + set(isUbEditor $) + + target_compile_definitions(${tgt} PUBLIC + $ + $ + $ + $,JA2BETAVERSION;JA2TESTVERSION;DEBUG_ATTACKBUSY,> + ${lang} + ) + target_link_libraries(${targPrefix} PUBLIC ${tgt}) + endforeach() + + # SGP is the only one calling these, so they can go here + target_link_libraries(${targPrefix}_SGP PRIVATE "ddraw.lib" "${PROJECT_SOURCE_DIR}/fmodvc.lib") + target_link_libraries(${targPrefix}_SGP PUBLIC libpng) + endforeach() +endforeach() diff --git a/Console/CMakeLists.txt b/Console/CMakeLists.txt new file mode 100644 index 000000000..7c67cd0aa --- /dev/null +++ b/Console/CMakeLists.txt @@ -0,0 +1,6 @@ +set(ConsoleSrc +"${CMAKE_CURRENT_SOURCE_DIR}/Console.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Cursors.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Dialogs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/FileStream.cpp" +PARENT_SCOPE) diff --git a/Editor/CMakeLists.txt b/Editor/CMakeLists.txt new file mode 100644 index 000000000..75bed682f --- /dev/null +++ b/Editor/CMakeLists.txt @@ -0,0 +1,27 @@ +set(EditorSrc +"${CMAKE_CURRENT_SOURCE_DIR}/Cursor Modes.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Editor Callbacks.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Editor Modes.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Editor Taskbar Creation.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Editor Taskbar Utils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Editor Undo.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/EditorBuildings.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/EditorItems.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/EditorMapInfo.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/EditorMercs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/EditorTerrain.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/editscreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/edit_sys.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Item Statistics.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LoadScreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/messagebox.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/newsmooth.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/popupmenu.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Road Smoothing.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Sector Summary.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/selectwin.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SmartMethod.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/smooth.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Smoothing Utils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_ActionItems.cpp" +PARENT_SCOPE) diff --git a/Laptop/CMakeLists.txt b/Laptop/CMakeLists.txt new file mode 100644 index 000000000..c62b34bb1 --- /dev/null +++ b/Laptop/CMakeLists.txt @@ -0,0 +1,101 @@ +set(LaptopSrc +"${CMAKE_CURRENT_SOURCE_DIR}/aim.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AimArchives.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AimFacialIndex.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AimHistory.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AimLinks.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AimMembers.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AimPolicies.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AimSort.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BaseTable.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyR.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyRAmmo.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyRArmour.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyRGuns.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyRMailOrder.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyRMisc.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyRShipments.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BobbyRUsed.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BriefingRoom.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BriefingRoomM.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BriefingRoom_Data.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/BrokenLink.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/CampaignHistoryMain.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/CampaignHistory_Summary.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/CampaignStats.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/CharProfile.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DropDown.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DynamicDialogueWidget.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/email.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Encyclopedia_Data_new.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Encyclopedia_new.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/FacilityProduction.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/files.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/finances.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/florist Cards.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/florist Gallery.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/florist Order Form.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/florist.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/funeral.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/GunEmporium.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/history.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP AboutUs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Attribute Entrance.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Attribute Finish.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Attribute Selection.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Background.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Begin Screen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Character and Disability Entrance.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Character Trait.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Color Choosing.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Compile Character.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Confirm.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Disability Trait.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Finish.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Gear Entrance.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Gear.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP HomePage.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP MainPage.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Minor Trait.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Personality Entrance.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Personality Finish.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Personality Quiz.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Portraits.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Prejudice.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Skill Trait.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Text System.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMP Voices.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/IMPVideoObjects.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/insurance Comments.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/insurance Contract.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/insurance Info.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/insurance.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Intelmarket.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/laptop.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/merccompare.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/mercs Account.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/mercs Files.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/mercs No Account.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/mercs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MilitiaInterface.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MilitiaWebsite.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/personnel.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PMC.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PostalService.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/sirtech.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Store Inventory.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/WHO.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_AIMAvailability.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_BriefingRoom.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_CampaignStatsEvents.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_ConditionsForMercAvailability.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_DeliveryMethods.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Email.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EmailMercAvailable.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EmailMercLevelUp.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_History.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_IMPPortraits.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_IMPVoices.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_OldAIMArchive.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_ShippingDestinations.cpp" +PARENT_SCOPE) diff --git a/ModularizedTacticalAI/CMakeLists.txt b/ModularizedTacticalAI/CMakeLists.txt new file mode 100644 index 000000000..0c4c78ba9 --- /dev/null +++ b/ModularizedTacticalAI/CMakeLists.txt @@ -0,0 +1,14 @@ +set(ModularizedTacticalAISrc +"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyArmedVehiclePlan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/AbstractPlanFactory.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/CrowPlan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyAIPlan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyAIPlanFactory.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyCreaturePlan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/LegacyZombiePlan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/NullPlan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/NullPlanFactory.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/Plan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/PlanFactoryLibrary.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/src/PlanList.cpp" +PARENT_SCOPE) diff --git a/Standard Gaming Platform/CMakeLists.txt b/Standard Gaming Platform/CMakeLists.txt new file mode 100644 index 000000000..e804d0378 --- /dev/null +++ b/Standard Gaming Platform/CMakeLists.txt @@ -0,0 +1,43 @@ +set(SGPSrc +"${CMAKE_CURRENT_SOURCE_DIR}/Button Sound Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Button System.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Compression.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Container.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Cursor Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DEBUG.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/debug_util.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/debug_win_util.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DirectDraw Calls.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DirectX Common.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/English.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/FileCat.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/FileMan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Flic.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Font.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/himage.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/impTGA.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/input.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Install.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Ja2 Libs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LibraryDataBase.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/line.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MemMan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/mousesystem.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PCX.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PngLoader.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Random.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/readdir.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/RegInst.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/sgp.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/sgp_logger.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/shading.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/soundman.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/STCI.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/stringicmp.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/timer.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/video.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/vobject.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/vobject_blitters.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/vsurface.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/WinFont.cpp" +PARENT_SCOPE) diff --git a/Strategic/CMakeLists.txt b/Strategic/CMakeLists.txt new file mode 100644 index 000000000..8e15ba341 --- /dev/null +++ b/Strategic/CMakeLists.txt @@ -0,0 +1,66 @@ +set(StrategicSrc +"${CMAKE_CURRENT_SOURCE_DIR}/AI Viewer.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/ASD.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Assignments.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Auto Resolve.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Campaign Init.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Creature Spreading.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Facilities.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Game Clock.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Game Event Hook.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Game Events.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Game Init.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Hourly Update.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Ja25 Strategic Ai.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Luaglobal.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LuaInitNPCs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Screen Helicopter.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Screen Interface Border.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Screen Interface Bottom.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Screen Interface Map Inventory.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Screen Interface Map.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Screen Interface TownMine Info.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Screen Interface.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MapScreen Quotes.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/mapscreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Meanwhile.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Merc Contract.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MilitiaIndividual.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MilitiaSquads.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MiniEvents.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Player Command.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PreBattle Interface.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Queen Command.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Quest Debug System.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Quests.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Rebel Command.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Reinforcement.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Scheduling.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic AI.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Event Handler.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Merc Handler.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Mines LUA.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Mines.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Movement Costs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Movement.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Pathing.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Status.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Town Loyalty.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/strategic town reputation.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Turns.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/strategic.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/strategicmap.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Town Militia.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/UndergroundInit.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Army.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Bloodcats.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_CoolnessBySector.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Creatures.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_ExtraItems.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Facilities.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_FacilityTypes.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Minerals.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_SectorNames.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_SquadNames.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_UniformColors.cpp" +PARENT_SCOPE) diff --git a/Tactical/CMakeLists.txt b/Tactical/CMakeLists.txt new file mode 100644 index 000000000..ebecb65da --- /dev/null +++ b/Tactical/CMakeLists.txt @@ -0,0 +1,157 @@ +set(TacticalSrc +"${CMAKE_CURRENT_SOURCE_DIR}/Air Raid.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Animation Cache.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Animation Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Animation Data.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Arms Dealer Init.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/ArmsDealerInvInit.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Auto Bandage.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Boxing.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/bullets.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Campaign.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Civ Quotes.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Dialogue Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Disease.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DisplayCover.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Drugs And Alcohol.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DynamicDialogue.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/End Game.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Enemy Soldier Save.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/EnemyItemDrops.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Faces.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Food.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/fov.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/GAP.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Handle Doors.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Handle Items.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Handle UI Plan.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Handle UI.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface Cursors.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface Dialogue.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface Enhanced.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface Items.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface Panels.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface Utils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interface.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/InterfaceItemImages.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Inventory Choosing.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Item Types.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Items.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Ja25_Tactical.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Keys.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/AbstractXMLLoader.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/BodyType.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/BodyTypeDB.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/EnumeratorDB.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/Filter.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/FilterDB.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/Layers.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/PaletteDB.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/PaletteTable.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/SurfaceCache.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/SurfaceDB.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LogicalBodyTypes/XMLParseException.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LOS.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Information.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Merc Entering.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Merc Hiring.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Militia Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Minigame.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Morale.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/opplist.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Overhead.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PATHAI.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Points.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/QARRAY.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Rain.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/RandomMerc.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Real Time Input.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Rotting Corpses.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/ShopKeeper Interface.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SkillCheck.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SkillMenu.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Add.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Ani.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Create.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Find.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Init List.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Profile.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Soldier Tile.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SoldierTooltips.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Spread Burst.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Squads.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Strategic Exit GUI.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Structure Wrap.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Tactical Save.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Tactical Turns.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/TeamTurns.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Turn Based Input.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/UI Cursors.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Vehicles.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/VehicleMenu.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Weapons.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/World Items.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_AmmoStrings.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_AmmoTypes.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Armour.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_AttachmentInfo.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Attachments.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_AttachmentSlots.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Background.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_BurstSounds.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_CivGroupNames.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Clothes.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_ComboMergeInfo.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_CompatibleFaceItems.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Disease.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Drugs.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyAmmoDrops.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyArmourDrops.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyExplosiveDrops.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyItemChoice.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyMiscDrops.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyNames.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyRank.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyWeaponChoice.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_EnemyWeaponDrops.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Explosive.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Food.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_FoodOpinions.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_HiddenNames.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_IMPItemChoices.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_IncompatibleAttachments.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_InteractiveTiles.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_ItemAdjustments.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Keys.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Launchable.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_LBEPocket.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_LBEPocketPopup.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_LoadBearingEquipment.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_LoadScreenHints.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Locks.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Magazine.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Merchants.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_MercStartingGear.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Merge.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_MilitiaIndividual.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_NewFaceGear.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Opinions.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Profiles.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Qarray.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_RandomItem.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_RandomStats.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_RPCFacesSmall.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_SectorLoadscreens.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_SoldierProfiles.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Sounds.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_SpreadPatterns.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_StructureConstruct.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_StructureDeconstruct.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Structure_Move.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Taunts.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_AdditionalTileProperties.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_TonyInventory.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Vehicles.cpp" +PARENT_SCOPE) diff --git a/TacticalAI/CMakeLists.txt b/TacticalAI/CMakeLists.txt new file mode 100644 index 000000000..53ef7ec00 --- /dev/null +++ b/TacticalAI/CMakeLists.txt @@ -0,0 +1,17 @@ +set(TacticalAISrc +"${CMAKE_CURRENT_SOURCE_DIR}/AIList.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AIMain.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/AIUtils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Attacks.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/CreatureDecideAction.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/DecideAction.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/FindLocations.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Knowledge.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Medical.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Movement.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/NPC.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PanicButtons.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/QuestDebug.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Realtime.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/ZombieDecideAction.cpp" +PARENT_SCOPE) diff --git a/TileEngine/CMakeLists.txt b/TileEngine/CMakeLists.txt new file mode 100644 index 000000000..a8b6e4d3e --- /dev/null +++ b/TileEngine/CMakeLists.txt @@ -0,0 +1,39 @@ +set(TileEngineSrc +"${CMAKE_CURRENT_SOURCE_DIR}/Ambient Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Buildings.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/environment.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Exit Grids.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Explosion Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Fog Of War.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Interactive Tiles.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Isometric Utils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LightEffects.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/lighting.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Map Edgepoints.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/overhead map.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/phys math.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/physics.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/pits.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Radar Screen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Render Dirty.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Render Fun.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Render Z.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/renderworld.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SaveLoadMap.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Shade Table Util.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Simple Render Utils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Smell.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SmokeEffects.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/structure.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/sysutil.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Tactical Placement GUI.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Tile Animation.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Tile Cache.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Tile Surface.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/TileDat.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/tiledef.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/WorldDat.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/worlddef.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/worldman.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_ExplosionData.cpp" +PARENT_SCOPE) diff --git a/Utils/CMakeLists.txt b/Utils/CMakeLists.txt new file mode 100644 index 000000000..0a11b8bb2 --- /dev/null +++ b/Utils/CMakeLists.txt @@ -0,0 +1,57 @@ +set(UtilsSrc +"${CMAKE_CURRENT_SOURCE_DIR}/Animated ProgressBar.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Cinematics Bink.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Cinematics.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Cursors.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Debug Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/dsutil.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Encrypted File.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Event Manager.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Event Pump.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/ExportStrings.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Font Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/ImportStrings.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/INIReader.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/KeyMap.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/LocalizedStrings.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MapUtility.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MercTextBox.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/message.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Multi Language Graphic Utils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Multilingual Text Code Generator.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Music Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/PopUpBox.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/popup_class.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/popup_definition.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Quantize Wrap.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Quantize.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Slider.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Sound Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/STIConvert.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Text Input.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Text Utils.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Timer Control.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Utilities.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/WordWrap.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XMLProperties.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XMLWriter.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Items.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Language.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_SenderNameList.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_ChineseText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_DutchText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_EnglishText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_FrenchText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_GermanText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_ItalianText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25ChineseText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25DutchText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25EnglishText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25FrenchText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25GermanText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25ItalianText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25PolishText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_Ja25RussianText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_PolishText.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/_RussianText.cpp" +PARENT_SCOPE) diff --git a/cmake/ValidateOptions.cmake b/cmake/ValidateOptions.cmake new file mode 100644 index 000000000..11778f6bf --- /dev/null +++ b/cmake/ValidateOptions.cmake @@ -0,0 +1,20 @@ +function(ValidateOptions ValidOptions ChoiceName DefaultChoice Choice RetVal) + if(Choice) + if(Choice MATCHES "ALL") + set(${RetVal} ${ValidOptions} PARENT_SCOPE) + message(STATUS "ALL ${ChoiceName} option set, configuring ${ValidOptions}.") + else() + foreach(x IN LISTS Choice) + if(x IN_LIST ValidOptions) + message(STATUS "Configuring for ${x}.") + else() + message(FATAL_ERROR "${x} not supported. The supported ${ChoiceName} are: ${ValidOptions}.") + endif() + set(${RetVal} ${Choice} PARENT_SCOPE) + endforeach() + endif() + else() + set(${RetVal} ${DefaultChoice} PARENT_SCOPE) + message(STATUS "No -D${ChoiceName}= parameter, configuring ${DefaultChoice} by default.") + endif() +endfunction() diff --git a/ext/libpng/CMakeLists.txt b/ext/libpng/CMakeLists.txt new file mode 100644 index 000000000..7380c1a4e --- /dev/null +++ b/ext/libpng/CMakeLists.txt @@ -0,0 +1,20 @@ +add_library(libpng +"png.c" +"pngerror.c" +"pnggccrd.c" +"pngget.c" +"pngmem.c" +"pngpread.c" +"pngread.c" +"pngrio.c" +"pngrtran.c" +"pngrutil.c" +"pngset.c" +"pngtrans.c" +"pngwio.c" +"pngwrite.c" +"pngwtran.c" +"pngwutil.c" +) +target_include_directories(libpng PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(libpng PUBLIC zlib) diff --git a/ext/zlib/CMakeLists.txt b/ext/zlib/CMakeLists.txt new file mode 100644 index 000000000..0a987afcc --- /dev/null +++ b/ext/zlib/CMakeLists.txt @@ -0,0 +1,18 @@ +add_library(zlib +"gzread.c" +"gzlib.c" +"gzclose.c" +"crc32.c" +"zutil.c" +"uncompr.c" +"compress.c" +"inffast.c" +"inflate.c" +"adler32.c" +"infback.c" +"deflate.c" +"gzwrite.c" +"inftrees.c" +"trees.c" +) +target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/lua/CMakeLists.txt b/lua/CMakeLists.txt new file mode 100644 index 000000000..9e8f21b6c --- /dev/null +++ b/lua/CMakeLists.txt @@ -0,0 +1,12 @@ +add_library(Lua +"lua.cpp" +"lua_class_interface.cpp" +"lua_env.cpp" +"lua_function.cpp" +"lua_state.cpp" +"lua_strategic.cpp" +"lua_table.cpp" +"lua_tactical.cpp" +"lwstring.cpp" +) +target_include_directories(Lua PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})