mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Move main executable source to its own directory (#248)
* Move main executable files to their own directory * Adapt the build to the new file structure ... and fix some weird #include's that were relying on the project root being an include directory.
This commit is contained in:
+2
-54
@@ -23,7 +23,7 @@ set(usingMsBuild $<STREQUAL:${CMAKE_VS_PLATFORM_NAME},Win32>)
|
|||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
add_compile_definitions(CINTERFACE XML_STATIC VFS_STATIC VFS_WITH_SLF VFS_WITH_7ZIP _CRT_SECURE_NO_DEPRECATE)
|
add_compile_definitions(CINTERFACE XML_STATIC VFS_STATIC VFS_WITH_SLF VFS_WITH_7ZIP _CRT_SECURE_NO_DEPRECATE)
|
||||||
include_directories(${CMAKE_SOURCE_DIR} "ext/VFS/include" Utils TileEngine TacticalAI ModularizedTacticalAI Tactical Strategic sgp Res Lua Laptop Multiplayer Editor Console)
|
include_directories(Ja2 "ext/VFS/include" Utils TileEngine TacticalAI "ModularizedTacticalAI/include" Tactical Strategic sgp "Ja2/Res" Lua Laptop Multiplayer Editor Console)
|
||||||
|
|
||||||
# external libraries
|
# external libraries
|
||||||
add_subdirectory("ext/libpng")
|
add_subdirectory("ext/libpng")
|
||||||
@@ -59,59 +59,7 @@ foreach(lib IN LISTS Ja2_Libs)
|
|||||||
add_subdirectory(${lib})
|
add_subdirectory(${lib})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# TODO: Move these units into their own directory to declutter the root dir and CMakeLists.txt file
|
add_subdirectory(Ja2)
|
||||||
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"
|
|
||||||
"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
|
|
||||||
"ws2_32.lib"
|
|
||||||
Multiplayer
|
|
||||||
)
|
|
||||||
|
|
||||||
# simple function to validate Languages and Application choices
|
# simple function to validate Languages and Application choices
|
||||||
include(cmake/ValidateOptions.cmake)
|
include(cmake/ValidateOptions.cmake)
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
set(Ja2Src
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/aniviewscreen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/Credits.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/Fade Screen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/FeaturesScreen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/GameInitOptionsScreen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/gameloop.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/gamescreen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/GameSettings.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/GameVersion.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/HelpScreen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/Init.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/Intro.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/JA2 Splash.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/Ja25Update.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/jascreens.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/Language Defines.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/Loading Screen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/MainMenuScreen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/MessageBoxScreen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/MPChatScreen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/MPConnectScreen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/MPHostScreen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/MPJoinScreen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/MPScoreScreen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/MPXmlTeams.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/Options Screen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/profiler.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/SaveLoadGame.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/SaveLoadScreen.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/SCREENS.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/Sys Globals.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/ub_config.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/XML_DifficultySettings.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/XML_IntroFiles.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/XML_Layout_MainMenu.cpp"
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Res/ja2.rc
|
||||||
|
PARENT_SCOPE)
|
||||||
|
|
||||||
|
set(Ja2_Libraries
|
||||||
|
"${CMAKE_SOURCE_DIR}/libexpatMT.lib"
|
||||||
|
"Dbghelp.lib"
|
||||||
|
Lua
|
||||||
|
"${CMAKE_SOURCE_DIR}/lua51.lib"
|
||||||
|
"${CMAKE_SOURCE_DIR}/lua51.vc9.lib"
|
||||||
|
"Winmm.lib"
|
||||||
|
"${CMAKE_SOURCE_DIR}/SMACKW32.LIB"
|
||||||
|
"${CMAKE_SOURCE_DIR}/binkw32.lib"
|
||||||
|
bfVFS
|
||||||
|
"ws2_32.lib"
|
||||||
|
Multiplayer
|
||||||
|
PARENT_SCOPE)
|
||||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -21,7 +21,7 @@
|
|||||||
#include "QuestText.h" //quest: name
|
#include "QuestText.h" //quest: name
|
||||||
#include "laptop.h" //ui positions
|
#include "laptop.h" //ui positions
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "Utils/Cursors.h"
|
#include "Cursors.h"
|
||||||
#include "sysutil.h" //extra Buffer for scaling image
|
#include "sysutil.h" //extra Buffer for scaling image
|
||||||
#include "vsurface.h" //fill extra buffer with black color
|
#include "vsurface.h" //fill extra buffer with black color
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#include "laptop.h"//UI dimensions, mouse regions
|
#include "laptop.h"//UI dimensions, mouse regions
|
||||||
#include "Utilities.h"//file names
|
#include "Utilities.h"//file names
|
||||||
#include "vobject.h"//video objects
|
#include "vobject.h"//video objects
|
||||||
#include "Utils/Cursors.h"
|
#include "Cursors.h"
|
||||||
#include "Text.h"//button text
|
#include "Text.h"//button text
|
||||||
#include "Button System.h"
|
#include "Button System.h"
|
||||||
#include "Encyclopedia_new.h"
|
#include "Encyclopedia_new.h"
|
||||||
|
|||||||
@@ -52,9 +52,9 @@
|
|||||||
|
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
// needed to use the modularized tactical AI:
|
// needed to use the modularized tactical AI:
|
||||||
#include "ModularizedTacticalAI/include/Plan.h"
|
#include "Plan.h"
|
||||||
#include "ModularizedTacticalAI/include/PlanFactoryLibrary.h"
|
#include "PlanFactoryLibrary.h"
|
||||||
#include "ModularizedTacticalAI/include/AbstractPlanFactory.h"
|
#include "AbstractPlanFactory.h"
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#include "Ja25_Tactical.h"
|
#include "Ja25_Tactical.h"
|
||||||
|
|||||||
@@ -13,9 +13,9 @@
|
|||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
// needed to use the modularized tactical AI:
|
// needed to use the modularized tactical AI:
|
||||||
#include "ModularizedTacticalAI/include/Plan.h"
|
#include "Plan.h"
|
||||||
#include "ModularizedTacticalAI/include/PlanFactoryLibrary.h"
|
#include "PlanFactoryLibrary.h"
|
||||||
#include "ModularizedTacticalAI/include/AbstractPlanFactory.h"
|
#include "AbstractPlanFactory.h"
|
||||||
|
|
||||||
|
|
||||||
UINT16 RealtimeDelay( SOLDIERTYPE * pSoldier )
|
UINT16 RealtimeDelay( SOLDIERTYPE * pSoldier )
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
#define __WORDWRAP_H_
|
#define __WORDWRAP_H_
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "LAPTOP\files.h"
|
#include "files.h"
|
||||||
#include "LAPTOP\email.h"
|
#include "email.h"
|
||||||
|
|
||||||
//Flags for DrawTextToScreen()
|
//Flags for DrawTextToScreen()
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "DEBUG.H"
|
#include "DEBUG.H"
|
||||||
#include "lua/lua_function.h"
|
#include "lua_function.h"
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
LuaFunction& LuaFunction::Param<std::string>(std::string const& par)
|
LuaFunction& LuaFunction::Param<std::string>(std::string const& par)
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#include "lua/lua_state.h"
|
#include "lua_state.h"
|
||||||
#include <Debug.h>
|
#include <Debug.h>
|
||||||
#include "sgp_logger.h"
|
#include "sgp_logger.h"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#include "lua/lua_table.h"
|
#include "lua_table.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Table constructors
|
* Table constructors
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#ifndef _LUA_TABLE_H_
|
#ifndef _LUA_TABLE_H_
|
||||||
#define _LUA_TABLE_H_
|
#define _LUA_TABLE_H_
|
||||||
|
|
||||||
#include "lua/lua_state.h"
|
#include "lua_state.h"
|
||||||
|
|
||||||
class LuaTable
|
class LuaTable
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user