2026-10-14 22:31:56 +02:00

43 lines
792 B
CMake

add_library(DeerithCore)
find_path(ENET_INCLUDE_DIR enet/enet.h)
find_library(ENET_LIBRARY enet)
include(FetchContent)
FetchContent_Declare(
EnTT
GIT_REPOSITORY https://github.com/skypjack/entt.git
GIT_TAG v3.16.0
)
FetchContent_MakeAvailable(EnTT)
find_package(spdlog REQUIRED)
find_package(fmt REQUIRED)
find_package(glm REQUIRED)
file(GLOB_RECURSE deerith_SOURCES
CONFIGURE_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
)
target_sources(DeerithCore
PRIVATE
${deerith_SOURCES}
)
target_include_directories(DeerithCore
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
${ENET_INCLUDE_DIR}
)
target_link_libraries(DeerithCore
PUBLIC
spdlog::spdlog
fmt::fmt
glm::glm
EnTT::EnTT
${ENET_LIBRARY}
)