aboutsummaryrefslogtreecommitdiff
path: root/libs/game_bethesda/src/gamebryo/CMakeLists.txt
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-11 02:37:39 -0600
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-11 02:37:39 -0600
commit7ee008e150bc5bcf76082d726f719ee0fdfda982 (patch)
tree27fb39be241fdb5ac2734c574de678977d1856d0 /libs/game_bethesda/src/gamebryo/CMakeLists.txt
Fluorine Manager: full Linux port of Mod Organizer 2
Complete native Linux port with FUSE-based virtual filesystem, Proton/umu-run integration, and Flatpak packaging. Key features: - FUSE VFS replacing Windows USVFS (in-process + standalone helper for Flatpak) - Proton/GE-Proton/umu-run launcher with env var forwarding - Flatpak support (sandbox-aware VFS, NXM handler, umu-run) - Wine prefix management UI - Case-insensitive path resolution for Linux filesystems - QSettings-safe INI handling (avoids Bethesda INI corruption) - Portable instance support with auto-generated launcher scripts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/game_bethesda/src/gamebryo/CMakeLists.txt')
-rw-r--r--libs/game_bethesda/src/gamebryo/CMakeLists.txt78
1 files changed, 78 insertions, 0 deletions
diff --git a/libs/game_bethesda/src/gamebryo/CMakeLists.txt b/libs/game_bethesda/src/gamebryo/CMakeLists.txt
new file mode 100644
index 0000000..bbc47ae
--- /dev/null
+++ b/libs/game_bethesda/src/gamebryo/CMakeLists.txt
@@ -0,0 +1,78 @@
+cmake_minimum_required(VERSION 3.16)
+
+find_package(Qt6 COMPONENTS Widgets REQUIRED)
+find_package(ZLIB REQUIRED)
+
+# Try cmake config first, fall back to pkg-config
+find_package(lz4 CONFIG QUIET)
+if(NOT lz4_FOUND)
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(LZ4 REQUIRED IMPORTED_TARGET liblz4)
+endif()
+# lz4 1.10+ exports LZ4::lz4, older versions export lz4::lz4
+if(TARGET LZ4::lz4 AND NOT TARGET lz4::lz4)
+ add_library(lz4::lz4 ALIAS LZ4::lz4)
+endif()
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTOUIC ON)
+
+add_library(game_gamebryo STATIC
+ dummybsa.cpp
+ dummybsa.h
+ gamebryobsainvalidation.cpp
+ gamebryobsainvalidation.h
+ gamebryodataarchives.cpp
+ gamebryodataarchives.h
+ gamebryogameplugins.cpp
+ gamebryogameplugins.h
+ gamebryolocalsavegames.cpp
+ gamebryolocalsavegames.h
+ gamebryomoddatachecker.cpp
+ gamebryomoddatachecker.h
+ gamebryomoddatacontent.cpp
+ gamebryomoddatacontent.h
+ gamebryosavegame.cpp
+ gamebryosavegame.h
+ gamebryosavegameinfo.cpp
+ gamebryosavegameinfo.h
+ gamebryosavegameinfowidget.cpp
+ gamebryosavegameinfowidget.h
+ gamebryosavegameinfowidget.ui
+ gamebryoscriptextender.cpp
+ gamebryoscriptextender.h
+ gamebryounmanagedmods.cpp
+ gamebryounmanagedmods.h
+ gamegamebryo.cpp
+ gamegamebryo.h
+ vdf_parser.h
+)
+
+target_link_libraries(game_gamebryo
+ PUBLIC
+ uibase
+ game_features
+ Qt6::Widgets
+ PRIVATE
+ ZLIB::ZLIB
+ $<IF:$<TARGET_EXISTS:lz4::lz4>,lz4::lz4,PkgConfig::LZ4>
+)
+
+# NaK FFI for game detection (replaces Windows registry)
+if(TARGET mo2::nak_ffi)
+ target_link_libraries(game_gamebryo PRIVATE mo2::nak_ffi)
+ target_compile_definitions(game_gamebryo PRIVATE HAS_NAK_FFI)
+endif()
+
+target_include_directories(game_gamebryo PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+
+# Keep uibase bare includes after system headers to avoid strings.h collision.
+target_compile_options(game_gamebryo PRIVATE
+ "-idirafter" "${CMAKE_SOURCE_DIR}/libs/uibase/include/uibase"
+)
+
+# AUTOMOC does not reliably honor -idirafter, so provide the bare uibase include
+# path explicitly for moc parsing of Q_INTERFACES declarations.
+set_property(TARGET game_gamebryo APPEND PROPERTY AUTOMOC_MOC_OPTIONS
+ "-I${CMAKE_SOURCE_DIR}/libs/uibase/include/uibase"
+)