aboutsummaryrefslogtreecommitdiff
path: root/libs/plugin_python/src/pybind11-qt/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/plugin_python/src/pybind11-qt/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/plugin_python/src/pybind11-qt/CMakeLists.txt')
-rw-r--r--libs/plugin_python/src/pybind11-qt/CMakeLists.txt60
1 files changed, 60 insertions, 0 deletions
diff --git a/libs/plugin_python/src/pybind11-qt/CMakeLists.txt b/libs/plugin_python/src/pybind11-qt/CMakeLists.txt
new file mode 100644
index 0000000..cb742ad
--- /dev/null
+++ b/libs/plugin_python/src/pybind11-qt/CMakeLists.txt
@@ -0,0 +1,60 @@
+cmake_minimum_required(VERSION 3.16)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
+
+mo2_find_python_executable(PYTHON_EXE)
+
+add_library(pybind11-qt STATIC)
+mo2_configure_target(pybind11-qt
+ NO_SOURCES
+ WARNINGS 4
+ EXTERNAL_WARNINGS 4
+ AUTOMOC OFF
+ TRANSLATIONS OFF
+)
+mo2_default_source_group()
+target_sources(pybind11-qt
+ PRIVATE
+ ./include/pybind11_qt/pybind11_qt_basic.h
+ ./include/pybind11_qt/pybind11_qt_containers.h
+ ./include/pybind11_qt/pybind11_qt_enums.h
+ ./include/pybind11_qt/pybind11_qt_holder.h
+ ./include/pybind11_qt/pybind11_qt_objects.h
+ ./include/pybind11_qt/pybind11_qt_qflags.h
+ ./include/pybind11_qt/pybind11_qt.h
+
+ pybind11_qt_basic.cpp
+ pybind11_qt_sip.cpp
+ pybind11_qt_utils.cpp
+
+)
+mo2_target_sources(pybind11-qt
+ FOLDER src/details
+ PRIVATE
+ ./include/pybind11_qt/details/pybind11_qt_enum.h
+ ./include/pybind11_qt/details/pybind11_qt_qlist.h
+ ./include/pybind11_qt/details/pybind11_qt_qmap.h
+ ./include/pybind11_qt/details/pybind11_qt_sip.h
+ ./include/pybind11_qt/details/pybind11_qt_utils.h
+)
+target_link_libraries(pybind11-qt PUBLIC pybind11::pybind11 PRIVATE Qt6::Core Qt6::Widgets)
+target_include_directories(pybind11-qt PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
+
+# this is kind of broken but it only works with this...
+target_compile_definitions(pybind11-qt PUBLIC QT_NO_KEYWORDS)
+
+# we need sip.h for pybind11-qt
+add_custom_target(PyQt6-siph DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/sip.h")
+set_target_properties(PyQt6-siph PROPERTIES FOLDER autogen)
+add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/sip.h"
+ COMMAND ${Python_EXECUTABLE} -m sipbuild.tools.module
+ --sip-h
+ --target-dir ${CMAKE_CURRENT_BINARY_DIR}
+ PyQt${MO2_QT_VERSION_MAJOR}.sip
+)
+add_dependencies(pybind11-qt PyQt6-siph)
+
+target_include_directories(pybind11-qt PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
+
+add_library(pybind11::qt ALIAS pybind11-qt)