Răsfoiți Sursa

build: move tools to source dir

skypjack 8 luni în urmă
părinte
comite
e36ff3d50e
5 a modificat fișierele cu 18 adăugiri și 24 ștergeri
  1. 2 10
      CMakeLists.txt
  2. 0 1
      TODO
  3. 3 0
      src/entt/tools.hpp
  4. 12 12
      src/entt/tools/davey.hpp
  5. 1 1
      testbed/system/imgui_system.cpp

+ 2 - 10
CMakeLists.txt

@@ -90,7 +90,6 @@ target_include_directories(
     EnTT
     INTERFACE
         $<BUILD_INTERFACE:${EnTT_SOURCE_DIR}/src>
-        $<BUILD_INTERFACE:${EnTT_SOURCE_DIR}/tools>
         $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
 )
 
@@ -112,7 +111,6 @@ endif()
 # Add EnTT goodies
 
 option(ENTT_INCLUDE_HEADERS "Add all EnTT headers to the EnTT target." OFF)
-option(ENTT_INCLUDE_TOOLS "Add EnTT tools files to the EnTT target." OFF)
 option(ENTT_INCLUDE_NATVIS "Add EnTT natvis files to the EnTT target." OFF)
 
 if(ENTT_INCLUDE_HEADERS)
@@ -191,8 +189,10 @@ if(ENTT_INCLUDE_HEADERS)
         signal/emitter.hpp
         signal/fwd.hpp
         signal/sigh.hpp
+        tools/davey.hpp
         entt.hpp
         fwd.hpp
+        tools.hpp
     )
 
     list(TRANSFORM HEADERS_FILES APPEND ">" OUTPUT_VARIABLE HEADERS_BUILD_INTERFACE)
@@ -204,14 +204,6 @@ if(ENTT_INCLUDE_HEADERS)
     target_sources(EnTT INTERFACE ${HEADERS_BUILD_INTERFACE} ${HEADERS_INSTALL_INTERFACE})
 endif()
 
-if(ENTT_INCLUDE_TOOLS)
-    target_sources(
-        EnTT
-        INTERFACE
-            $<BUILD_INTERFACE:${EnTT_SOURCE_DIR}/tools/entt/davey/davey.hpp>
-    )
-endif()
-
 if(ENTT_INCLUDE_NATVIS)
     if(MSVC)
         set(ENTT_HAS_NATVIS TRUE CACHE BOOL "" FORCE)

+ 0 - 1
TODO

@@ -38,4 +38,3 @@ TODO:
 * avoid copying meta_type/data/func nodes
 * paged vector as a standalone class
 * update process/scheduler natvis and doc after rework
-* move tools under the entt dir

+ 3 - 0
src/entt/tools.hpp

@@ -0,0 +1,3 @@
+// IWYU pragma: begin_exports
+#include "tools/davey.hpp"
+// IWYU pragma: end_exports

+ 12 - 12
tools/entt/davey/davey.hpp → src/entt/tools/davey.hpp

@@ -1,21 +1,21 @@
-#ifndef ENTT_DAVEY_DAVEY_HPP
-#define ENTT_DAVEY_DAVEY_HPP
+#ifndef ENTT_TOOLS_DAVEY_HPP
+#define ENTT_TOOLS_DAVEY_HPP
 
 #include <cstdint>
 #include <ios>
 #include <sstream>
 #include <string>
-#include <entt/entity/mixin.hpp>
-#include <entt/entity/registry.hpp>
-#include <entt/entity/sparse_set.hpp>
-#include <entt/entity/storage.hpp>
-#include <entt/locator/locator.hpp>
-#include <entt/meta/container.hpp>
-#include <entt/meta/context.hpp>
-#include <entt/meta/meta.hpp>
-#include <entt/meta/pointer.hpp>
-#include <entt/meta/resolve.hpp>
 #include <imgui.h>
+#include "../entity/mixin.hpp"
+#include "../entity/registry.hpp"
+#include "../entity/sparse_set.hpp"
+#include "../entity/storage.hpp"
+#include "../locator/locator.hpp"
+#include "../meta/container.hpp"
+#include "../meta/context.hpp"
+#include "../meta/meta.hpp"
+#include "../meta/pointer.hpp"
+#include "../meta/resolve.hpp"
 
 namespace entt {
 

+ 1 - 1
testbed/system/imgui_system.cpp

@@ -1,8 +1,8 @@
 #include <component/input_listener_component.h>
 #include <component/rect_component.h>
 #include <component/renderable_component.h>
-#include <entt/davey/davey.hpp>
 #include <entt/entity/registry.hpp>
+#include <entt/tools/davey.hpp>
 #include <imgui.h>
 #include <system/imgui_system.h>