[c12538] Do not use GLOB in CMake for source file lists

From the CMake documentation of the FILE command:
"We do not recommend using GLOB to collect a list of source files from your
source tree. If no CMakeLists.txt file changes when a source is added or
removed then the generated build system cannot know when to ask CMake to
regenerate."

(based on commit [12390] - f123635)

Signed-off-by: DasBlub <DasBlub@gmail.com>
This commit is contained in:
DasBlub 2013-03-03 18:37:03 +01:00 committed by Antz
parent a27787851c
commit 7b52873e24
9 changed files with 656 additions and 117 deletions

View file

@ -16,48 +16,107 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# file(GLOB g3dlite_SRCS *.cpp) # don't need all of them
set(LIBRARY_NAME g3dlite)
set(g3dlite_SRCS
set(LIBRARY_SRCS
AABox.cpp
Box.cpp
Crypto.cpp
format.cpp
Matrix3.cpp
Plane.cpp
System.cpp
Triangle.cpp
Vector3.cpp
Vector4.cpp
debugAssert.cpp
fileutils.cpp
g3dmath.cpp
g3dfnmatch.cpp
prompt.cpp
stringutils.cpp
Any.cpp
#AnyVal.cpp
#AreaMemoryManager.cpp
BinaryFormat.cpp
BinaryInput.cpp
BinaryOutput.cpp
Box.cpp
#Box2D.cpp
#BumpMapPreprocess.cpp
Capsule.cpp
CollisionDetection.cpp
#Color1.cpp
#Color1uint8.cpp
#Color3.cpp
#Color3uint8.cpp
#Color4.cpp
#Color4uint8.cpp
#Cone.cpp
#ConvexPolyhedron.cpp
CoordinateFrame.cpp
Crypto.cpp
#Crypto_md5.cpp
Cylinder.cpp
FileSystem.cpp
#GCamera.cpp
#GImage.cpp
#GImage_bayer.cpp
#GImage_bmp.cpp
#GImage_jpeg.cpp
#GImage_png.cpp
#GImage_ppm.cpp
#GImage_tga.cpp
#GLight.cpp
#GThread.cpp
#GUniqueID.cpp
#Image1.cpp
#Image1uint8.cpp
#Image3.cpp
#Image3uint8.cpp
#Image4.cpp
#Image4uint8.cpp
#ImageFormat.cpp
#ImageFormat_convert.cpp
#Intersect.cpp
Line.cpp
LineSegment.cpp
Log.cpp
#Matrix.cpp
Matrix3.cpp
Matrix4.cpp
MemoryManager.cpp
#MeshAlg.cpp
#MeshAlgAdjacency.cpp
#MeshAlgWeld.cpp
#MeshBuilder.cpp
#NetAddress.cpp
#NetworkDevice.cpp
PhysicsFrame.cpp
#PhysicsFrameSpline.cpp
Plane.cpp
#PrecomputedRandom.cpp
Quat.cpp
Random.cpp
Ray.cpp
#Rect2D.cpp
ReferenceCount.cpp
RegistryUtil.cpp
Sphere.cpp
#SplineBase.cpp
#Stopwatch.cpp
System.cpp
TextInput.cpp
TextOutput.cpp
#ThreadSet.cpp
Triangle.cpp
UprightFrame.cpp
Vector2.cpp
#Vector2int16.cpp
Vector3.cpp
#Vector3int16.cpp
#Vector3int32.cpp
Vector4.cpp
#Vector4int8.cpp
#Welder.cpp
#WinMain.cpp
#XML.cpp
#constants.cpp
debugAssert.cpp
fileutils.cpp
#filter.cpp
format.cpp
g3dfnmatch.cpp
g3dmath.cpp
#license.cpp
prompt.cpp
stringutils.cpp
uint128.cpp
)
include_directories(
@ -67,12 +126,12 @@ include_directories(
${CMAKE_SOURCE_DIR}/dep/include/zlib
)
add_library(g3dlite STATIC
${g3dlite_SRCS}
add_library(${LIBRARY_NAME} STATIC
${LIBRARY_SRCS}
)
if(WIN32)
target_link_libraries(g3dlite
target_link_libraries(${LIBRARY_NAME}
zlib
)
endif()

View file

@ -16,13 +16,17 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
file(GLOB gsoap_SRCS *.cpp)
set(LIBRARY_NAME gsoap)
set(LIBRARY_SRCS
stdsoap2.cpp
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/dep/include/gsoap
)
add_library(gsoap STATIC
${gsoap_SRCS}
add_library(${LIBRARY_NAME} STATIC
${LIBRARY_SRCS}
)

View file

@ -16,7 +16,17 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
file(GLOB_RECURSE mangosscript_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h)
set(LIBRARY_NAME mangosscript)
set(LIBRARY_SRCS
config.h
ScriptMgr.cpp
ScriptMgr.h
system.cpp
Scripts/sc_default.cpp
Scripts/sc_defines.cpp
Scripts/sc_defines.h
)
include_directories(
${CMAKE_SOURCE_DIR}/src/shared
@ -26,60 +36,59 @@ include_directories(
${MYSQL_INCLUDE_DIR}
)
add_library(mangosscript SHARED
${mangosscript_SRCS}
add_library(${LIBRARY_NAME} SHARED
${LIBRARY_SRCS}
)
add_dependencies(mangosscript revision.h)
add_dependencies(${LIBRARY_NAME} revision.h)
if(NOT ACE_USE_EXTERNAL)
add_dependencies(mangosscript ACE_Project)
# add_dependencies(mangosscript ace)
add_dependencies(${LIBRARY_NAME} ACE_Project)
endif()
target_link_libraries(mangosscript
target_link_libraries(${LIBRARY_NAME}
${ZLIB_LIBRARIES}
${ACE_LIBRARIES}
)
if(WIN32)
target_link_libraries(mangosscript
target_link_libraries(${LIBRARY_NAME}
mangosd # FIXME: could this be done for unix? because unix won't generate exe.libs
)
if(WIN32 AND PLATFORM MATCHES X86)
target_link_libraries(mangosscript
target_link_libraries(${LIBRARY_NAME}
debug ${WIN_DEBUGLIBS}
)
endif()
endif()
if(UNIX)
set(mangosscript_LINK_FLAGS "-pthread")
set(LIBRARY_LINK_FLAGS "-pthread")
if(APPLE)
set(mangosscript_LINK_FLAGS "-framework Carbon ${mangosscript_LINK_FLAGS}")
set(LIBRARY_LINK_FLAGS "-framework Carbon ${LIBRARY_LINK_FLAGS}")
# Needed for the linking because of the missing symbols
set(mangosscript_LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup ${mangosscript_LINK_FLAGS}")
set(LIBRARY_LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup ${LIBRARY_LINK_FLAGS}")
endif()
if(APPLE)
set(mangosscript_PROPERTIES INSTALL_NAME_DIR "${LIBS_DIR}")
set(LIBRARY_PROPERTIES INSTALL_NAME_DIR "${LIBS_DIR}")
else()
set(mangosscript_PROPERTIES INSTALL_RPATH ${LIBS_DIR})
set(LIBRARY_PROPERTIES INSTALL_RPATH ${LIBS_DIR})
endif()
# Run out of build tree
set(mangosscript_PROPERTIES
${mangosscript_PROPERTIES}
set(LIBRARY_PROPERTIES
${LIBRARY_PROPERTIES}
BUILD_WITH_INSTALL_RPATH OFF
)
set_target_properties(mangosscript PROPERTIES
LINK_FLAGS ${mangosscript_LINK_FLAGS}
${mangosscript_PROPERTIES}
set_target_properties(${LIBRARY_NAME} PROPERTIES
LINK_FLAGS ${LIBRARY_LINK_FLAGS}
${LIBRARY_PROPERTIES}
)
endif()
# LIBRARY = dyld / so, RUNTIME = dll
install(TARGETS mangosscript
install(TARGETS ${LIBRARY_NAME}
LIBRARY DESTINATION ${LIBS_DIR}
RUNTIME DESTINATION ${LIBS_DIR}
)

View file

@ -16,9 +16,37 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# include(${CMAKE_SOURCE_DIR}/dep/tbb/tbbinclude.cmake)
set(LIBRARY_NAME framework)
file(GLOB_RECURSE framework_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h)
set(LIBRARY_SRCS
Dynamic/FactoryHolder.h
Dynamic/ObjectRegistry.h
GameSystem/Grid.h
GameSystem/GridLoader.h
GameSystem/GridReference.h
GameSystem/GridRefManager.h
GameSystem/NGrid.h
GameSystem/TypeContainer.h
GameSystem/TypeContainerFunctions.h
GameSystem/TypeContainerVisitor.h
Platform/CompilerDefs.h
Platform/Define.h
Policies/CreationPolicy.h
Policies/MemoryManagement.cpp
Policies/ObjectLifeTime.cpp
Policies/ObjectLifeTime.h
Policies/Singleton.h
Policies/ThreadingModel.h
Utilities/ByteConverter.h
Utilities/Callback.h
Utilities/EventProcessor.cpp
Utilities/EventProcessor.h
Utilities/LinkedList.h
Utilities/LinkedReference/Reference.h
Utilities/LinkedReference/RefManager.h
Utilities/TypeList.h
Utilities/UnorderedMapSet.h
)
source_group("Other"
REGULAR_EXPRESSION .*
@ -53,20 +81,17 @@ include_directories(
${ACE_INCLUDE_DIR}
)
add_library(framework STATIC
${framework_SRCS}
add_library(${LIBRARY_NAME} STATIC
${LIBRARY_SRCS}
)
if(NOT TBB_USE_EXTERNAL)
add_dependencies(framework TBB_Project)
# add_dependencies(framework tbb)
# add_dependencies(framework tbbmalloc)
add_dependencies(${LIBRARY_NAME} TBB_Project)
endif()
if(NOT ACE_USE_EXTERNAL)
add_dependencies(framework ACE_Project)
# add_dependencies(framework ace)
add_dependencies(${LIBRARY_NAME} ACE_Project)
endif()
target_link_libraries(framework
target_link_libraries(${LIBRARY_NAME}
${TBB_LIBRARIES}
)

View file

@ -16,7 +16,357 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
file(GLOB_RECURSE game_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h)
set(LIBRARY_NAME game)
set(LIBRARY_SRCS
AccountMgr.cpp
AccountMgr.h
AchievementMgr.cpp
AchievementMgr.h
AggressorAI.cpp
AggressorAI.h
ArenaTeam.cpp
ArenaTeam.h
ArenaTeamHandler.cpp
AuctionHouseBot/AuctionHouseBot.cpp
AuctionHouseBot/AuctionHouseBot.h
AuctionHouseHandler.cpp
AuctionHouseMgr.cpp
AuctionHouseMgr.h
Bag.cpp
Bag.h
BattleGround/BattleGround.cpp
BattleGround/BattleGround.h
BattleGround/BattleGroundAA.cpp
BattleGround/BattleGroundAA.h
BattleGround/BattleGroundAB.cpp
BattleGround/BattleGroundAB.h
BattleGround/BattleGroundAV.cpp
BattleGround/BattleGroundAV.h
BattleGround/BattleGroundBE.cpp
BattleGround/BattleGroundBE.h
BattleGround/BattleGroundDS.cpp
BattleGround/BattleGroundDS.h
BattleGround/BattleGroundEY.cpp
BattleGround/BattleGroundEY.h
BattleGround/BattleGroundHandler.cpp
BattleGround/BattleGroundIC.cpp
BattleGround/BattleGroundIC.h
BattleGround/BattleGroundMgr.cpp
BattleGround/BattleGroundMgr.h
BattleGround/BattleGroundNA.cpp
BattleGround/BattleGroundNA.h
BattleGround/BattleGroundRB.cpp
BattleGround/BattleGroundRB.h
BattleGround/BattleGroundRL.cpp
BattleGround/BattleGroundRL.h
BattleGround/BattleGroundRV.cpp
BattleGround/BattleGroundRV.h
BattleGround/BattleGroundSA.cpp
BattleGround/BattleGroundSA.h
BattleGround/BattleGroundWS.cpp
BattleGround/BattleGroundWS.h
Calendar.cpp
Calendar.h
CalendarHandler.cpp
Camera.cpp
Camera.h
Cell.h
CellImpl.h
Channel.cpp
Channel.h
ChannelHandler.cpp
ChannelMgr.cpp
ChannelMgr.h
CharacterDatabaseCleaner.cpp
CharacterDatabaseCleaner.h
CharacterHandler.cpp
Chat.cpp
Chat.h
ChatHandler.cpp
CombatHandler.cpp
ConfusedMovementGenerator.cpp
ConfusedMovementGenerator.h
Corpse.cpp
Corpse.h
Creature.cpp
Creature.h
CreatureAI.cpp
CreatureAI.h
CreatureAIImpl.h
CreatureAIRegistry.cpp
CreatureAIRegistry.h
CreatureAISelector.cpp
CreatureAISelector.h
CreatureEventAI.cpp
CreatureEventAI.h
CreatureEventAIMgr.cpp
CreatureEventAIMgr.h
CreatureLinkingMgr.cpp
CreatureLinkingMgr.h
DB2fmt.h
DB2Stores.cpp
DB2Stores.h
DB2Structure.h
DBCEnums.h
DBCfmt.h
DBCStores.cpp
DBCStores.h
DBCStructure.cpp
DBCStructure.h
debugcmds.cpp
DuelHandler.cpp
DynamicObject.cpp
DynamicObject.h
FleeingMovementGenerator.cpp
FleeingMovementGenerator.h
FollowerReference.cpp
FollowerReference.h
FollowerRefManager.h
Formulas.h
GameEventMgr.cpp
GameEventMgr.h
GameObject.cpp
GameObject.h
GMTicketHandler.cpp
GMTicketMgr.cpp
GMTicketMgr.h
GossipDef.cpp
GossipDef.h
GridDefines.h
GridMap.cpp
GridMap.h
GridNotifiers.cpp
GridNotifiers.h
GridNotifiersImpl.h
GridStates.cpp
GridStates.h
Group.cpp
Group.h
GroupHandler.cpp
GroupReference.cpp
GroupReference.h
GroupRefManager.h
GuardAI.cpp
GuardAI.h
Guild.cpp
Guild.h
GuildHandler.cpp
GuildMgr.cpp
GuildMgr.h
HomeMovementGenerator.cpp
HomeMovementGenerator.h
HostileRefManager.cpp
HostileRefManager.h
IdleMovementGenerator.cpp
IdleMovementGenerator.h
InstanceData.cpp
InstanceData.h
Item.cpp
Item.h
ItemEnchantmentMgr.cpp
ItemEnchantmentMgr.h
ItemHandler.cpp
ItemPrototype.h
Language.h
Level0.cpp
Level1.cpp
Level2.cpp
Level3.cpp
LFGHandler.cpp
LootHandler.cpp
LootMgr.cpp
LootMgr.h
Mail.cpp
Mail.h
MailHandler.cpp
Map.cpp
Map.h
MapManager.cpp
MapManager.h
MapPersistentStateMgr.cpp
MapPersistentStateMgr.h
MapReference.h
MapRefManager.h
MassMailMgr.cpp
MassMailMgr.h
MiscHandler.cpp
MotionMaster.cpp
MotionMaster.h
MoveMap.cpp
MoveMap.h
MoveMapSharedDefines.h
movement/MoveSpline.cpp
movement/MoveSpline.h
movement/MoveSplineFlag.h
movement/MoveSplineInit.cpp
movement/MoveSplineInit.h
movement/MoveSplineInitArgs.h
movement/packet_builder.cpp
movement/packet_builder.h
movement/spline.cpp
movement/spline.h
movement/spline.impl.h
movement/typedefs.h
movement/util.cpp
MovementGenerator.cpp
MovementGenerator.h
MovementGeneratorImpl.h
MovementHandler.cpp
MovementStructures.h
NPCHandler.cpp
NPCHandler.h
NullCreatureAI.cpp
NullCreatureAI.h
Object.cpp
Object.h
ObjectAccessor.cpp
ObjectAccessor.h
ObjectGridLoader.cpp
ObjectGridLoader.h
ObjectGuid.cpp
ObjectGuid.h
ObjectMgr.cpp
ObjectMgr.h
ObjectPosSelector.cpp
ObjectPosSelector.h
Opcodes.cpp
Opcodes.h
OutdoorPvP/OutdoorPvP.cpp
OutdoorPvP/OutdoorPvP.h
OutdoorPvP/OutdoorPvPEP.cpp
OutdoorPvP/OutdoorPvPEP.h
OutdoorPvP/OutdoorPvPGH.cpp
OutdoorPvP/OutdoorPvPGH.h
OutdoorPvP/OutdoorPvPHP.cpp
OutdoorPvP/OutdoorPvPHP.h
OutdoorPvP/OutdoorPvPMgr.cpp
OutdoorPvP/OutdoorPvPMgr.h
OutdoorPvP/OutdoorPvPNA.cpp
OutdoorPvP/OutdoorPvPNA.h
OutdoorPvP/OutdoorPvPSI.cpp
OutdoorPvP/OutdoorPvPSI.h
OutdoorPvP/OutdoorPvPTF.cpp
OutdoorPvP/OutdoorPvPTF.h
OutdoorPvP/OutdoorPvPZM.cpp
OutdoorPvP/OutdoorPvPZM.h
Path.h
PathFinder.cpp
PathFinder.h
pchdef.cpp
pchdef.h
Pet.cpp
Pet.h
PetAI.cpp
PetAI.h
PetHandler.cpp
PetitionsHandler.cpp
Player.cpp
Player.h
PlayerDump.cpp
PlayerDump.h
PointMovementGenerator.cpp
PointMovementGenerator.h
PoolManager.cpp
PoolManager.h
QueryHandler.cpp
QuestDef.cpp
QuestDef.h
QuestHandler.cpp
RandomMovementGenerator.cpp
RandomMovementGenerator.h
ReactorAI.cpp
ReactorAI.h
ReputationMgr.cpp
ReputationMgr.h
ScriptMgr.cpp
ScriptMgr.h
SharedDefines.h
SkillDiscovery.cpp
SkillDiscovery.h
SkillExtraItems.cpp
SkillExtraItems.h
SkillHandler.cpp
SocialMgr.cpp
SocialMgr.h
Spell.cpp
Spell.h
SpellAuraDefines.h
SpellAuras.cpp
SpellAuras.h
SpellEffects.cpp
SpellHandler.cpp
SpellMgr.cpp
SpellMgr.h
SQLStorages.cpp
SQLStorages.h
StatSystem.cpp
TargetedMovementGenerator.cpp
TargetedMovementGenerator.h
TaxiHandler.cpp
TemporarySummon.cpp
TemporarySummon.h
ThreatManager.cpp
ThreatManager.h
Totem.cpp
Totem.h
TotemAI.cpp
TotemAI.h
TradeHandler.cpp
Transports.cpp
Transports.h
TransportSystem.cpp
TransportSystem.h
Unit.cpp
Unit.h
UnitAuraProcHandler.cpp
UnitEvents.h
UpdateData.cpp
UpdateData.h
UpdateFields.h
UpdateMask.h
Vehicle.cpp
Vehicle.h
VehicleHandler.cpp
vmap/BIH.cpp
vmap/BIH.h
vmap/BIHWrap.h
vmap/DynamicTree.cpp
vmap/DynamicTree.h
vmap/GameObjectModel.cpp
vmap/GameObjectModel.h
vmap/IVMapManager.h
vmap/MapTree.cpp
vmap/MapTree.h
vmap/ModelInstance.cpp
vmap/ModelInstance.h
vmap/RegularGrid.h
vmap/TileAssembler.cpp
vmap/TileAssembler.h
vmap/VMapDefinitions.h
vmap/VMapFactory.cpp
vmap/VMapFactory.h
vmap/VMapManager2.cpp
vmap/VMapManager2.h
vmap/VMapTools.h
vmap/WorldModel.cpp
vmap/WorldModel.h
VoiceChatHandler.cpp
WaypointManager.cpp
WaypointManager.h
WaypointMovementGenerator.cpp
WaypointMovementGenerator.h
Weather.cpp
Weather.h
World.cpp
World.h
WorldSession.cpp
WorldSession.h
WorldSocket.cpp
WorldSocket.h
WorldSocketMgr.cpp
WorldSocketMgr.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
@ -80,11 +430,11 @@ if(PCH)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
endif()
add_library(game STATIC
${game_SRCS}
add_library(${LIBRARY_NAME} STATIC
${LIBRARY_SRCS}
)
target_link_libraries(game
target_link_libraries(${LIBRARY_NAME}
shared
detour
)
@ -92,16 +442,15 @@ target_link_libraries(game
if(UNIX)
# Both systems don't have libdl and don't need them
if (NOT (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD"))
target_link_libraries(game
target_link_libraries(${LIBRARY_NAME}
dl
)
endif()
endif()
add_dependencies(game revision.h)
add_dependencies(${LIBRARY_NAME} revision.h)
if(NOT ACE_USE_EXTERNAL)
add_dependencies(game ACE_Project)
# add_dependencies(game ace)
add_dependencies(${LIBRARY_NAME} ACE_Project)
endif()
# Generate precompiled header
@ -110,12 +459,11 @@ if(PCH)
if(MSVC)
set(game_pch "${CMAKE_CURRENT_SOURCE_DIR}/pchdef.cpp")
endif()
add_native_precompiled_header(game ${CMAKE_CURRENT_SOURCE_DIR}/pchdef.h)
add_native_precompiled_header(${LIBRARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/pchdef.h)
elseif(CMAKE_COMPILER_IS_GNUCXX)
add_precompiled_header(game ${CMAKE_CURRENT_SOURCE_DIR}/pchdef.h)
add_precompiled_header(${LIBRARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/pchdef.h)
if(NOT ACE_USE_EXTERNAL)
add_dependencies(game_pch_dephelp ACE_Project)
# add_dependencies(game_pch_dephelp ace)
endif()
endif()
endif()

View file

@ -17,12 +17,28 @@
#
set(EXECUTABLE_NAME mangosd)
file(GLOB_RECURSE EXECUTABLE_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h)
set(EXECUTABLE_SRCS
CliRunnable.cpp
CliRunnable.h
MaNGOSsoap.cpp
MaNGOSsoap.h
Main.cpp
Master.cpp
Master.h
RASocket.cpp
RASocket.h
WorldRunnable.cpp
WorldRunnable.h
soapC.cpp
soapH.h
soapServer.cpp
soapStub.h
)
if(WIN32)
list(APPEND EXECUTABLE_SRCS
mangosd.rc
)
# add resource file to windows build
set(EXECUTABLE_SRCS ${EXECUTABLE_SRCS} mangosd.rc)
endif()
include_directories(

View file

@ -17,12 +17,23 @@
#
set(EXECUTABLE_NAME realmd)
file(GLOB_RECURSE EXECUTABLE_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h)
set(EXECUTABLE_SRCS
AuthCodes.h
AuthSocket.cpp
AuthSocket.h
BufferedSocket.cpp
BufferedSocket.h
Main.cpp
PatchHandler.cpp
PatchHandler.h
RealmList.cpp
RealmList.h
)
if(WIN32)
list(APPEND EXECUTABLE_SRCS
realmd.rc
)
# add resource file to windows build
set(EXECUTABLE_SRCS ${EXECUTABLE_SRCS} realmd.rc)
endif()
include_directories(

View file

@ -16,29 +16,97 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Glob only and not recurse, there are other libs for that
file(GLOB_RECURSE shared_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h)
set(LIBRARY_NAME shared)
# Exclude Win32 files
if(WIN32)
list(REMOVE_ITEM shared_SRCS
PosixDaemon.h
PosixDaemon.cpp
set(LIBRARY_SRCS
Auth/AuthCrypt.cpp
Auth/AuthCrypt.h
Auth/BigNumber.cpp
Auth/BigNumber.h
Auth/HMACSHA1.cpp
Auth/HMACSHA1.h
Auth/md5.h
Auth/SARC4.cpp
Auth/SARC4.h
Auth/Sha1.cpp
Auth/Sha1.h
ByteBuffer.cpp
ByteBuffer.h
Common.cpp
Common.h
Config/Config.cpp
Config/Config.h
Database/Database.cpp
Database/Database.h
Database/DatabaseEnv.h
Database/DatabaseImpl.h
Database/DatabaseMysql.cpp
Database/DatabaseMysql.h
Database/DatabasePostgre.cpp
Database/DatabasePostgre.h
Database/DB2FileLoader.cpp
Database/DB2FileLoader.h
Database/DB2Store.h
Database/DBCFileLoader.cpp
Database/DBCFileLoader.h
Database/DBCStore.h
Database/Field.cpp
Database/Field.h
Database/PGSQLDelayThread.h
Database/QueryResult.h
Database/QueryResultMysql.cpp
Database/QueryResultMysql.h
Database/QueryResultPostgre.cpp
Database/QueryResultPostgre.h
Database/SqlDelayThread.cpp
Database/SqlDelayThread.h
Database/SqlOperations.cpp
Database/SqlOperations.h
Database/SqlPreparedStatement.cpp
Database/SqlPreparedStatement.h
Database/SQLStorage.cpp
Database/SQLStorage.h
Database/SQLStorageImpl.h
Errors.h
LockedQueue.h
Log.cpp
Log.h
ProgressBar.cpp
ProgressBar.h
revision_nr.h
revision_sql.h
SystemConfig.h
Threading.cpp
Threading.h
Timer.h
Util.cpp
Util.h
WorldPacket.h
)
else()
list(REMOVE_ITEM shared_SRCS
# OS specific files
if(WIN32)
set(LIBRARY_SRCS
${LIBRARY_SRCS}
WheatyExceptionReport.cpp
WheatyExceptionReport.h
ServiceWin32.cpp
ServiceWin32.h
)
else()
set(LIBRARY_SRCS
${LIBRARY_SRCS}
PosixDaemon.cpp
PosixDaemon.h
)
endif()
source_group("Util"
REGULAR_EXPRESSION .*
)
foreach(SRC ${shared_SRCS})
# TODO: really needed?
foreach(SRC ${LIBRARY_SRCS})
get_filename_component(PTH ${SRC} PATH)
if(PTH)
if(NOT XCODE) # FIXME: Xcode Generator has bug with nested dirs
@ -67,12 +135,11 @@ include_directories(
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/SystemConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/SystemConfig.h)
add_library(shared STATIC
${shared_SRCS}
add_library(${LIBRARY_NAME} STATIC
${LIBRARY_SRCS}
)
add_dependencies(shared revision.h)
add_dependencies(${LIBRARY_NAME} revision.h)
if(NOT ACE_USE_EXTERNAL)
add_dependencies(shared ACE_Project)
# add_dependencies(shared ace)
add_dependencies(${LIBRARY_NAME} ACE_Project)
endif()

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12537"
#define REVISION_NR "12538"
#endif // __REVISION_NR_H__