diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-11 02:37:39 -0600 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-11 02:37:39 -0600 |
| commit | 7ee008e150bc5bcf76082d726f719ee0fdfda982 (patch) | |
| tree | 27fb39be241fdb5ac2734c574de678977d1856d0 /libs/bsatk/src/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/bsatk/src/CMakeLists.txt')
| -rw-r--r-- | libs/bsatk/src/CMakeLists.txt | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/libs/bsatk/src/CMakeLists.txt b/libs/bsatk/src/CMakeLists.txt new file mode 100644 index 0000000..99a0f26 --- /dev/null +++ b/libs/bsatk/src/CMakeLists.txt @@ -0,0 +1,83 @@ +cmake_minimum_required(VERSION 3.16) + +find_package(Boost REQUIRED COMPONENTS thread) +find_package(ZLIB REQUIRED) +find_package(mo2-dds-header CONFIG REQUIRED) + +# lz4: try 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() + +add_library(bsatk STATIC) +target_link_libraries(bsatk + PUBLIC mo2::dds-header + PRIVATE ZLIB::ZLIB Boost::thread +) + +# Link lz4 based on how it was found +if (lz4_FOUND) + target_link_libraries(bsatk PRIVATE lz4::lz4) +else() + target_link_libraries(bsatk PRIVATE PkgConfig::LZ4) +endif() + +target_sources(bsatk + PRIVATE + bsaarchive.cpp + bsaexception.cpp + bsafile.cpp + bsafolder.cpp + bsatypes.cpp + filehash.cpp + PUBLIC + FILE_SET HEADERS + BASE_DIRS ${CMAKE_CURRENT_LIST_DIR}/../include + FILES + ${CMAKE_CURRENT_LIST_DIR}/../include/bsatk/bsaarchive.h + ${CMAKE_CURRENT_LIST_DIR}/../include/bsatk/bsaexception.h + ${CMAKE_CURRENT_LIST_DIR}/../include/bsatk/bsafile.h + ${CMAKE_CURRENT_LIST_DIR}/../include/bsatk/bsafolder.h + ${CMAKE_CURRENT_LIST_DIR}/../include/bsatk/bsatk.h + ${CMAKE_CURRENT_LIST_DIR}/../include/bsatk/bsatypes.h + ${CMAKE_CURRENT_LIST_DIR}/../include/bsatk/errorcodes.h + ${CMAKE_CURRENT_LIST_DIR}/../include/bsatk/filehash.h + +) + +set_target_properties(bsatk PROPERTIES CXX_STANDARD 20) + +# for building +target_include_directories(bsatk PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../include/bsatk) + +if (MSVC) + target_compile_options(bsatk + PRIVATE + "/MP" + "/W4" + "/external:anglebrackets" + "/external:W0" + ) + target_link_options(bsatk + PRIVATE + $<$<CONFIG:RelWithDebInfo>:/LTCG /INCREMENTAL:NO /OPT:REF /OPT:ICF> + ) + + set_target_properties(bsatk PROPERTIES VS_STARTUP_PROJECT bsatk) +endif() + +add_library(mo2::bsatk ALIAS bsatk) + +# install +install(TARGETS bsatk EXPORT bsatkTargets FILE_SET HEADERS) +install(EXPORT bsatkTargets + FILE mo2-bsatk-targets.cmake + NAMESPACE mo2:: + DESTINATION lib/cmake/mo2-bsatk +) |
