mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 17:29:18 +02:00
Add EnTT library
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -32,3 +32,6 @@
|
|||||||
[submodule "betterRenderer/thirdparty/bvh"]
|
[submodule "betterRenderer/thirdparty/bvh"]
|
||||||
path = betterRenderer/thirdparty/bvh
|
path = betterRenderer/thirdparty/bvh
|
||||||
url = https://github.com/madmann91/bvh.git
|
url = https://github.com/madmann91/bvh.git
|
||||||
|
[submodule "ref/entt"]
|
||||||
|
path = ref/entt
|
||||||
|
url = https://github.com/skypjack/entt.git
|
||||||
|
|||||||
@@ -371,6 +371,9 @@ endif()
|
|||||||
set(cppzmq_INCLUDE_DIR ${cppzmq_INCLUDE_DIR} "${DEPS_DIR}/cppzmq/include")
|
set(cppzmq_INCLUDE_DIR ${cppzmq_INCLUDE_DIR} "${DEPS_DIR}/cppzmq/include")
|
||||||
set(GLM_INCLUDE_DIR ${GLM_INCLUDE_DIR} "${DEPS_DIR}/glm/")
|
set(GLM_INCLUDE_DIR ${GLM_INCLUDE_DIR} "${DEPS_DIR}/glm/")
|
||||||
|
|
||||||
|
set(ENTT_INCLUDE_DIR ${ENTT_INCLUDE_DIR} "${DEPS_DIR}/entt/src")
|
||||||
|
set(ENTT_INCLUDE_DIRS ${ENTT_INCLUDE_DIRS} "${DEPS_DIR}/entt/src")
|
||||||
|
|
||||||
# Process version.rc.in into version.rc
|
# Process version.rc.in into version.rc
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/eu07.rc.in
|
configure_file(${CMAKE_SOURCE_DIR}/eu07.rc.in
|
||||||
${CMAKE_BINARY_DIR}/eu07.rc @ONLY)
|
${CMAKE_BINARY_DIR}/eu07.rc @ONLY)
|
||||||
@@ -476,6 +479,20 @@ target_link_libraries(${PROJECT_NAME} Threads::Threads)
|
|||||||
find_package(GLM REQUIRED)
|
find_package(GLM REQUIRED)
|
||||||
target_include_directories(${PROJECT_NAME} PRIVATE ${GLM_INCLUDE_DIR})
|
target_include_directories(${PROJECT_NAME} PRIVATE ${GLM_INCLUDE_DIR})
|
||||||
|
|
||||||
|
find_package(EnTT CONFIG QUIET)
|
||||||
|
if (TARGET EnTT::EnTT)
|
||||||
|
message(STATUS "Using EnTT package target EnTT::EnTT")
|
||||||
|
elseif (EXISTS "${DEPS_DIR}/entt/src/entt/entt.hpp")
|
||||||
|
add_library(EnTT::EnTT INTERFACE IMPORTED)
|
||||||
|
set_target_properties(EnTT::EnTT PROPERTIES
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${DEPS_DIR}/entt/src")
|
||||||
|
message(STATUS "Using bundled EnTT from ${DEPS_DIR}/entt/src")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR
|
||||||
|
"EnTT not found. Install EnTT package (EnTTConfig.cmake) or provide ${DEPS_DIR}/entt/src.")
|
||||||
|
endif()
|
||||||
|
target_link_libraries(${PROJECT_NAME} EnTT::EnTT)
|
||||||
|
|
||||||
# JSON lib
|
# JSON lib
|
||||||
add_subdirectory(ref/json)
|
add_subdirectory(ref/json)
|
||||||
target_link_libraries(${PROJECT_NAME} nlohmann_json::nlohmann_json)
|
target_link_libraries(${PROJECT_NAME} nlohmann_json::nlohmann_json)
|
||||||
|
|||||||
1
ref/entt
Submodule
1
ref/entt
Submodule
Submodule ref/entt added at 9fdc43f6f8
Reference in New Issue
Block a user