summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortycho <tycho@hanoverdesktop>2013-12-19 16:07:45 +0100
committertycho <tycho@hanoverdesktop>2013-12-19 16:07:45 +0100
commit7d096c41f71103489a855c9e838801d333897e60 (patch)
tree37ec79e115f4ba8bf51c273af7d9fea8559555a6 /src
parentadded md5 as a dependency for bindings (diff)
downloadcuberite-7d096c41f71103489a855c9e838801d333897e60.tar
cuberite-7d096c41f71103489a855c9e838801d333897e60.tar.gz
cuberite-7d096c41f71103489a855c9e838801d333897e60.tar.bz2
cuberite-7d096c41f71103489a855c9e838801d333897e60.tar.lz
cuberite-7d096c41f71103489a855c9e838801d333897e60.tar.xz
cuberite-7d096c41f71103489a855c9e838801d333897e60.tar.zst
cuberite-7d096c41f71103489a855c9e838801d333897e60.zip
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt41
1 files changed, 28 insertions, 13 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 31c0e564a..e247df34e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -9,24 +9,39 @@ endif()
include_directories (SYSTEM "${PROJECT_SOURCE_DIR}/../lib/")
include_directories (SYSTEM "${PROJECT_SOURCE_DIR}/../lib/jsoncpp/include")
-add_subdirectory(OSSupport)
-add_subdirectory(HTTPServer)
-add_subdirectory(Bindings)
-add_subdirectory(Items)
-add_subdirectory(Blocks)
-add_subdirectory(Protocol)
-add_subdirectory(Generating)
-add_subdirectory(WorldStorage)
-add_subdirectory(Mobs)
-add_subdirectory(Entities)
-add_subdirectory(Simulator)
-add_subdirectory(UI)
-add_subdirectory(BlockEntities)
+set(FOLDERS OSSupport HTTPServer Bindings Items Blocks Protocol Generating)
+set(FOLDERS ${FOLDERS} WorldStorage Mobs Entities Simulator UI BlockEntities)
+if(NOT WIN32)
+
+foreach(folder ${FOLDERS})
+ add_subdirectory(${folder})
+endforeach(folder)
file(GLOB SOURCE
"*.cpp"
)
+else()
+
+function(includefolder PATH)
+ FILE(GLOB FOLDER_FILES
+ "${PATH}/*.cpp"
+ "${PATH}/*.h"
+ )
+ source_group("Source Files\\${PATH}" FILES ${FOLDER_FILES})
+endfunction(includefolder)
+
+foreach(folder ${FOLDERS})
+ includefolder(${folder})
+endforeach(folder)
+
+file(GLOB_RECURSE SOURCE
+ "*.cpp"
+ "*.h"
+)
+
+
+endif()
list(REMOVE_ITEM SOURCE "${PROJECT_SOURCE_DIR}/StackWalker.cpp" "${PROJECT_SOURCE_DIR}/LeakFinder.cpp")