summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.gitignore7
-rw-r--r--src/CMakeLists.txt41
2 files changed, 35 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index 97bcfbd04..e3e704bb7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,3 +50,10 @@ install_mainfest.txt
src/MCServer
lib/tolua++/tolua
src/Bindings/Bindings.*
+
+#win32 cmake stuff
+*.vcxproj
+*.vcxproj.filters
+*.opensdf
+*.sdf
+*.sln
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")