Skip to content

Commit

Permalink
[12541] Add CMake source groups to target 'shared'
Browse files Browse the repository at this point in the history
This is the exact same grouping as it is currently in the VC 2012 files.

This is part of cmangos/issues#67
  • Loading branch information
DasBlub committed Sep 6, 2013
1 parent 6796ff3 commit 82b02fc
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 39 deletions.
110 changes: 72 additions & 38 deletions src/shared/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

set(LIBRARY_NAME shared)

set(LIBRARY_SRCS
set(SRC_GRP_AUTH
Auth/AuthCrypt.cpp
Auth/AuthCrypt.h
Auth/BigNumber.cpp
Expand All @@ -30,12 +30,14 @@ set(LIBRARY_SRCS
Auth/SARC4.h
Auth/Sha1.cpp
Auth/Sha1.h
ByteBuffer.cpp
ByteBuffer.h
Common.cpp
Common.h
)

set(SRC_GRP_CONFIG
Config/Config.cpp
Config/Config.h
)

set(SRC_GRP_DATABASE
Database/Database.cpp
Database/Database.h
Database/DatabaseEnv.h
Expand All @@ -44,9 +46,6 @@ set(LIBRARY_SRCS
Database/DatabaseMysql.h
Database/DatabasePostgre.cpp
Database/DatabasePostgre.h
Database/DBCFileLoader.cpp
Database/DBCFileLoader.h
Database/DBCStore.h
Database/Field.cpp
Database/Field.h
Database/PGSQLDelayThread.h
Expand All @@ -64,22 +63,80 @@ set(LIBRARY_SRCS
Database/SQLStorage.cpp
Database/SQLStorage.h
Database/SQLStorageImpl.h
Errors.h
LockedQueue.h
)

set(SRC_GRP_DATABASE_DBC
Database/DBCFileLoader.cpp
Database/DBCFileLoader.h
Database/DBCStore.h
)

set(SRC_GRP_LOG
Log.cpp
Log.h
)

set(SRC_GRP_UTIL
ByteBuffer.cpp
ByteBuffer.h
Errors.h
# dep/include/mersennetwister/MersenneTwister.h is part of this group in the VC 2012 file but it is not part of src/shared, so it is omitted here
ProgressBar.cpp
ProgressBar.h
Timer.h
Util.cpp
Util.h
WorldPacket.h
)


set(LIBRARY_SRCS
${SRC_GRP_AUTH}
${SRC_GRP_CONFIG}
${SRC_GRP_DATABASE}
${SRC_GRP_DATABASE_DBC}
${SRC_GRP_LOG}
${SRC_GRP_UTIL}
Common.cpp
Common.h
LockedQueue.h
revision_nr.h
revision_sql.h
SystemConfig.h
Threading.cpp
Threading.h
Timer.h
Util.cpp
Util.h
WorldPacket.h
)
)


source_group("Auth"
FILES
${SRC_GRP_AUTH}
)

source_group("Config"
FILES
${SRC_GRP_CONFIG}
)

source_group("Database"
FILES
${SRC_GRP_DATABASE}
)

source_group("Database\\DataStores"
FILES
${SRC_GRP_DATABASE_DBC}
)

source_group("Log"
FILES
${SRC_GRP_LOG}
)

source_group("Util"
FILES
${SRC_GRP_UTIL}
)

# OS specific files
if(WIN32)
Expand All @@ -98,29 +155,6 @@ else()
)
endif()

source_group("Util"
REGULAR_EXPRESSION .*
)

# 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
string(REPLACE "/" "\\\\" PTH ${PTH})
endif()
source_group(${PTH} FILES ${SRC})
endif()
endforeach(SRC)

source_group("DataStores"
REGULAR_EXPRESSION DBC
)

source_group("Log"
REGULAR_EXPRESSION Log
)

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/dep/include
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12540"
#define REVISION_NR "12541"
#endif // __REVISION_NR_H__

0 comments on commit 82b02fc

Please sign in to comment.