From ccb1502e33f2e53f1ff09006023011c86676eaff Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 23 Sep 2023 13:21:08 -0400 Subject: [PATCH] Use libphysis as a git submodule --- .gitmodules | 3 +++ external/CMakeLists.txt | 14 +++----------- external/libphysis | 1 + 3 files changed, 7 insertions(+), 11 deletions(-) create mode 160000 external/libphysis diff --git a/.gitmodules b/.gitmodules index 099ebdf..1c3e0b5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "external/libcotp"] path = external/libcotp url = https://github.com/redstrate/libcotp.git +[submodule "external/libphysis"] + path = external/libphysis + url = https://git.sr.ht/~redstrate/libphysis diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index e6001c4..9c031da 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -8,21 +8,13 @@ add_subdirectory(libcotp) find_package(Corrosion REQUIRED) -include(FetchContent) - -FetchContent_Declare( - libphysis - GIT_REPOSITORY https://git.sr.ht/~redstrate/libphysis - GIT_TAG main -) -FetchContent_MakeAvailable(libphysis) - -corrosion_import_crate(MANIFEST_PATH ${libphysis_SOURCE_DIR}/Cargo.toml +corrosion_import_crate(MANIFEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/libphysis/Cargo.toml + NO_DEFAULT_FEATURES FEATURES game_install) find_package(PkgConfig REQUIRED) pkg_check_modules(UNSHIELD REQUIRED IMPORTED_TARGET libunshield) -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_LIBRARIES}) target_link_directories(physis INTERFACE ${UNSHIELD_LIBRARY_DIRS}) diff --git a/external/libphysis b/external/libphysis new file mode 160000 index 0000000..89d887d --- /dev/null +++ b/external/libphysis @@ -0,0 +1 @@ +Subproject commit 89d887dbf2cb17bcd412e895e708e8c1e734e3db