-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from IonAgorria/cmake
WIP CMake - fixes #13
- Loading branch information
Showing
284 changed files
with
1,718 additions
and
842 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.svn | ||
.svn | ||
cmake-build-debug | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version") | ||
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0) | ||
|
||
# root | ||
PROJECT(perimeter) | ||
|
||
# modules | ||
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) | ||
|
||
#SET(CMAKE_CONFIGURATION_TYPES "Release;Debug;MinSizeRel;RelWithDebInfo") | ||
IF(MINGW) | ||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll") | ||
ENDIF() | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
||
# options | ||
OPTION(FINAL_VERSION "Generate Final version" On) | ||
OPTION(GEN_SCRIPTS "Re-Generates game scripts" OFF) | ||
|
||
# depends | ||
FIND_PACKAGE(Boost) | ||
|
||
# globals | ||
INCLUDE_DIRECTORIES(SYSTEM | ||
${Boost_INCLUDE_DIRS} | ||
) | ||
|
||
IF(MSVC) | ||
#MSVC compiler specifics | ||
ELSE() | ||
#Others | ||
INCLUDE(CheckCXXCompilerFlag) | ||
SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -Wextra") | ||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O2 -ftree-vectorize -ffast-math") | ||
CHECK_CXX_COMPILER_FLAG("-msse2" HAVE_SIMDSSE) | ||
IF(HAVE_SIMDSSE) | ||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -msse2") | ||
ENDIF() | ||
|
||
# For modern gcc | ||
#add_definitions(-D_USE_MATH_DEFINES) | ||
|
||
#TODO remove these once code is more tidy | ||
add_compile_options(-Wno-misleading-indentation) | ||
add_compile_options(-Wno-unused-parameter) | ||
add_compile_options(-Wno-unused-function) | ||
add_compile_options(-Wno-unused-variable) | ||
add_compile_options(-Wno-unused-but-set-variable) | ||
add_compile_options(-Wno-unused-value) | ||
add_compile_options(-Wno-sign-compare) | ||
|
||
add_compile_options(-fms-extensions) | ||
|
||
add_compile_options(-Wno-unknown-pragmas) #TODO we should remove these pragmas? | ||
add_compile_options(-Werror=shift-negative-value) | ||
add_compile_options(-Werror=dangling-else) | ||
add_compile_options(-Werror=parentheses) | ||
add_compile_options(-Werror=delete-non-virtual-dtor) | ||
#add_compile_options(-Werror=write-strings) #TODO enable this again | ||
|
||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||
add_compile_options(-Werror=mismatched-new-delete ) | ||
endif() | ||
ENDIF() | ||
|
||
ADD_DEFINITIONS(-D_PERIMETER_) | ||
#ADD_DEFINITIONS(-D_PERIMETER_ADDON_) | ||
IF(FINAL_VERSION) | ||
ADD_DEFINITIONS(-DNDEBUG) | ||
ADD_DEFINITIONS(-D_FINAL_VERSION_) | ||
ELSE() | ||
MESSAGE("Not compiling Final version") | ||
ENDIF() | ||
|
||
ADD_SUBDIRECTORY("Source") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
#include "Scripts\AI.hi" | ||
#include "Scripts/AI.hi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
#define __AITILEMAP_H__ | ||
|
||
#include "terra.h" | ||
#include "map2d.h" | ||
#include "Map2D.h" | ||
|
||
class ClusterFind; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
IF(GEN_SCRIPTS) | ||
MESSAGE("Generating Scripts") | ||
#TODO call XPrm and other stuff | ||
ENDIF() | ||
|
||
ADD_SUBDIRECTORY("PluginMAX") | ||
ADD_SUBDIRECTORY("Terra") | ||
ADD_SUBDIRECTORY("tx3d") | ||
if(NOT FINAL_VERSION) | ||
ADD_SUBDIRECTORY("TriggerEditor") | ||
ENDIF() | ||
ADD_SUBDIRECTORY("Network/Peer2") | ||
ADD_SUBDIRECTORY("Render") | ||
ADD_SUBDIRECTORY("Sound") | ||
|
||
INCLUDE_DIRECTORIES( | ||
"${PROJECT_SOURCE_DIR}/Source/Util" | ||
"${PROJECT_SOURCE_DIR}/Source/Render/inc" | ||
"${PROJECT_SOURCE_DIR}/Source/Terra" | ||
"${PROJECT_SOURCE_DIR}/Source/Game" | ||
"${PROJECT_SOURCE_DIR}/Source/UserInterface" | ||
"${PROJECT_SOURCE_DIR}/Source/GeoLogic" | ||
"${PROJECT_SOURCE_DIR}/Source/Network" | ||
"${PROJECT_SOURCE_DIR}/Source/Units" | ||
"${PROJECT_SOURCE_DIR}/Source/Render/client" | ||
"${PROJECT_SOURCE_DIR}/Source/Physics" | ||
"${PROJECT_SOURCE_DIR}/Source/AI" | ||
"${PROJECT_SOURCE_DIR}/Source/Sound" | ||
"${PROJECT_SOURCE_DIR}/Source/Scripts" | ||
"${PROJECT_SOURCE_DIR}/Source/tx3d" | ||
"${PROJECT_SOURCE_DIR}/Source/Game/Scripts" | ||
"${PROJECT_SOURCE_DIR}/XLibs.Net" | ||
"${PROJECT_SOURCE_DIR}/MSDXSDK_02_06/Include" | ||
) | ||
|
||
SET(perimeter_SRCS | ||
Game/CameraManager.cpp | ||
Game/MonkManager.cpp | ||
Game/MusicManager.cpp | ||
Game/PlayBink.cpp | ||
Game/qd_textdb.cpp | ||
Units/Economic.cpp | ||
Game/Player.cpp | ||
Game/Universe.cpp | ||
Game/PerimeterDataChannel.cpp | ||
Game/ResourceDispatcher.cpp | ||
Game/Runtime.cpp | ||
Game/CopyToGraph.cpp | ||
Game/Region.cpp | ||
Units/DefenceMap.cpp | ||
Units/GenericControls.cpp | ||
Units/GeoControl.cpp | ||
Units/Interpolation.cpp | ||
Units/MutationEngine.cpp | ||
Units/ToolzerController.cpp | ||
Units/UnitAttribute.cpp | ||
Units/GenericUnit.cpp | ||
Units/TrustMap.cpp | ||
Units/CorpseDynamic.cpp | ||
Units/Nature.cpp | ||
Units/RealInterpolation.cpp | ||
Units/RealUnit.cpp | ||
Units/IronBullet.cpp | ||
Units/IronExplosion.cpp | ||
Units/IronLegion.cpp | ||
Units/SecondGun.cpp | ||
Units/Squad.cpp | ||
Units/BuildingBlock.cpp | ||
Units/BuildMaster.cpp | ||
Units/FrameChild.cpp | ||
Units/FrameCore.cpp | ||
Units/FrameField.cpp | ||
Units/FrameLegion.cpp | ||
Units/FramePlant.cpp | ||
Units/IronBuilding.cpp | ||
Units/IronClusterUnit.cpp | ||
Units/IronDigger.cpp | ||
Units/IronFrame.cpp | ||
Units/IronPort.cpp | ||
Units/TerrainMaster.cpp | ||
Units/WarBuilding.cpp | ||
Units/FilthAnts.cpp | ||
Units/FilthCrow.cpp | ||
Units/FilthDaemon.cpp | ||
Units/FilthDragon.cpp | ||
Units/FilthEye.cpp | ||
Units/FilthGhost.cpp | ||
Units/FilthRat.cpp | ||
Units/FilthShark.cpp | ||
Units/FilthVolcano.cpp | ||
Units/FilthWasp.cpp | ||
Units/FilthWorm.cpp | ||
Units/GenericFilth.cpp | ||
Util/BinaryArchive.cpp | ||
Game/Config.cpp | ||
Util/DebugPrm.cpp | ||
Util/DebugUtil.cpp | ||
Util/EditArchive.cpp | ||
Util/MissionDescription.cpp | ||
Util/Save.cpp | ||
Game/StdAfx.cpp | ||
Util/SynchroTimer.cpp | ||
Util/SystemUtil.cpp | ||
Util/XPrmArchive.cpp | ||
UserInterface/BGScene.cpp | ||
UserInterface/chaos.cpp | ||
UserInterface/controls.cpp | ||
UserInterface/ExternalShow.cpp | ||
UserInterface/GameShell.cpp | ||
UserInterface/HotKey.cpp | ||
UserInterface/Installer.cpp | ||
UserInterface/InterfaceScript.cpp | ||
UserInterface/LogicUpdater.cpp | ||
UserInterface/MissionEdit.cpp | ||
UserInterface/PerimeterShellDisp.cpp | ||
UserInterface/PerimeterShellUI.cpp | ||
UserInterface/ReelManager.cpp | ||
UserInterface/SelectManager.cpp | ||
UserInterface/ShellCmd.cpp | ||
UserInterface/ShellLogDisp.cpp | ||
UserInterface/ShellUtils.cpp | ||
UserInterface/UserSingleProfile.cpp | ||
UserInterface/SCodeInterpreter/Commands.cpp | ||
UserInterface/SCodeInterpreter/Containers.cpp | ||
UserInterface/SCodeInterpreter/Frame.cpp | ||
UserInterface/SCodeInterpreter/Interpreter.cpp | ||
UserInterface/SCodeInterpreter/Knowledge.cpp | ||
UserInterface/SCodeInterpreter/World.cpp | ||
UserInterface/History3D.cpp | ||
UserInterface/HistoryScene.cpp | ||
UserInterface/HistorySceneCamera.cpp | ||
UserInterface/BattleMenu.cpp | ||
UserInterface/GraphicsOptions.cpp | ||
UserInterface/LanMenu.cpp | ||
UserInterface/MainMenu.cpp | ||
UserInterface/MessageBox.cpp | ||
UserInterface/MonoSelect.cpp | ||
UserInterface/OnlineMenu.cpp | ||
UserInterface/OptionsMenu.cpp | ||
Network/CommonCommands.cpp | ||
Network/CommonEvents.cpp | ||
Network/ConnectionDP.cpp | ||
Network/EventBufferDP.cpp | ||
Network/GS_interface.cpp | ||
Network/HyperSpace.cpp | ||
Network/P2P_interface1Th.cpp | ||
Network/P2P_interface2Th.cpp | ||
Network/P2P_interface2ThDPF.cpp | ||
Network/P2P_interface3Th.cpp | ||
Network/P2P_interfaceAnyTh.cpp | ||
Physics/Missile.cpp | ||
Physics/MultiBodyDispatcher.cpp | ||
Physics/Mutation.cpp | ||
Physics/RigidBody.cpp | ||
Physics/Rocket.cpp | ||
AI/AiBuilding.cpp | ||
AI/AIMain.cpp | ||
AI/AITileMap.cpp | ||
AI/ClusterFind.cpp | ||
GeoLogic/LineAntiAlias.cpp | ||
GeoLogic/TerraCleft.cpp | ||
HT/ht.cpp | ||
HT/LagStatistic.cpp | ||
HT/StreamInterpolation.cpp | ||
Units/EnergyConsumer.cpp | ||
TriggerEditor/TriggerExport.cpp | ||
Units/Triggers.cpp | ||
) | ||
|
||
ADD_EXECUTABLE(perimeter ${perimeter_SRCS}) | ||
|
||
TARGET_LINK_LIBRARIES(perimeter | ||
${BOOST_LIBRARY} | ||
${SDL2_LIBRARY} | ||
PluginMAX | ||
Terra | ||
tx3d | ||
TriggerEditor | ||
Peer | ||
Render | ||
Sound | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#TODO create executable | ||
|
||
SET(configurator_SRCS | ||
"Configurator/Config Sheets/aboutpage.cpp" | ||
"Configurator/Config Sheets/BasePage.cpp" | ||
"Configurator/Config Sheets/GamePropertyPage.cpp" | ||
"Configurator/Config Sheets/graphsettingspage.cpp" | ||
"Configurator/Config Sheets/MiscSettingsPage.cpp" | ||
"Configurator/Config Sheets/SettingsSheet.cpp" | ||
"Configurator/Config Sheets/soundsettingspage.cpp" | ||
Configurator/Localisation/LocaleMngr.cpp | ||
Configurator/SettingFactory/SettingFactory.cpp | ||
Configurator/Settings/CheckSetting.cpp | ||
Configurator/Settings/ColorDepthSetting.cpp | ||
Configurator/Settings/ComboSetting.cpp | ||
Configurator/Settings/GraphSettingsSet.cpp | ||
Configurator/Settings/HTSetting.cpp | ||
Configurator/Settings/LanguageSetting.cpp | ||
Configurator/Settings/MapLevelLOD.cpp | ||
Configurator/Settings/MouseLookRateSetting.cpp | ||
Configurator/Settings/RadioSetting.cpp | ||
Configurator/Settings/ReflectionSetting.cpp | ||
Configurator/Settings/ResolutionSetting.cpp | ||
Configurator/Settings/ScrollRateSetting.cpp | ||
Configurator/Settings/SettingBase.cpp | ||
Configurator/Settings/ShadowQualitySetting.cpp | ||
Configurator/Settings/ShadowSamples.cpp | ||
Configurator/Settings/ShadowTypeSetting.cpp | ||
Configurator/Settings/SliderSetting.cpp | ||
Configurator/CollectLangDirs.cpp | ||
Configurator/Configurator.cpp | ||
Configurator/ConfiguratorDlg.cpp | ||
Configurator/CurDirSafer.cpp | ||
Configurator/GrCustomSettingsDlg.cpp | ||
Configurator/IniReader.cpp | ||
Configurator/qd_textdb.cpp | ||
Configurator/StdAfx.cpp | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.