1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-06-07 13:47:45 +00:00
novus/extern/CMakeLists.txt
Joshua Goins 3a97ae5c20 Disable luadec in Flatpak for now
I will eventually re-enable it later, but it's not super important to
have right now.
2025-06-03 04:37:05 +02:00

30 lines
1.1 KiB
CMake

# SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
# SPDX-License-Identifier: CC0-1.0
set(BUILD_SHARED_LIBS OFF)
add_compile_options(-w)
FetchContent_Declare(
Corrosion
GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git
GIT_TAG v0.5.2
)
FetchContent_MakeAvailable(Corrosion)
corrosion_import_crate(MANIFEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/libphysis/Cargo.toml)
target_include_directories(physis INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/libphysis/target/public)
add_library(Physis::Physis ALIAS physis)
add_subdirectory(magic_enum EXCLUDE_FROM_ALL)
add_subdirectory(tinygltf EXCLUDE_FROM_ALL)
add_subdirectory(imgui EXCLUDE_FROM_ALL)
add_subdirectory(dxbc EXCLUDE_FROM_ALL)
# TODO: Enable in the Flatpak, it's a bit annoying though as we would have to build it separately
if (NOT BUILD_FLATPAK)
# For some reason, FFXIV uses a *32-bit* Lua compiler. We have to build it as 32-bit or else loading the bytecode fails.
add_compile_options(-m32)
add_link_options(-m32)
add_subdirectory(luadec51 EXCLUDE_FROM_ALL)
endif()