diff --git a/CMakeLists.txt b/CMakeLists.txt index 7898a573d..620bf6d9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,22 @@ else(CMAKE_CONFIGURATION_TYPES) endif (NOT CMAKE_BUILD_TYPE) endif(CMAKE_CONFIGURATION_TYPES) +# set up folder structures for IDE solutions +if(NOT CMAKE_USING_VC_FREE_TOOLS) + SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON) + OPTION(CMAKE_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON) +else() + OPTION(CMAKE_USE_FOLDERS "Enable folder grouping of projects in IDEs." OFF) +endif() +MARK_AS_ADVANCED(CMAKE_USE_FOLDERS) + +# macro for setting up IDE folders without nasty IF()s everywhere +MACRO(IDE_FOLDER target folder) + if(CMAKE_USE_FOLDERS) + SET_PROPERTY(TARGET ${target} PROPERTY FOLDER ${folder}) + endif() +ENDMACRO() + ## some generic CMake magic cmake_minimum_required(VERSION 2.8 FATAL_ERROR) project(dfhack) @@ -78,27 +94,25 @@ IF(UNIX) SET(CMAKE_C_FLAGS "-fvisibility=hidden -m32 -march=i686 -mtune=generic") ENDIF() +# use shared libraries for protobuf +ADD_DEFINITIONS(-DPROTOBUF_USE_DLLS) + +#### expose depends #### + # find and make available libz if(NOT UNIX) - SET(ZLIB_INCLUDE_DIRS ${dfhack_SOURCE_DIR}/library/depends/zlib/include/) - SET(ZLIB_LIBRARIES ${dfhack_SOURCE_DIR}/library/depends/zlib/lib/zlib.lib) -else() - find_package(ZLIB REQUIRED) + SET(ZLIB_ROOT depends/zlib/) endif() +find_package(ZLIB REQUIRED) +include_directories(depends/protobuf) +include_directories(depends/lua/include) +include_directories(depends/md5) +include_directories(depends/tinyxml) +include_directories(depends/tthread) include_directories(${ZLIB_INCLUDE_DIRS}) +add_subdirectory(depends) -#add depends to include path -INCLUDE_DIRECTORIES ( library/depends ) -INCLUDE_DIRECTORIES ( library/depends/protobuf/ ) - -# use shared libraries for protobuf -ADD_DEFINITIONS(-DPROTOBUF_USE_DLLS) -IF(!UNIX) - # build the static lua for dfusion, win32 only - INCLUDE_DIRECTORIES ( lua/include ) - add_subdirectory (lua) -ENDIF() # build the lib itself IF(BUILD_LIBRARY) diff --git a/depends/CMakeLists.txt b/depends/CMakeLists.txt new file mode 100644 index 000000000..d16e83eaa --- /dev/null +++ b/depends/CMakeLists.txt @@ -0,0 +1,6 @@ +#list depends here. +add_subdirectory(lua) +add_subdirectory(md5) +add_subdirectory(protobuf) +add_subdirectory(tinyxml) +add_subdirectory(tthread) diff --git a/lua/CMakeLists.txt b/depends/lua/CMakeLists.txt similarity index 60% rename from lua/CMakeLists.txt rename to depends/lua/CMakeLists.txt index 2a1ccd8df..b135f221d 100644 --- a/lua/CMakeLists.txt +++ b/depends/lua/CMakeLists.txt @@ -13,6 +13,35 @@ IF(UNIX) SET(CMAKE_C_FLAGS "-m32") ENDIF() +SET (HDR_LIBLUA +include/bit.h +include/lapi.h +include/lauxlib.h +include/lcode.h +include/ldebug.h +include/ldo.h +include/lfunc.h +include/lgc.h +include/llex.h +include/llimits.h +include/lmem.h +include/lobject.h +include/lopcodes.h +include/lparser.h +include/lstate.h +include/lstring.h +include/ltable.h +include/ltm.h +include/lua.h +include/luaconf.h +include/lualib.h +include/lundump.h +include/lvm.h +include/lzio.h +) +SET_SOURCE_FILES_PROPERTIES(${HDR_LIBLUA} PROPERTIES HEADER_FILE_ONLY TRUE) +include_directories(include) + # Build Libraries SET (SRC_LIBLUA src/lapi.c @@ -45,9 +74,11 @@ src/lundump.c src/lvm.c src/lzio.c ) +LIST(APPEND SRC_LIBLUA ${HDR_LIBLUA}) -ADD_LIBRARY ( lua ${SRC_LIBLUA} ) +ADD_LIBRARY ( lua STATIC EXCLUDE_FROM_ALL ${SRC_LIBLUA} ) TARGET_LINK_LIBRARIES ( lua ${LIBS}) +IDE_FOLDER(lua "Depends") #SET ( SRC_LUA src/lua.c ) #SET ( SRC_LUAC src/luac.c src/print.c ) diff --git a/lua/COPYRIGHT b/depends/lua/COPYRIGHT similarity index 100% rename from lua/COPYRIGHT rename to depends/lua/COPYRIGHT diff --git a/lua/README b/depends/lua/README similarity index 100% rename from lua/README rename to depends/lua/README diff --git a/lua/include/bit.h b/depends/lua/include/bit.h similarity index 100% rename from lua/include/bit.h rename to depends/lua/include/bit.h diff --git a/lua/include/lapi.h b/depends/lua/include/lapi.h similarity index 100% rename from lua/include/lapi.h rename to depends/lua/include/lapi.h diff --git a/lua/include/lauxlib.h b/depends/lua/include/lauxlib.h similarity index 100% rename from lua/include/lauxlib.h rename to depends/lua/include/lauxlib.h diff --git a/lua/include/lcode.h b/depends/lua/include/lcode.h similarity index 100% rename from lua/include/lcode.h rename to depends/lua/include/lcode.h diff --git a/lua/include/ldebug.h b/depends/lua/include/ldebug.h similarity index 100% rename from lua/include/ldebug.h rename to depends/lua/include/ldebug.h diff --git a/lua/include/ldo.h b/depends/lua/include/ldo.h similarity index 100% rename from lua/include/ldo.h rename to depends/lua/include/ldo.h diff --git a/lua/include/lfunc.h b/depends/lua/include/lfunc.h similarity index 100% rename from lua/include/lfunc.h rename to depends/lua/include/lfunc.h diff --git a/lua/include/lgc.h b/depends/lua/include/lgc.h similarity index 100% rename from lua/include/lgc.h rename to depends/lua/include/lgc.h diff --git a/lua/include/llex.h b/depends/lua/include/llex.h similarity index 100% rename from lua/include/llex.h rename to depends/lua/include/llex.h diff --git a/lua/include/llimits.h b/depends/lua/include/llimits.h similarity index 100% rename from lua/include/llimits.h rename to depends/lua/include/llimits.h diff --git a/lua/include/lmem.h b/depends/lua/include/lmem.h similarity index 100% rename from lua/include/lmem.h rename to depends/lua/include/lmem.h diff --git a/lua/include/lobject.h b/depends/lua/include/lobject.h similarity index 100% rename from lua/include/lobject.h rename to depends/lua/include/lobject.h diff --git a/lua/include/lopcodes.h b/depends/lua/include/lopcodes.h similarity index 100% rename from lua/include/lopcodes.h rename to depends/lua/include/lopcodes.h diff --git a/lua/include/lparser.h b/depends/lua/include/lparser.h similarity index 100% rename from lua/include/lparser.h rename to depends/lua/include/lparser.h diff --git a/lua/include/lstate.h b/depends/lua/include/lstate.h similarity index 100% rename from lua/include/lstate.h rename to depends/lua/include/lstate.h diff --git a/lua/include/lstring.h b/depends/lua/include/lstring.h similarity index 100% rename from lua/include/lstring.h rename to depends/lua/include/lstring.h diff --git a/lua/include/ltable.h b/depends/lua/include/ltable.h similarity index 100% rename from lua/include/ltable.h rename to depends/lua/include/ltable.h diff --git a/lua/include/ltm.h b/depends/lua/include/ltm.h similarity index 100% rename from lua/include/ltm.h rename to depends/lua/include/ltm.h diff --git a/lua/include/lua.h b/depends/lua/include/lua.h similarity index 100% rename from lua/include/lua.h rename to depends/lua/include/lua.h diff --git a/lua/include/luaconf.h b/depends/lua/include/luaconf.h similarity index 100% rename from lua/include/luaconf.h rename to depends/lua/include/luaconf.h diff --git a/lua/include/lualib.h b/depends/lua/include/lualib.h similarity index 100% rename from lua/include/lualib.h rename to depends/lua/include/lualib.h diff --git a/lua/include/lundump.h b/depends/lua/include/lundump.h similarity index 100% rename from lua/include/lundump.h rename to depends/lua/include/lundump.h diff --git a/lua/include/lvm.h b/depends/lua/include/lvm.h similarity index 100% rename from lua/include/lvm.h rename to depends/lua/include/lvm.h diff --git a/lua/include/lzio.h b/depends/lua/include/lzio.h similarity index 100% rename from lua/include/lzio.h rename to depends/lua/include/lzio.h diff --git a/lua/src/bit.c b/depends/lua/src/bit.c similarity index 100% rename from lua/src/bit.c rename to depends/lua/src/bit.c diff --git a/lua/src/lapi.c b/depends/lua/src/lapi.c similarity index 100% rename from lua/src/lapi.c rename to depends/lua/src/lapi.c diff --git a/lua/src/lauxlib.c b/depends/lua/src/lauxlib.c similarity index 100% rename from lua/src/lauxlib.c rename to depends/lua/src/lauxlib.c diff --git a/lua/src/lbaselib.c b/depends/lua/src/lbaselib.c similarity index 100% rename from lua/src/lbaselib.c rename to depends/lua/src/lbaselib.c diff --git a/lua/src/lcode.c b/depends/lua/src/lcode.c similarity index 100% rename from lua/src/lcode.c rename to depends/lua/src/lcode.c diff --git a/lua/src/ldblib.c b/depends/lua/src/ldblib.c similarity index 100% rename from lua/src/ldblib.c rename to depends/lua/src/ldblib.c diff --git a/lua/src/ldebug.c b/depends/lua/src/ldebug.c similarity index 100% rename from lua/src/ldebug.c rename to depends/lua/src/ldebug.c diff --git a/lua/src/ldo.c b/depends/lua/src/ldo.c similarity index 100% rename from lua/src/ldo.c rename to depends/lua/src/ldo.c diff --git a/lua/src/ldump.c b/depends/lua/src/ldump.c similarity index 100% rename from lua/src/ldump.c rename to depends/lua/src/ldump.c diff --git a/lua/src/lfunc.c b/depends/lua/src/lfunc.c similarity index 100% rename from lua/src/lfunc.c rename to depends/lua/src/lfunc.c diff --git a/lua/src/lgc.c b/depends/lua/src/lgc.c similarity index 100% rename from lua/src/lgc.c rename to depends/lua/src/lgc.c diff --git a/lua/src/linit.c b/depends/lua/src/linit.c similarity index 100% rename from lua/src/linit.c rename to depends/lua/src/linit.c diff --git a/lua/src/liolib.c b/depends/lua/src/liolib.c similarity index 100% rename from lua/src/liolib.c rename to depends/lua/src/liolib.c diff --git a/lua/src/llex.c b/depends/lua/src/llex.c similarity index 100% rename from lua/src/llex.c rename to depends/lua/src/llex.c diff --git a/lua/src/lmathlib.c b/depends/lua/src/lmathlib.c similarity index 100% rename from lua/src/lmathlib.c rename to depends/lua/src/lmathlib.c diff --git a/lua/src/lmem.c b/depends/lua/src/lmem.c similarity index 100% rename from lua/src/lmem.c rename to depends/lua/src/lmem.c diff --git a/lua/src/loadlib.c b/depends/lua/src/loadlib.c similarity index 100% rename from lua/src/loadlib.c rename to depends/lua/src/loadlib.c diff --git a/lua/src/lobject.c b/depends/lua/src/lobject.c similarity index 100% rename from lua/src/lobject.c rename to depends/lua/src/lobject.c diff --git a/lua/src/lopcodes.c b/depends/lua/src/lopcodes.c similarity index 100% rename from lua/src/lopcodes.c rename to depends/lua/src/lopcodes.c diff --git a/lua/src/loslib.c b/depends/lua/src/loslib.c similarity index 100% rename from lua/src/loslib.c rename to depends/lua/src/loslib.c diff --git a/lua/src/lparser.c b/depends/lua/src/lparser.c similarity index 100% rename from lua/src/lparser.c rename to depends/lua/src/lparser.c diff --git a/lua/src/lstate.c b/depends/lua/src/lstate.c similarity index 100% rename from lua/src/lstate.c rename to depends/lua/src/lstate.c diff --git a/lua/src/lstring.c b/depends/lua/src/lstring.c similarity index 100% rename from lua/src/lstring.c rename to depends/lua/src/lstring.c diff --git a/lua/src/lstrlib.c b/depends/lua/src/lstrlib.c similarity index 100% rename from lua/src/lstrlib.c rename to depends/lua/src/lstrlib.c diff --git a/lua/src/ltable.c b/depends/lua/src/ltable.c similarity index 100% rename from lua/src/ltable.c rename to depends/lua/src/ltable.c diff --git a/lua/src/ltablib.c b/depends/lua/src/ltablib.c similarity index 100% rename from lua/src/ltablib.c rename to depends/lua/src/ltablib.c diff --git a/lua/src/ltm.c b/depends/lua/src/ltm.c similarity index 100% rename from lua/src/ltm.c rename to depends/lua/src/ltm.c diff --git a/lua/src/lua.c b/depends/lua/src/lua.c similarity index 100% rename from lua/src/lua.c rename to depends/lua/src/lua.c diff --git a/lua/src/luac.c b/depends/lua/src/luac.c similarity index 100% rename from lua/src/luac.c rename to depends/lua/src/luac.c diff --git a/lua/src/lundump.c b/depends/lua/src/lundump.c similarity index 100% rename from lua/src/lundump.c rename to depends/lua/src/lundump.c diff --git a/lua/src/lvm.c b/depends/lua/src/lvm.c similarity index 100% rename from lua/src/lvm.c rename to depends/lua/src/lvm.c diff --git a/lua/src/lzio.c b/depends/lua/src/lzio.c similarity index 100% rename from lua/src/lzio.c rename to depends/lua/src/lzio.c diff --git a/lua/src/print.c b/depends/lua/src/print.c similarity index 100% rename from lua/src/print.c rename to depends/lua/src/print.c diff --git a/depends/md5/CMakeLists.txt b/depends/md5/CMakeLists.txt new file mode 100644 index 000000000..69e0cf0b3 --- /dev/null +++ b/depends/md5/CMakeLists.txt @@ -0,0 +1,3 @@ +project(dfhack-md5) +ADD_LIBRARY(dfhack-md5 STATIC EXCLUDE_FROM_ALL md5.cpp md5wrapper.cpp) +IDE_FOLDER(dfhack-md5 "Depends") \ No newline at end of file diff --git a/library/depends/md5/md5.cpp b/depends/md5/md5.cpp similarity index 100% rename from library/depends/md5/md5.cpp rename to depends/md5/md5.cpp diff --git a/library/depends/md5/md5.h b/depends/md5/md5.h similarity index 100% rename from library/depends/md5/md5.h rename to depends/md5/md5.h diff --git a/library/depends/md5/md5wrapper.cpp b/depends/md5/md5wrapper.cpp similarity index 100% rename from library/depends/md5/md5wrapper.cpp rename to depends/md5/md5wrapper.cpp diff --git a/library/depends/md5/md5wrapper.h b/depends/md5/md5wrapper.h similarity index 100% rename from library/depends/md5/md5wrapper.h rename to depends/md5/md5wrapper.h diff --git a/library/depends/protobuf/.gitignore b/depends/protobuf/.gitignore similarity index 100% rename from library/depends/protobuf/.gitignore rename to depends/protobuf/.gitignore diff --git a/library/depends/protobuf/CMakeLists.txt b/depends/protobuf/CMakeLists.txt similarity index 94% rename from library/depends/protobuf/CMakeLists.txt rename to depends/protobuf/CMakeLists.txt index 0a203e5d4..f4a3b6d19 100644 --- a/library/depends/protobuf/CMakeLists.txt +++ b/depends/protobuf/CMakeLists.txt @@ -201,12 +201,15 @@ google/protobuf/compiler/zip_writer.cc LIST(APPEND LIBPROTOBUF_FULL_SRCS ${LIBPROTOBUF_LITE_SRCS}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +SET(PROTOBUF_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS}) # Protobuf shared libraries ADD_LIBRARY(protobuf SHARED ${LIBPROTOBUF_FULL_SRCS} ${LIBPROTOBUF_FULL_HDRS}) +IDE_FOLDER(protobuf "Depends") ADD_LIBRARY(protobuf-lite SHARED ${LIBPROTOBUF_LITE_SRCS} ${LIBPROTOBUF_LITE_HDRS}) +IDE_FOLDER(protobuf-lite "Depends") SET_TARGET_PROPERTIES(protobuf PROPERTIES COMPILE_DEFINITIONS LIBPROTOBUF_EXPORTS) SET_TARGET_PROPERTIES(protobuf-lite PROPERTIES COMPILE_DEFINITIONS LIBPROTOBUF_EXPORTS) @@ -215,12 +218,13 @@ TARGET_LINK_LIBRARIES(protobuf ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES}) TARGET_LINK_LIBRARIES(protobuf-lite ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES}) install(TARGETS protobuf-lite - LIBRARY DESTINATION ${DFHACK_LIBRARY_DESTINATION}/deplibs - RUNTIME DESTINATION ${DFHACK_LIBRARY_DESTINATION}/deplibs) + LIBRARY DESTINATION ${DFHACK_LIBRARY_DESTINATION} + RUNTIME DESTINATION ${DFHACK_LIBRARY_DESTINATION}) # Protobuf compiler shared library ADD_LIBRARY(protoc SHARED ${LIBPROTOC_SRCS} ${LIBPROTOC_HDRS}) +IDE_FOLDER(protoc "Depends") SET_TARGET_PROPERTIES(protoc PROPERTIES COMPILE_DEFINITIONS LIBPROTOC_EXPORTS) TARGET_LINK_LIBRARIES(protoc protobuf) @@ -228,6 +232,7 @@ TARGET_LINK_LIBRARIES(protoc protobuf) # Protobuf compiler executable ADD_EXECUTABLE(protoc-bin google/protobuf/compiler/main.cc google/protobuf/compiler/command_line_interface.h google/protobuf/compiler/cpp/cpp_generator.h) +IDE_FOLDER(protoc-bin "Depends") SET_TARGET_PROPERTIES(protoc-bin PROPERTIES OUTPUT_NAME protoc) TARGET_LINK_LIBRARIES(protoc-bin protoc) diff --git a/library/depends/protobuf/COPYING.txt b/depends/protobuf/COPYING.txt similarity index 100% rename from library/depends/protobuf/COPYING.txt rename to depends/protobuf/COPYING.txt diff --git a/library/depends/protobuf/config.h.in b/depends/protobuf/config.h.in similarity index 100% rename from library/depends/protobuf/config.h.in rename to depends/protobuf/config.h.in diff --git a/library/depends/protobuf/google/protobuf/compiler/code_generator.cc b/depends/protobuf/google/protobuf/compiler/code_generator.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/code_generator.cc rename to depends/protobuf/google/protobuf/compiler/code_generator.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/code_generator.h b/depends/protobuf/google/protobuf/compiler/code_generator.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/code_generator.h rename to depends/protobuf/google/protobuf/compiler/code_generator.h diff --git a/library/depends/protobuf/google/protobuf/compiler/command_line_interface.cc b/depends/protobuf/google/protobuf/compiler/command_line_interface.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/command_line_interface.cc rename to depends/protobuf/google/protobuf/compiler/command_line_interface.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/command_line_interface.h b/depends/protobuf/google/protobuf/compiler/command_line_interface.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/command_line_interface.h rename to depends/protobuf/google/protobuf/compiler/command_line_interface.h diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_enum.cc b/depends/protobuf/google/protobuf/compiler/cpp/cpp_enum.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_enum.cc rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_enum.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_enum.h b/depends/protobuf/google/protobuf/compiler/cpp/cpp_enum.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_enum.h rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_enum.h diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_enum_field.cc b/depends/protobuf/google/protobuf/compiler/cpp/cpp_enum_field.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_enum_field.cc rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_enum_field.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_enum_field.h b/depends/protobuf/google/protobuf/compiler/cpp/cpp_enum_field.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_enum_field.h rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_enum_field.h diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_extension.cc b/depends/protobuf/google/protobuf/compiler/cpp/cpp_extension.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_extension.cc rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_extension.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_extension.h b/depends/protobuf/google/protobuf/compiler/cpp/cpp_extension.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_extension.h rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_extension.h diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_field.cc b/depends/protobuf/google/protobuf/compiler/cpp/cpp_field.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_field.cc rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_field.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_field.h b/depends/protobuf/google/protobuf/compiler/cpp/cpp_field.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_field.h rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_field.h diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_file.cc b/depends/protobuf/google/protobuf/compiler/cpp/cpp_file.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_file.cc rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_file.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_file.h b/depends/protobuf/google/protobuf/compiler/cpp/cpp_file.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_file.h rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_file.h diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_generator.cc b/depends/protobuf/google/protobuf/compiler/cpp/cpp_generator.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_generator.cc rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_generator.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_generator.h b/depends/protobuf/google/protobuf/compiler/cpp/cpp_generator.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_generator.h rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_generator.h diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_helpers.cc b/depends/protobuf/google/protobuf/compiler/cpp/cpp_helpers.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_helpers.cc rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_helpers.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_helpers.h b/depends/protobuf/google/protobuf/compiler/cpp/cpp_helpers.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_helpers.h rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_helpers.h diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_message.cc b/depends/protobuf/google/protobuf/compiler/cpp/cpp_message.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_message.cc rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_message.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_message.h b/depends/protobuf/google/protobuf/compiler/cpp/cpp_message.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_message.h rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_message.h diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_message_field.cc b/depends/protobuf/google/protobuf/compiler/cpp/cpp_message_field.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_message_field.cc rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_message_field.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_message_field.h b/depends/protobuf/google/protobuf/compiler/cpp/cpp_message_field.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_message_field.h rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_message_field.h diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_primitive_field.cc b/depends/protobuf/google/protobuf/compiler/cpp/cpp_primitive_field.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_primitive_field.cc rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_primitive_field.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_primitive_field.h b/depends/protobuf/google/protobuf/compiler/cpp/cpp_primitive_field.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_primitive_field.h rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_primitive_field.h diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_service.cc b/depends/protobuf/google/protobuf/compiler/cpp/cpp_service.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_service.cc rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_service.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_service.h b/depends/protobuf/google/protobuf/compiler/cpp/cpp_service.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_service.h rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_service.h diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_string_field.cc b/depends/protobuf/google/protobuf/compiler/cpp/cpp_string_field.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_string_field.cc rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_string_field.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_string_field.h b/depends/protobuf/google/protobuf/compiler/cpp/cpp_string_field.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_string_field.h rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_string_field.h diff --git a/library/depends/protobuf/google/protobuf/compiler/cpp/cpp_unittest.cc b/depends/protobuf/google/protobuf/compiler/cpp/cpp_unittest.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/cpp/cpp_unittest.cc rename to depends/protobuf/google/protobuf/compiler/cpp/cpp_unittest.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/importer.cc b/depends/protobuf/google/protobuf/compiler/importer.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/importer.cc rename to depends/protobuf/google/protobuf/compiler/importer.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/importer.h b/depends/protobuf/google/protobuf/compiler/importer.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/importer.h rename to depends/protobuf/google/protobuf/compiler/importer.h diff --git a/library/depends/protobuf/google/protobuf/compiler/main.cc b/depends/protobuf/google/protobuf/compiler/main.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/main.cc rename to depends/protobuf/google/protobuf/compiler/main.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/mock_code_generator.cc b/depends/protobuf/google/protobuf/compiler/mock_code_generator.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/mock_code_generator.cc rename to depends/protobuf/google/protobuf/compiler/mock_code_generator.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/mock_code_generator.h b/depends/protobuf/google/protobuf/compiler/mock_code_generator.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/mock_code_generator.h rename to depends/protobuf/google/protobuf/compiler/mock_code_generator.h diff --git a/library/depends/protobuf/google/protobuf/compiler/package_info.h b/depends/protobuf/google/protobuf/compiler/package_info.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/package_info.h rename to depends/protobuf/google/protobuf/compiler/package_info.h diff --git a/library/depends/protobuf/google/protobuf/compiler/parser.cc b/depends/protobuf/google/protobuf/compiler/parser.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/parser.cc rename to depends/protobuf/google/protobuf/compiler/parser.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/parser.h b/depends/protobuf/google/protobuf/compiler/parser.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/parser.h rename to depends/protobuf/google/protobuf/compiler/parser.h diff --git a/library/depends/protobuf/google/protobuf/compiler/plugin.cc b/depends/protobuf/google/protobuf/compiler/plugin.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/plugin.cc rename to depends/protobuf/google/protobuf/compiler/plugin.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/plugin.h b/depends/protobuf/google/protobuf/compiler/plugin.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/plugin.h rename to depends/protobuf/google/protobuf/compiler/plugin.h diff --git a/library/depends/protobuf/google/protobuf/compiler/plugin.pb.cc b/depends/protobuf/google/protobuf/compiler/plugin.pb.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/plugin.pb.cc rename to depends/protobuf/google/protobuf/compiler/plugin.pb.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/plugin.pb.h b/depends/protobuf/google/protobuf/compiler/plugin.pb.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/plugin.pb.h rename to depends/protobuf/google/protobuf/compiler/plugin.pb.h diff --git a/library/depends/protobuf/google/protobuf/compiler/subprocess.cc b/depends/protobuf/google/protobuf/compiler/subprocess.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/subprocess.cc rename to depends/protobuf/google/protobuf/compiler/subprocess.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/subprocess.h b/depends/protobuf/google/protobuf/compiler/subprocess.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/subprocess.h rename to depends/protobuf/google/protobuf/compiler/subprocess.h diff --git a/library/depends/protobuf/google/protobuf/compiler/test_plugin.cc b/depends/protobuf/google/protobuf/compiler/test_plugin.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/test_plugin.cc rename to depends/protobuf/google/protobuf/compiler/test_plugin.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/zip_writer.cc b/depends/protobuf/google/protobuf/compiler/zip_writer.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/zip_writer.cc rename to depends/protobuf/google/protobuf/compiler/zip_writer.cc diff --git a/library/depends/protobuf/google/protobuf/compiler/zip_writer.h b/depends/protobuf/google/protobuf/compiler/zip_writer.h similarity index 100% rename from library/depends/protobuf/google/protobuf/compiler/zip_writer.h rename to depends/protobuf/google/protobuf/compiler/zip_writer.h diff --git a/library/depends/protobuf/google/protobuf/descriptor.cc b/depends/protobuf/google/protobuf/descriptor.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/descriptor.cc rename to depends/protobuf/google/protobuf/descriptor.cc diff --git a/library/depends/protobuf/google/protobuf/descriptor.h b/depends/protobuf/google/protobuf/descriptor.h similarity index 100% rename from library/depends/protobuf/google/protobuf/descriptor.h rename to depends/protobuf/google/protobuf/descriptor.h diff --git a/library/depends/protobuf/google/protobuf/descriptor.pb.cc b/depends/protobuf/google/protobuf/descriptor.pb.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/descriptor.pb.cc rename to depends/protobuf/google/protobuf/descriptor.pb.cc diff --git a/library/depends/protobuf/google/protobuf/descriptor.pb.h b/depends/protobuf/google/protobuf/descriptor.pb.h similarity index 100% rename from library/depends/protobuf/google/protobuf/descriptor.pb.h rename to depends/protobuf/google/protobuf/descriptor.pb.h diff --git a/library/depends/protobuf/google/protobuf/descriptor_database.cc b/depends/protobuf/google/protobuf/descriptor_database.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/descriptor_database.cc rename to depends/protobuf/google/protobuf/descriptor_database.cc diff --git a/library/depends/protobuf/google/protobuf/descriptor_database.h b/depends/protobuf/google/protobuf/descriptor_database.h similarity index 100% rename from library/depends/protobuf/google/protobuf/descriptor_database.h rename to depends/protobuf/google/protobuf/descriptor_database.h diff --git a/library/depends/protobuf/google/protobuf/dynamic_message.cc b/depends/protobuf/google/protobuf/dynamic_message.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/dynamic_message.cc rename to depends/protobuf/google/protobuf/dynamic_message.cc diff --git a/library/depends/protobuf/google/protobuf/dynamic_message.h b/depends/protobuf/google/protobuf/dynamic_message.h similarity index 100% rename from library/depends/protobuf/google/protobuf/dynamic_message.h rename to depends/protobuf/google/protobuf/dynamic_message.h diff --git a/library/depends/protobuf/google/protobuf/extension_set.cc b/depends/protobuf/google/protobuf/extension_set.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/extension_set.cc rename to depends/protobuf/google/protobuf/extension_set.cc diff --git a/library/depends/protobuf/google/protobuf/extension_set.h b/depends/protobuf/google/protobuf/extension_set.h similarity index 100% rename from library/depends/protobuf/google/protobuf/extension_set.h rename to depends/protobuf/google/protobuf/extension_set.h diff --git a/library/depends/protobuf/google/protobuf/extension_set_heavy.cc b/depends/protobuf/google/protobuf/extension_set_heavy.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/extension_set_heavy.cc rename to depends/protobuf/google/protobuf/extension_set_heavy.cc diff --git a/library/depends/protobuf/google/protobuf/extension_set_unittest.cc b/depends/protobuf/google/protobuf/extension_set_unittest.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/extension_set_unittest.cc rename to depends/protobuf/google/protobuf/extension_set_unittest.cc diff --git a/library/depends/protobuf/google/protobuf/generated_message_reflection.cc b/depends/protobuf/google/protobuf/generated_message_reflection.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/generated_message_reflection.cc rename to depends/protobuf/google/protobuf/generated_message_reflection.cc diff --git a/library/depends/protobuf/google/protobuf/generated_message_reflection.h b/depends/protobuf/google/protobuf/generated_message_reflection.h similarity index 100% rename from library/depends/protobuf/google/protobuf/generated_message_reflection.h rename to depends/protobuf/google/protobuf/generated_message_reflection.h diff --git a/library/depends/protobuf/google/protobuf/generated_message_util.cc b/depends/protobuf/google/protobuf/generated_message_util.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/generated_message_util.cc rename to depends/protobuf/google/protobuf/generated_message_util.cc diff --git a/library/depends/protobuf/google/protobuf/generated_message_util.h b/depends/protobuf/google/protobuf/generated_message_util.h similarity index 100% rename from library/depends/protobuf/google/protobuf/generated_message_util.h rename to depends/protobuf/google/protobuf/generated_message_util.h diff --git a/library/depends/protobuf/google/protobuf/io/coded_stream.cc b/depends/protobuf/google/protobuf/io/coded_stream.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/io/coded_stream.cc rename to depends/protobuf/google/protobuf/io/coded_stream.cc diff --git a/library/depends/protobuf/google/protobuf/io/coded_stream.h b/depends/protobuf/google/protobuf/io/coded_stream.h similarity index 100% rename from library/depends/protobuf/google/protobuf/io/coded_stream.h rename to depends/protobuf/google/protobuf/io/coded_stream.h diff --git a/library/depends/protobuf/google/protobuf/io/coded_stream_inl.h b/depends/protobuf/google/protobuf/io/coded_stream_inl.h similarity index 100% rename from library/depends/protobuf/google/protobuf/io/coded_stream_inl.h rename to depends/protobuf/google/protobuf/io/coded_stream_inl.h diff --git a/library/depends/protobuf/google/protobuf/io/gzip_stream.cc b/depends/protobuf/google/protobuf/io/gzip_stream.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/io/gzip_stream.cc rename to depends/protobuf/google/protobuf/io/gzip_stream.cc diff --git a/library/depends/protobuf/google/protobuf/io/gzip_stream.h b/depends/protobuf/google/protobuf/io/gzip_stream.h similarity index 100% rename from library/depends/protobuf/google/protobuf/io/gzip_stream.h rename to depends/protobuf/google/protobuf/io/gzip_stream.h diff --git a/library/depends/protobuf/google/protobuf/io/package_info.h b/depends/protobuf/google/protobuf/io/package_info.h similarity index 100% rename from library/depends/protobuf/google/protobuf/io/package_info.h rename to depends/protobuf/google/protobuf/io/package_info.h diff --git a/library/depends/protobuf/google/protobuf/io/printer.cc b/depends/protobuf/google/protobuf/io/printer.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/io/printer.cc rename to depends/protobuf/google/protobuf/io/printer.cc diff --git a/library/depends/protobuf/google/protobuf/io/printer.h b/depends/protobuf/google/protobuf/io/printer.h similarity index 100% rename from library/depends/protobuf/google/protobuf/io/printer.h rename to depends/protobuf/google/protobuf/io/printer.h diff --git a/library/depends/protobuf/google/protobuf/io/tokenizer.cc b/depends/protobuf/google/protobuf/io/tokenizer.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/io/tokenizer.cc rename to depends/protobuf/google/protobuf/io/tokenizer.cc diff --git a/library/depends/protobuf/google/protobuf/io/tokenizer.h b/depends/protobuf/google/protobuf/io/tokenizer.h similarity index 100% rename from library/depends/protobuf/google/protobuf/io/tokenizer.h rename to depends/protobuf/google/protobuf/io/tokenizer.h diff --git a/library/depends/protobuf/google/protobuf/io/zero_copy_stream.cc b/depends/protobuf/google/protobuf/io/zero_copy_stream.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/io/zero_copy_stream.cc rename to depends/protobuf/google/protobuf/io/zero_copy_stream.cc diff --git a/library/depends/protobuf/google/protobuf/io/zero_copy_stream.h b/depends/protobuf/google/protobuf/io/zero_copy_stream.h similarity index 100% rename from library/depends/protobuf/google/protobuf/io/zero_copy_stream.h rename to depends/protobuf/google/protobuf/io/zero_copy_stream.h diff --git a/library/depends/protobuf/google/protobuf/io/zero_copy_stream_impl.cc b/depends/protobuf/google/protobuf/io/zero_copy_stream_impl.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/io/zero_copy_stream_impl.cc rename to depends/protobuf/google/protobuf/io/zero_copy_stream_impl.cc diff --git a/library/depends/protobuf/google/protobuf/io/zero_copy_stream_impl.h b/depends/protobuf/google/protobuf/io/zero_copy_stream_impl.h similarity index 100% rename from library/depends/protobuf/google/protobuf/io/zero_copy_stream_impl.h rename to depends/protobuf/google/protobuf/io/zero_copy_stream_impl.h diff --git a/library/depends/protobuf/google/protobuf/io/zero_copy_stream_impl_lite.cc b/depends/protobuf/google/protobuf/io/zero_copy_stream_impl_lite.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/io/zero_copy_stream_impl_lite.cc rename to depends/protobuf/google/protobuf/io/zero_copy_stream_impl_lite.cc diff --git a/library/depends/protobuf/google/protobuf/io/zero_copy_stream_impl_lite.h b/depends/protobuf/google/protobuf/io/zero_copy_stream_impl_lite.h similarity index 100% rename from library/depends/protobuf/google/protobuf/io/zero_copy_stream_impl_lite.h rename to depends/protobuf/google/protobuf/io/zero_copy_stream_impl_lite.h diff --git a/library/depends/protobuf/google/protobuf/message.cc b/depends/protobuf/google/protobuf/message.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/message.cc rename to depends/protobuf/google/protobuf/message.cc diff --git a/library/depends/protobuf/google/protobuf/message.h b/depends/protobuf/google/protobuf/message.h similarity index 100% rename from library/depends/protobuf/google/protobuf/message.h rename to depends/protobuf/google/protobuf/message.h diff --git a/library/depends/protobuf/google/protobuf/message_lite.cc b/depends/protobuf/google/protobuf/message_lite.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/message_lite.cc rename to depends/protobuf/google/protobuf/message_lite.cc diff --git a/library/depends/protobuf/google/protobuf/message_lite.h b/depends/protobuf/google/protobuf/message_lite.h similarity index 100% rename from library/depends/protobuf/google/protobuf/message_lite.h rename to depends/protobuf/google/protobuf/message_lite.h diff --git a/library/depends/protobuf/google/protobuf/package_info.h b/depends/protobuf/google/protobuf/package_info.h similarity index 100% rename from library/depends/protobuf/google/protobuf/package_info.h rename to depends/protobuf/google/protobuf/package_info.h diff --git a/library/depends/protobuf/google/protobuf/reflection_ops.cc b/depends/protobuf/google/protobuf/reflection_ops.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/reflection_ops.cc rename to depends/protobuf/google/protobuf/reflection_ops.cc diff --git a/library/depends/protobuf/google/protobuf/reflection_ops.h b/depends/protobuf/google/protobuf/reflection_ops.h similarity index 100% rename from library/depends/protobuf/google/protobuf/reflection_ops.h rename to depends/protobuf/google/protobuf/reflection_ops.h diff --git a/library/depends/protobuf/google/protobuf/repeated_field.cc b/depends/protobuf/google/protobuf/repeated_field.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/repeated_field.cc rename to depends/protobuf/google/protobuf/repeated_field.cc diff --git a/library/depends/protobuf/google/protobuf/repeated_field.h b/depends/protobuf/google/protobuf/repeated_field.h similarity index 100% rename from library/depends/protobuf/google/protobuf/repeated_field.h rename to depends/protobuf/google/protobuf/repeated_field.h diff --git a/library/depends/protobuf/google/protobuf/service.cc b/depends/protobuf/google/protobuf/service.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/service.cc rename to depends/protobuf/google/protobuf/service.cc diff --git a/library/depends/protobuf/google/protobuf/service.h b/depends/protobuf/google/protobuf/service.h similarity index 100% rename from library/depends/protobuf/google/protobuf/service.h rename to depends/protobuf/google/protobuf/service.h diff --git a/library/depends/protobuf/google/protobuf/stubs/common.cc b/depends/protobuf/google/protobuf/stubs/common.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/stubs/common.cc rename to depends/protobuf/google/protobuf/stubs/common.cc diff --git a/library/depends/protobuf/google/protobuf/stubs/common.h b/depends/protobuf/google/protobuf/stubs/common.h similarity index 100% rename from library/depends/protobuf/google/protobuf/stubs/common.h rename to depends/protobuf/google/protobuf/stubs/common.h diff --git a/library/depends/protobuf/google/protobuf/stubs/hash.h b/depends/protobuf/google/protobuf/stubs/hash.h similarity index 100% rename from library/depends/protobuf/google/protobuf/stubs/hash.h rename to depends/protobuf/google/protobuf/stubs/hash.h diff --git a/library/depends/protobuf/google/protobuf/stubs/map-util.h b/depends/protobuf/google/protobuf/stubs/map-util.h similarity index 100% rename from library/depends/protobuf/google/protobuf/stubs/map-util.h rename to depends/protobuf/google/protobuf/stubs/map-util.h diff --git a/library/depends/protobuf/google/protobuf/stubs/once.cc b/depends/protobuf/google/protobuf/stubs/once.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/stubs/once.cc rename to depends/protobuf/google/protobuf/stubs/once.cc diff --git a/library/depends/protobuf/google/protobuf/stubs/once.h b/depends/protobuf/google/protobuf/stubs/once.h similarity index 100% rename from library/depends/protobuf/google/protobuf/stubs/once.h rename to depends/protobuf/google/protobuf/stubs/once.h diff --git a/library/depends/protobuf/google/protobuf/stubs/stl_util-inl.h b/depends/protobuf/google/protobuf/stubs/stl_util-inl.h similarity index 100% rename from library/depends/protobuf/google/protobuf/stubs/stl_util-inl.h rename to depends/protobuf/google/protobuf/stubs/stl_util-inl.h diff --git a/library/depends/protobuf/google/protobuf/stubs/structurally_valid.cc b/depends/protobuf/google/protobuf/stubs/structurally_valid.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/stubs/structurally_valid.cc rename to depends/protobuf/google/protobuf/stubs/structurally_valid.cc diff --git a/library/depends/protobuf/google/protobuf/stubs/strutil.cc b/depends/protobuf/google/protobuf/stubs/strutil.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/stubs/strutil.cc rename to depends/protobuf/google/protobuf/stubs/strutil.cc diff --git a/library/depends/protobuf/google/protobuf/stubs/strutil.h b/depends/protobuf/google/protobuf/stubs/strutil.h similarity index 100% rename from library/depends/protobuf/google/protobuf/stubs/strutil.h rename to depends/protobuf/google/protobuf/stubs/strutil.h diff --git a/library/depends/protobuf/google/protobuf/stubs/substitute.cc b/depends/protobuf/google/protobuf/stubs/substitute.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/stubs/substitute.cc rename to depends/protobuf/google/protobuf/stubs/substitute.cc diff --git a/library/depends/protobuf/google/protobuf/stubs/substitute.h b/depends/protobuf/google/protobuf/stubs/substitute.h similarity index 100% rename from library/depends/protobuf/google/protobuf/stubs/substitute.h rename to depends/protobuf/google/protobuf/stubs/substitute.h diff --git a/library/depends/protobuf/google/protobuf/text_format.cc b/depends/protobuf/google/protobuf/text_format.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/text_format.cc rename to depends/protobuf/google/protobuf/text_format.cc diff --git a/library/depends/protobuf/google/protobuf/text_format.h b/depends/protobuf/google/protobuf/text_format.h similarity index 100% rename from library/depends/protobuf/google/protobuf/text_format.h rename to depends/protobuf/google/protobuf/text_format.h diff --git a/library/depends/protobuf/google/protobuf/unknown_field_set.cc b/depends/protobuf/google/protobuf/unknown_field_set.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/unknown_field_set.cc rename to depends/protobuf/google/protobuf/unknown_field_set.cc diff --git a/library/depends/protobuf/google/protobuf/unknown_field_set.h b/depends/protobuf/google/protobuf/unknown_field_set.h similarity index 100% rename from library/depends/protobuf/google/protobuf/unknown_field_set.h rename to depends/protobuf/google/protobuf/unknown_field_set.h diff --git a/library/depends/protobuf/google/protobuf/wire_format.cc b/depends/protobuf/google/protobuf/wire_format.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/wire_format.cc rename to depends/protobuf/google/protobuf/wire_format.cc diff --git a/library/depends/protobuf/google/protobuf/wire_format.h b/depends/protobuf/google/protobuf/wire_format.h similarity index 100% rename from library/depends/protobuf/google/protobuf/wire_format.h rename to depends/protobuf/google/protobuf/wire_format.h diff --git a/library/depends/protobuf/google/protobuf/wire_format_lite.cc b/depends/protobuf/google/protobuf/wire_format_lite.cc similarity index 100% rename from library/depends/protobuf/google/protobuf/wire_format_lite.cc rename to depends/protobuf/google/protobuf/wire_format_lite.cc diff --git a/library/depends/protobuf/google/protobuf/wire_format_lite.h b/depends/protobuf/google/protobuf/wire_format_lite.h similarity index 100% rename from library/depends/protobuf/google/protobuf/wire_format_lite.h rename to depends/protobuf/google/protobuf/wire_format_lite.h diff --git a/library/depends/protobuf/google/protobuf/wire_format_lite_inl.h b/depends/protobuf/google/protobuf/wire_format_lite_inl.h similarity index 100% rename from library/depends/protobuf/google/protobuf/wire_format_lite_inl.h rename to depends/protobuf/google/protobuf/wire_format_lite_inl.h diff --git a/library/depends/protobuf/testHashMap.cpp.in b/depends/protobuf/testHashMap.cpp.in similarity index 100% rename from library/depends/protobuf/testHashMap.cpp.in rename to depends/protobuf/testHashMap.cpp.in diff --git a/depends/tinyxml/CMakeLists.txt b/depends/tinyxml/CMakeLists.txt new file mode 100644 index 000000000..7d924924f --- /dev/null +++ b/depends/tinyxml/CMakeLists.txt @@ -0,0 +1,3 @@ +project(dfhack-tinyxml) +ADD_LIBRARY(dfhack-tinyxml STATIC EXCLUDE_FROM_ALL tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp) +IDE_FOLDER(dfhack-tinyxml "Depends") \ No newline at end of file diff --git a/library/depends/tinyxml/tinystr.cpp b/depends/tinyxml/tinystr.cpp similarity index 100% rename from library/depends/tinyxml/tinystr.cpp rename to depends/tinyxml/tinystr.cpp diff --git a/library/depends/tinyxml/tinystr.h b/depends/tinyxml/tinystr.h similarity index 100% rename from library/depends/tinyxml/tinystr.h rename to depends/tinyxml/tinystr.h diff --git a/library/depends/tinyxml/tinyxml.cpp b/depends/tinyxml/tinyxml.cpp similarity index 100% rename from library/depends/tinyxml/tinyxml.cpp rename to depends/tinyxml/tinyxml.cpp diff --git a/library/depends/tinyxml/tinyxml.h b/depends/tinyxml/tinyxml.h similarity index 100% rename from library/depends/tinyxml/tinyxml.h rename to depends/tinyxml/tinyxml.h diff --git a/library/depends/tinyxml/tinyxmlerror.cpp b/depends/tinyxml/tinyxmlerror.cpp similarity index 100% rename from library/depends/tinyxml/tinyxmlerror.cpp rename to depends/tinyxml/tinyxmlerror.cpp diff --git a/library/depends/tinyxml/tinyxmlparser.cpp b/depends/tinyxml/tinyxmlparser.cpp similarity index 100% rename from library/depends/tinyxml/tinyxmlparser.cpp rename to depends/tinyxml/tinyxmlparser.cpp diff --git a/depends/tthread/CMakeLists.txt b/depends/tthread/CMakeLists.txt new file mode 100644 index 000000000..d34c19c84 --- /dev/null +++ b/depends/tthread/CMakeLists.txt @@ -0,0 +1,6 @@ +PROJECT(dfhack-tinythread) +ADD_LIBRARY(dfhack-tinythread STATIC EXCLUDE_FROM_ALL tinythread.cpp) +if(UNIX) + target_link_libraries(dfhack-tinythread pthread) +endif() +IDE_FOLDER(dfhack-tinythread "Depends") \ No newline at end of file diff --git a/library/depends/tthread/fast_mutex.h b/depends/tthread/fast_mutex.h similarity index 100% rename from library/depends/tthread/fast_mutex.h rename to depends/tthread/fast_mutex.h diff --git a/library/depends/tthread/tinythread.cpp b/depends/tthread/tinythread.cpp similarity index 100% rename from library/depends/tthread/tinythread.cpp rename to depends/tthread/tinythread.cpp diff --git a/library/depends/tthread/tinythread.h b/depends/tthread/tinythread.h similarity index 100% rename from library/depends/tthread/tinythread.h rename to depends/tthread/tinythread.h diff --git a/library/depends/zlib/include/zconf.h b/depends/zlib/include/zconf.h similarity index 100% rename from library/depends/zlib/include/zconf.h rename to depends/zlib/include/zconf.h diff --git a/library/depends/zlib/include/zlib.h b/depends/zlib/include/zlib.h similarity index 100% rename from library/depends/zlib/include/zlib.h rename to depends/zlib/include/zlib.h diff --git a/library/depends/zlib/lib/zlib.lib b/depends/zlib/lib/zlib.lib similarity index 100% rename from library/depends/zlib/lib/zlib.lib rename to depends/zlib/lib/zlib.lib diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index d1b36c68c..ac54340e8 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -10,21 +10,16 @@ IF(UNIX) ENDIF() include_directories (include) -include_directories (depends/md5) -include_directories (depends/tinyxml) -include_directories (depends/tthread) -add_subdirectory (depends/protobuf) SET(PERL_EXECUTABLE "perl" CACHE FILEPATH "This is the perl executable to run in the codegen step. Tweak it if you need to run a specific one.") -execute_process(COMMAND ${PERL_EXECUTABLE} xml/list.pl xml include/df ";" +execute_process(COMMAND ${PERL_EXECUTABLE} xml/list.pl xml ${dfapi_SOURCE_DIR}/include/df ";" WORKING_DIRECTORY ${dfapi_SOURCE_DIR} OUTPUT_VARIABLE GENERATED_HDRS) -SET(PROJECT_HDRS_INTERNAL -) +SET_SOURCE_FILES_PROPERTIES(${GENERATED_HDRS} PROPERTIES HEADER_FILE_ONLY TRUE GENERATED TRUE) -SET(PROJECT_HDRS +SET(MAIN_HEADERS include/Internal.h include/DFHack.h include/Console.h @@ -46,6 +41,52 @@ include/Types.h include/VersionInfo.h include/VersionInfoFactory.h include/Virtual.h +) + +SET(MAIN_HEADERS_WINDOWS +include/wdirent.h +) + +SET(MAIN_SOURCES +Core.cpp +ColorText.cpp +DataDefs.cpp +DataStatics.cpp +DataStaticsCtor.cpp +MiscUtils.cpp +PluginManager.cpp +TileTypes.cpp +VersionInfoFactory.cpp +Virtual.cpp +) + +SET(MAIN_SOURCES_WINDOWS +Console-windows.cpp +Hooks-windows.cpp +PlugLoad-windows.cpp +Process-windows.cpp +) + +IF(WIN32) + SOURCE_GROUP("Main\\Headers" FILES ${MAIN_HEADERS} ${MAIN_HEADERS_WINDOWS}) + SOURCE_GROUP("Main\\Sources" FILES ${MAIN_SOURCES} ${MAIN_SOURCES_WINDOWS}) +ENDIF() + +SET(MAIN_SOURCES_LINUX +Console-linux.cpp +Hooks-linux.cpp +PlugLoad-linux.cpp +Process-linux.cpp +) + +SET(MAIN_SOURCES_LINUX_EGGY +Console-linux.cpp +Hooks-egg.cpp +PlugLoad-linux.cpp +Process-linux.cpp +) + +SET(MODULE_HEADERS include/modules/Buildings.h include/modules/Constructions.h include/modules/Units.h @@ -65,28 +106,7 @@ include/modules/World.h include/modules/Graphic.h ) -SET(PROJECT_SRCS -Core.cpp -ColorText.cpp -DataDefs.cpp -DataStatics.cpp -DataStaticsCtor.cpp -MiscUtils.cpp -PluginManager.cpp -TileTypes.cpp -VersionInfoFactory.cpp -Virtual.cpp - -depends/md5/md5.cpp -depends/md5/md5wrapper.cpp - -depends/tinyxml/tinystr.cpp -depends/tinyxml/tinyxml.cpp -depends/tinyxml/tinyxmlerror.cpp -depends/tinyxml/tinyxmlparser.cpp - -depends/tthread/tinythread.cpp - +SET( MODULE_SOURCES modules/Buildings.cpp modules/Constructions.cpp modules/Units.cpp @@ -106,52 +126,39 @@ modules/Graphic.cpp modules/Windows.cpp ) -SET(PROJECT_HDRS_WINDOWS -include/wdirent.h -) - -SET(PROJECT_SRCS_LINUX -Console-linux.cpp -Hooks-linux.cpp -PlugLoad-linux.cpp -Process-linux.cpp -) - -SET(PROJECT_SRCS_WINDOWS -Console-windows.cpp -Hooks-windows.cpp -PlugLoad-windows.cpp -Process-windows.cpp -) +IF(WIN32) + SOURCE_GROUP("Modules\\Headers" FILES ${MODULE_HEADERS}) + SOURCE_GROUP("Modules\\Sources" FILES ${MODULE_SOURCES}) + SOURCE_GROUP("Generated" FILES ${GENERATED_HDRS}) +ENDIF() -SET(PROJECT_SRCS_LINUX_EGG -Console-linux.cpp -Hooks-egg.cpp -PlugLoad-linux.cpp -Process-linux.cpp -) +SET(PROJECT_HEADERS) +LIST(APPEND PROJECT_HEADERS ${MAIN_HEADERS}) +LIST(APPEND PROJECT_HEADERS ${MODULE_HEADERS}) +SET(PROJECT_SOURCES) +LIST(APPEND PROJECT_SOURCES ${MAIN_SOURCES}) +LIST(APPEND PROJECT_SOURCES ${MODULE_SOURCES}) IF(UNIX) OPTION(BUILD_EGGY "Make DFHack strangely egg-shaped." OFF) IF(BUILD_EGGY) - LIST(APPEND PROJECT_SRCS ${PROJECT_SRCS_LINUX_EGG}) + LIST(APPEND PROJECT_SOURCES ${MAIN_SOURCES_LINUX_EGGY}) ELSE() - LIST(APPEND PROJECT_SRCS ${PROJECT_SRCS_LINUX}) + LIST(APPEND PROJECT_SOURCES ${MAIN_SOURCES_LINUX}) ENDIF() -ELSE() - LIST(APPEND PROJECT_HDRS ${PROJECT_HDRS_WINDOWS}) - LIST(APPEND PROJECT_SRCS ${PROJECT_SRCS_WINDOWS}) +ELSEIF(WIN32) + LIST(APPEND PROJECT_SOURCES ${MAIN_SOURCES_WINDOWS}) + LIST(APPEND PROJECT_HEADERS ${MAIN_HEADERS_WINDOWS}) ENDIF() # Protobuf - FILE(GLOB PROJECT_PROTOS ${CMAKE_CURRENT_SOURCE_DIR}/proto/*.proto) STRING(REPLACE ".proto" ".pb.cc" PROJECT_PROTO_SRCS ${PROJECT_PROTOS}) STRING(REPLACE ".proto" ".pb.h" PROJECT_PROTO_HDRS ${PROJECT_PROTOS}) -LIST(APPEND PROJECT_HDRS ${PROJECT_PROTO_HDRS}) -LIST(APPEND PROJECT_SRCS ${PROJECT_PROTO_SRCS}) +LIST(APPEND PROJECT_HEADERS ${PROJECT_PROTO_HDRS}) +LIST(APPEND PROJECT_HEADERS ${PROJECT_PROTO_SRCS}) ADD_CUSTOM_COMMAND( OUTPUT ${PROJECT_PROTO_SRCS} ${PROJECT_PROTO_HDRS} @@ -161,15 +168,12 @@ ADD_CUSTOM_COMMAND( DEPENDS protoc-bin ${PROJECT_PROTOS} ) -# - -SET_SOURCE_FILES_PROPERTIES( ${PROJECT_HDRS} PROPERTIES HEADER_FILE_ONLY TRUE ) - -LIST(APPEND PROJECT_SRCS ${PROJECT_HDRS}) +# Merge headers into sources +SET_SOURCE_FILES_PROPERTIES( ${PROJECT_HEADERS} PROPERTIES HEADER_FILE_ONLY TRUE ) +LIST(APPEND PROJECT_SOURCES ${PROJECT_HEADERS}) # Generation - -SET_SOURCE_FILES_PROPERTIES(${GENERATED_HDRS} PROPERTIES HEADER_FILE_ONLY TRUE GENERATED TRUE) +LIST(APPEND PROJECT_SOURCES ${GENERATED_HDRS}) FILE(GLOB GENERATE_INPUT_SCRIPTS ${dfapi_SOURCE_DIR}/xml/*.pm ${dfapi_SOURCE_DIR}/xml/*.xslt) FILE(GLOB GENERATE_INPUT_XMLS ${dfapi_SOURCE_DIR}/xml/*.xml) @@ -198,13 +202,13 @@ IF(UNIX) ENDIF() IF(UNIX) - SET(PROJECT_LIBS rt dl) + SET(PROJECT_LIBS rt dl dfhack-md5 dfhack-tinyxml dfhack-tinythread) ELSE(WIN32) - #FIXME: do we really need this? - SET(PROJECT_LIBS psapi) + #FIXME: do we really need psapi? + SET(PROJECT_LIBS psapi dfhack-tinyxml dfhack-tinythread) ENDIF() -ADD_LIBRARY(dfhack SHARED ${PROJECT_SRCS}) +ADD_LIBRARY(dfhack SHARED ${PROJECT_SOURCES}) ADD_DEPENDENCIES(dfhack generate_headers) IF(BUILD_EGGY) @@ -225,6 +229,7 @@ ENDIF() SET_TARGET_PROPERTIES(dfhack PROPERTIES DEBUG_POSTFIX "-debug" ) TARGET_LINK_LIBRARIES(dfhack protobuf-lite ${PROJECT_LIBS}) +SET_TARGET_PROPERTIES(dfhack PROPERTIES LINK_INTERFACE_LIBRARIES "") IF(UNIX) # On linux, copy our version of the df launch script which sets LD_PRELOAD diff --git a/library/depends/md5/CMakeLists.txt b/library/depends/md5/CMakeLists.txt deleted file mode 100644 index fc4845bd4..000000000 --- a/library/depends/md5/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -ADD_LIBRARY(dfhack-md5 SHARED md5.cpp md5wrapper.cpp) diff --git a/library/depends/tinyxml/CMakeLists.txt b/library/depends/tinyxml/CMakeLists.txt deleted file mode 100644 index effdf8945..000000000 --- a/library/depends/tinyxml/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -ADD_LIBRARY(dfhack-tixml SHARED tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp) \ No newline at end of file diff --git a/library/modules/Windows.cpp b/library/modules/Windows.cpp index 6fbe37125..196e4d71a 100644 --- a/library/modules/Windows.cpp +++ b/library/modules/Windows.cpp @@ -32,7 +32,6 @@ distribution. #include "df/init.h" #include "df/ui.h" #include -#include #include "modules/Windows.h" using namespace DFHack; diff --git a/plugins/Dfusion/CMakeLists.txt b/plugins/Dfusion/CMakeLists.txt index c7f71c71c..85064b974 100644 --- a/plugins/Dfusion/CMakeLists.txt +++ b/plugins/Dfusion/CMakeLists.txt @@ -4,12 +4,11 @@ FILE(GLOB DFUSION_CPPS src/*.c*) set( DFUSION_CPPS_ALL dfusion.cpp - ${dfhack_SOURCE_DIR}/library/depends/tthread/tinythread.cpp ${DFUSION_CPPS} ) FILE(GLOB DFUSION_HS include/*) SET_SOURCE_FILES_PROPERTIES( ${DFUSION_HS} PROPERTIES HEADER_FILE_ONLY TRUE ) -DFHACK_PLUGIN(dfusion ${DFUSION_CPPS_ALL} ${DFUSION_HS} LINK_LIBRARIES lua) +DFHACK_PLUGIN(dfusion ${DFUSION_CPPS_ALL} ${DFUSION_HS} LINK_LIBRARIES lua dfhack-tinythread) # installs into DF root install(DIRECTORY luafiles/ DESTINATION dfusion) diff --git a/plugins/Plugins.cmake b/plugins/Plugins.cmake index 2caba9992..221e57ea9 100644 --- a/plugins/Plugins.cmake +++ b/plugins/Plugins.cmake @@ -65,6 +65,7 @@ MACRO(DFHACK_PLUGIN) CDR(PLUGIN_SOURCES ${PLUGIN_DEFAULT_ARGS}) ADD_LIBRARY(${PLUGIN_NAME} MODULE ${PLUGIN_SOURCES}) + IDE_FOLDER(${PLUGIN_NAME} "Plugins") TARGET_LINK_LIBRARIES(${PLUGIN_NAME} dfhack ${PLUGIN_LINK_LIBRARIES}) IF(UNIX) SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES SUFFIX .plug.so PREFIX "") diff --git a/plugins/devel/memview.cpp b/plugins/devel/memview.cpp index 2e13f955d..5d8d6a9b2 100644 --- a/plugins/devel/memview.cpp +++ b/plugins/devel/memview.cpp @@ -3,7 +3,7 @@ #include "PluginManager.h" #include "MemAccess.h" #include "MiscUtils.h" -#include <../depends/tthread/tinythread.h> //not sure if correct +#include //not sure if correct #include #include #include diff --git a/plugins/df2mc b/plugins/df2mc index 964026395..a80abe848 160000 --- a/plugins/df2mc +++ b/plugins/df2mc @@ -1 +1 @@ -Subproject commit 964026395ce2138e4f861594307efda50b17e96c +Subproject commit a80abe848e4886a210e7a5123192e9221dc85810 diff --git a/plugins/mapexport/CMakeLists.txt b/plugins/mapexport/CMakeLists.txt index bebdd08ee..429507a77 100644 --- a/plugins/mapexport/CMakeLists.txt +++ b/plugins/mapexport/CMakeLists.txt @@ -1,14 +1,7 @@ PROJECT(mapexport) -#The protobuf sources we generate will require these headers +# add *our* headers here. SET(PROJECT_HDRS -${dfhack_SOURCE_DIR}/library/depends/protobuf/google/protobuf/stubs/once.h -${dfhack_SOURCE_DIR}/library/depends/protobuf/google/protobuf/stubs/common.h -${dfhack_SOURCE_DIR}/library/depends/protobuf/google/protobuf/io/coded_stream.h -${dfhack_SOURCE_DIR}/library/depends/protobuf/google/protobuf/wire_format_lite_inl.h -${dfhack_SOURCE_DIR}/library/depends/protobuf/google/protobuf/generated_message_util.h -${dfhack_SOURCE_DIR}/library/depends/protobuf/google/protobuf/repeated_field.h -${dfhack_SOURCE_DIR}/library/depends/protobuf/google/protobuf/extension_set.h ) SET(PROJECT_SRCS @@ -27,6 +20,9 @@ ${CMAKE_CURRENT_SOURCE_DIR}/proto/Map.proto STRING(REPLACE ".proto" ".pb.cc;" PROJECT_PROTO_SRCS ${PROJECT_PROTOS}) STRING(REPLACE ".proto" ".pb.h;" PROJECT_PROTO_HDRS ${PROJECT_PROTOS}) +SET_SOURCE_FILES_PROPERTIES( ${PROJECT_PROTO_HDRS} PROPERTIES GENERATED TRUE) +SET_SOURCE_FILES_PROPERTIES( ${PROJECT_PROTO_SRCS} PROPERTIES GENERATED TRUE) + LIST(APPEND PROJECT_HDRS ${PROJECT_PROTO_HDRS}) LIST(APPEND PROJECT_SRCS ${PROJECT_PROTO_SRCS}) diff --git a/plugins/stonesense b/plugins/stonesense index f05386bae..dfae65496 160000 --- a/plugins/stonesense +++ b/plugins/stonesense @@ -1 +1 @@ -Subproject commit f05386bae01d1840bdc889f30253ed50ee892860 +Subproject commit dfae65496e4b4a591fdb8db9feda37dede714a89