diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..4ae1a7f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "extern/libphysis"] + path = extern/libphysis + url = https://git.sr.ht/~redstrate/libphysis diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index a5fdd5a..601e3b5 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -3,19 +3,12 @@ find_package(Corrosion REQUIRED) -FetchContent_Declare( - libphysis - GIT_REPOSITORY https://git.sr.ht/~redstrate/libphysis - GIT_TAG main -) -FetchContent_MakeAvailable(libphysis) +corrosion_import_crate(MANIFEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/libphysis/Cargo.toml) -corrosion_import_crate(MANIFEST_PATH ${libphysis_SOURCE_DIR}/Cargo.toml) - -target_include_directories(physis INTERFACE ${libphysis_SOURCE_DIR}/target/public) +target_include_directories(physis INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/libphysis/target/public) target_link_libraries(physis INTERFACE unshield) add_subdirectory(magic_enum) add_subdirectory(tinygltf) -add_subdirectory(imgui) \ No newline at end of file +add_subdirectory(imgui) diff --git a/extern/libphysis b/extern/libphysis new file mode 160000 index 0000000..6992aff --- /dev/null +++ b/extern/libphysis @@ -0,0 +1 @@ +Subproject commit 6992aff3c2898349b9b17b9682364280c90ed8a9