diff options
author | madmaxoft <github@xoft.cz> | 2014-03-30 19:17:33 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-03-30 19:17:33 +0200 |
commit | 1bda9b042403bbc20c564a582435a083fc4dcc84 (patch) | |
tree | 8210ebddd8925889c31d3b4fb77e813b3aea6ec1 /src/CMakeLists.txt | |
parent | APIDump: Added article: Setting up ZeroBrane Studio. (diff) | |
parent | Added all current NetherFort prefabs. (diff) | |
download | cuberite-1bda9b042403bbc20c564a582435a083fc4dcc84.tar cuberite-1bda9b042403bbc20c564a582435a083fc4dcc84.tar.gz cuberite-1bda9b042403bbc20c564a582435a083fc4dcc84.tar.bz2 cuberite-1bda9b042403bbc20c564a582435a083fc4dcc84.tar.lz cuberite-1bda9b042403bbc20c564a582435a083fc4dcc84.tar.xz cuberite-1bda9b042403bbc20c564a582435a083fc4dcc84.tar.zst cuberite-1bda9b042403bbc20c564a582435a083fc4dcc84.zip |
Diffstat (limited to '')
-rw-r--r-- | src/CMakeLists.txt | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 448dc4b70..30e9dbfd4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,14 +6,14 @@ include_directories (SYSTEM "${PROJECT_SOURCE_DIR}/../lib/jsoncpp/include") include_directories (SYSTEM "${PROJECT_SOURCE_DIR}/../lib/polarssl/include") set(FOLDERS OSSupport HTTPServer Items Blocks Protocol Generating) -set(FOLDERS ${FOLDERS} WorldStorage Mobs Entities Simulator UI BlockEntities) +set(FOLDERS ${FOLDERS} WorldStorage Mobs Entities Simulator UI BlockEntities Generating/Prefabs) if (NOT MSVC) - #Bindings needs to reference other folders so are done here + # Bindings need to reference other folders, so they are done here instead - #lib dependecies are not included + # lib dependencies are not included set(BINDING_DEPENDECIES tolua @@ -104,7 +104,6 @@ if (NOT MSVC) Bindings/PluginLua Bindings/PluginManager Bindings/WebPlugin - Bindings/WebPlugin ) target_link_libraries(Bindings lua sqlite tolualib) @@ -138,6 +137,7 @@ if (NOT MSVC) else () + # MSVC-specific handling: Put all files into one project, separate by the folders: # Generate the Bindings if they don't exist: if (NOT EXISTS "${PROJECT_SOURCE_DIR}/Bindings/Bindings.cpp") @@ -149,6 +149,14 @@ else () ) endif() + # Get all files in this folder: + file(GLOB_RECURSE SOURCE + "*.cpp" + "*.h" + "*.pkg" + ) + source_group("" FILES ${SOURCE}) + # Add all subfolders as solution-folders: list(APPEND FOLDERS "Resources") list(APPEND FOLDERS "Bindings") @@ -159,23 +167,16 @@ else () "${PATH}/*.rc" "${PATH}/*.pkg" ) - source_group("${PATH}" FILES ${FOLDER_FILES}) + string(REPLACE "/" "\\" PROJECT_PATH ${PATH}) + source_group("${PROJECT_PATH}" FILES ${FOLDER_FILES}) endfunction(includefolder) foreach(folder ${FOLDERS}) includefolder(${folder}) endforeach(folder) - file(GLOB_RECURSE SOURCE - "*.cpp" - "*.h" - "*.pkg" - ) - include_directories("${PROJECT_SOURCE_DIR}") - source_group("" FILES ${SOURCE}) - # Precompiled headers (1st part) SET_SOURCE_FILES_PROPERTIES( Globals.cpp PROPERTIES COMPILE_FLAGS "/Yc\"Globals.h\"" @@ -231,7 +232,7 @@ endif () if (NOT MSVC) target_link_libraries(${EXECUTABLE} OSSupport HTTPServer Bindings Items Blocks) - target_link_libraries(${EXECUTABLE} Protocol Generating WorldStorage) + target_link_libraries(${EXECUTABLE} Protocol Generating Generating_Prefabs WorldStorage) target_link_libraries(${EXECUTABLE} Mobs Entities Simulator UI BlockEntities) endif () if (WIN32) |