diff --git a/CMakeLists.txt b/CMakeLists.txt index 396a7569fe9a62938ba3d92660d598dd3177c6d2..2c45c0721f074d4d9b45b1208f560a4e2b694c90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,8 +31,9 @@ project(fggl set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # vendor dependencies +add_subdirectory( vendor/entt ) add_subdirectory( vendor/imgui ) -add_subdirectory(vendor/glad) +add_subdirectory( vendor/glad ) # engine headers file(GLOB_RECURSE public_headers @@ -44,9 +45,6 @@ add_subdirectory( fggl ) target_compile_options( fggl PRIVATE -Wall -Wpedantic -Wextra -Wodr -fno-strict-aliasing -fno-strict-overflow ) set_property(TARGET fggl PROPERTY INTERPROCEDURAL_OPTIMIZATION True) -# vendor dependencies -add_subdirectory( integrations/entt ) - # Unit Tests if (FGGL_TESTS) include(CTest) diff --git a/fggl/CMakeLists.txt b/fggl/CMakeLists.txt index d054dc3bdbfe3c41dded56b8db69153a24a92352..e3385dd8d68f532e210c6ba2a2665063d9f8cb97 100644 --- a/fggl/CMakeLists.txt +++ b/fggl/CMakeLists.txt @@ -5,6 +5,8 @@ file(GLOB_RECURSE HEADER_LIST CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/include/fgg # Should be shared linkage for legal reasons (LGPL) add_library(fggl ${HEADER_LIST}) +target_link_libraries(fggl PUBLIC entt) + # we need to tell people using the library about our headers target_include_directories(fggl PUBLIC diff --git a/integrations/entt/CMakeLists.txt b/integrations/entt/CMakeLists.txt deleted file mode 100644 index ed4cc62be5ae900a326bfc8f9c2690bd37894756..0000000000000000000000000000000000000000 --- a/integrations/entt/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -target_include_directories( fggl - PUBLIC - $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include> - $<INSTALL_INTERFACE:include> -) diff --git a/vendor/entt/CMakeLists.txt b/vendor/entt/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..dca92b02c8920ab7c1975591ccf52ab3bc815b41 --- /dev/null +++ b/vendor/entt/CMakeLists.txt @@ -0,0 +1,20 @@ +add_library( entt INTERFACE ) + +target_include_directories( entt + INTERFACE + $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include> + $<INSTALL_INTERFACE:include> +) + +install( + FILES + include/fggl/vendor/entt.hpp + DESTINATION + ${CMAKE_INSTALL_INCLUDEDIR}/fggl/vendor/entt.hpp +) + +install(TARGETS entt + EXPORT fgglTargets + DESTINATION + ${CMAKE_INSTALL_LIBDIR}/fggl/entt +) diff --git a/integrations/entt/include/fggl/vendor/entt.hpp b/vendor/entt/include/fggl/vendor/entt.hpp similarity index 100% rename from integrations/entt/include/fggl/vendor/entt.hpp rename to vendor/entt/include/fggl/vendor/entt.hpp