From 056ec2d434f63d0e255c782428c49938bd659715 Mon Sep 17 00:00:00 2001 From: Koncord Date: Thu, 25 May 2017 23:56:22 +0800 Subject: [PATCH] [General] Fix CMake errors --- apps/openmw/CMakeLists.txt | 6 +++--- cmake/OpenMWMacros.cmake | 16 ++++++++-------- components/CMakeLists.txt | 14 +++++++------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 52fe4c33e..28809b614 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -101,12 +101,12 @@ add_openmw_dir (mwmp Main Networking LocalPlayer DedicatedPlayer PlayerList Loca BaseClientPacketProcessor PlayerProcessor WorldProcessor ActorProcessor ProcessorInitializer ) -add_openmw_dir (mwmp\\processors\\actor ProcessorActorAnimFlags ProcessorActorAnimPlay ProcessorActorAttack +add_openmw_dir (mwmp/processors/actor ProcessorActorAnimFlags ProcessorActorAnimPlay ProcessorActorAttack ProcessorActorAuthority ProcessorActorCellChange ProcessorActorEquipment ProcessorActorList ProcessorActorPosition ProcessorActorSpeech ProcessorActorStatsDynamic ProcessorActorTest ) -add_openmw_dir (mwmp\\processors\\player ProcessorChatMessage ProcessorGameConsole ProcessorGameTime ProcessorGUIMessageBox +add_openmw_dir (mwmp/processors/player ProcessorChatMessage ProcessorGameConsole ProcessorGameTime ProcessorGUIMessageBox ProcessorHandshake ProcessorUserDisconnected ProcessorUserMyID ProcessorPlayerBaseInfo ProcessorPlayerAnimFlags ProcessorPlayerAttack ProcessorPlayerAttribute ProcessorPlayerBounty ProcessorPlayerCellChange ProcessorPlayerCellState ProcessorPlayerCharClass ProcessorPlayerCharGen ProcessorPlayerDeath ProcessorPlayerEquipment ProcessorPlayerFaction @@ -114,7 +114,7 @@ add_openmw_dir (mwmp\\processors\\player ProcessorChatMessage ProcessorGameConso ProcessorPlayerSkill ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic ProcessorPlayerTopic ) -add_openmw_dir (mwmp\\processors\\world BaseObjectProcessor ProcessorContainer ProcessorDoorState ProcessorMusicPlay +add_openmw_dir (mwmp/processors/world BaseObjectProcessor ProcessorContainer ProcessorDoorState ProcessorMusicPlay ProcessorObjectAnimPlay ProcessorObjectDelete ProcessorObjectLock ProcessorObjectMove ProcessorObjectPlace ProcessorObjectRotate ProcessorObjectScale ProcessorObjectTrap ProcessorScriptGlobalShort ProcessorScriptLocalFloat ProcessorScriptLocalShort ProcessorScriptMemberShort ProcessorVideoPlay diff --git a/cmake/OpenMWMacros.cmake b/cmake/OpenMWMacros.cmake index aacd12c7e..04530f313 100644 --- a/cmake/OpenMWMacros.cmake +++ b/cmake/OpenMWMacros.cmake @@ -20,18 +20,17 @@ macro (add_openmw_dir dir) set (files) set (cppfiles) - string(REGEX REPLACE "\\\\" "/" newDir ${dir}) foreach (u ${ARGN}) # Add cpp and hpp to OPENMW_FILES - file (GLOB ALL "${newDir}/${u}.[ch]pp") + file (GLOB ALL "${dir}/${u}.[ch]pp") foreach (f ${ALL}) list (APPEND files "${f}") list (APPEND OPENMW_FILES "${f}") endforeach (f) # Add cpp to unity build - file (GLOB ALL "${newDir}/${u}.cpp") + file (GLOB ALL "${dir}/${u}.cpp") foreach (f ${ALL}) list (APPEND cppfiles "${f}") endforeach (f) @@ -43,16 +42,16 @@ macro (add_openmw_dir dir) list (APPEND OPENMW_FILES ${CMAKE_CURRENT_BINARY_DIR}/ub_${newDir}.cpp) endif() - source_group ("apps\\openmw\\${dir}" FILES ${files}) + string(REGEX REPLACE "/" "\\\\" newDir ${dir}) + source_group ("apps\\openmw\\${newDir}" FILES ${files}) endmacro (add_openmw_dir) macro (add_component_dir dir) set (files) set (cppfiles) - string(REGEX REPLACE "\\\\" "/" newDir ${dir}) foreach (u ${ARGN}) - file (GLOB ALL "${newDir}/${u}.[ch]pp") + file (GLOB ALL "${dir}/${u}.[ch]pp") foreach (f ${ALL}) list (APPEND files "${f}") @@ -60,7 +59,7 @@ macro (add_component_dir dir) endforeach (f) # Add cpp to unity build - file (GLOB ALL "${newDir}/${u}.cpp") + file (GLOB ALL "${dir}/${u}.cpp") foreach (f ${ALL}) list (APPEND cppfiles "${f}") endforeach (f) @@ -72,7 +71,8 @@ macro (add_component_dir dir) list (APPEND COMPONENT_FILES ${CMAKE_CURRENT_BINARY_DIR}/ub_${newDir}.cpp) endif() - source_group ("components\\${dir}" FILES ${files}) + string(REGEX REPLACE "/" "\\\\" newDir ${dir}) + source_group ("components\\${newDir}" FILES ${files}) endmacro (add_component_dir) macro (add_component_qt_dir dir) diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 628702c1d..f26b78bae 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -151,29 +151,29 @@ add_component_dir (openmw-mp Log Utils NetworkMessages Version ) -add_component_dir (openmw-mp\\Base +add_component_dir (openmw-mp/Base BaseActor BaseEvent BasePacketProcessor BasePlayer BaseStructs ) -add_component_dir (openmw-mp\\Controllers +add_component_dir (openmw-mp/Controllers PlayerPacketController ActorPacketController WorldPacketController ) -add_component_dir(openmw-mp\\Master +add_component_dir(openmw-mp/Master MasterData PacketMasterQuery PacketMasterUpdate PacketMasterAnnounce BaseMasterPacket ProxyMasterPacket ) -add_component_dir (openmw-mp\\Packets +add_component_dir (openmw-mp/Packets BasePacket PacketPreInit ) -add_component_dir (openmw-mp\\Packets\\Actor +add_component_dir (openmw-mp/Packets/Actor ActorPacket PacketActorList PacketActorAuthority PacketActorTest PacketActorAnimPlay PacketActorAttack PacketActorCellChange PacketActorAnimFlags PacketActorEquipment PacketActorPosition PacketActorSpeech PacketActorStatsDynamic ) -add_component_dir (openmw-mp\\Packets\\Player +add_component_dir (openmw-mp/Packets/Player PlayerPacket PacketHandshake PacketChatMessage PacketPlayerBaseInfo PacketPlayerCharGen PacketPlayerAnimFlags PacketPlayerAttack PacketPlayerAttribute PacketPlayerBounty PacketPlayerCellChange PacketPlayerCellState PacketPlayerClass @@ -182,7 +182,7 @@ add_component_dir (openmw-mp\\Packets\\Player PacketPlayerTopic PacketPlayerActiveSkills PacketGUIBoxes PacketTime ) -add_component_dir (openmw-mp\\Packets\\World +add_component_dir (openmw-mp/Packets/World WorldPacket PacketContainer PacketObjectAnimPlay PacketObjectDelete PacketDoorState PacketObjectLock PacketObjectMove PacketObjectPlace PacketObjectRotate PacketObjectScale PacketObjectTrap PacketMusicPlay PacketVideoPlay PacketScriptLocalShort