diff options
author | tycho <tycho@hanoverdesktop> | 2013-12-19 16:07:45 +0100 |
---|---|---|
committer | tycho <tycho@hanoverdesktop> | 2013-12-19 16:07:45 +0100 |
commit | 7d096c41f71103489a855c9e838801d333897e60 (patch) | |
tree | 37ec79e115f4ba8bf51c273af7d9fea8559555a6 | |
parent | added md5 as a dependency for bindings (diff) | |
download | cuberite-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 |
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | src/CMakeLists.txt | 41 |
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") |