CMake: Always build Qt interface

And drop the mini interface. Turns out the reason I wrote this in the
first place was kinda redundant since the low spec machines can just run
a lightweight Wayland compositor, and it's generally reliable through
that anyhow.
This commit is contained in:
Stenzek
2026-03-13 17:41:09 +10:00
parent fedd294bde
commit 7b50681fa7
14 changed files with 18 additions and 2101 deletions

View File

@@ -1,8 +1,6 @@
# Renderer options.
option(ENABLE_OPENGL "Build with OpenGL renderer" ON)
option(ENABLE_VULKAN "Build with Vulkan renderer" ON)
option(BUILD_QT_FRONTEND "Build the Qt frontend" ON)
option(BUILD_MINI_FRONTEND "Build the Mini frontend" OFF)
option(BUILD_REGTEST "Build regression test runner" OFF)
option(BUILD_TESTS "Build unit tests" OFF)
option(DISABLE_SSE4 "Build with SSE4 instructions disabled, reduces performance" OFF)

View File

@@ -16,17 +16,11 @@ if(ENABLE_WAYLAND)
message(STATUS "Building with Wayland support.")
endif()
if(BUILD_QT_FRONTEND)
message(STATUS "Building Qt frontend.")
endif()
if(BUILD_NOGUI_FRONTEND)
message(STATUS "Building NoGUI frontend.")
endif()
if(BUILD_REGTEST)
message(STATUS "Building RegTest frontend.")
message(STATUS "[Extra] Building RegTest frontend.")
endif()
if(BUILD_TESTS)
message(STATUS "Building unit tests.")
message(STATUS "[Extra] Building unit tests.")
endif()
# Refuse to build in hostile package environments. The code and build script licenses do not allow for

View File

@@ -95,25 +95,23 @@ foreach(dep zstd WebP PNG libjpeg-turbo freetype harfbuzz plutosvg cpuinfo
endif()
endforeach()
if(BUILD_QT_FRONTEND)
# All our builds include Qt, so this is not a problem.
set(QT_NO_PRIVATE_MODULE_WARNING ON)
# All our builds include Qt, so this is not a problem.
set(QT_NO_PRIVATE_MODULE_WARNING ON)
# Should be prebuilt.
if(LINUX)
find_package(Qt6 6.10.2 REQUIRED
NO_DEFAULT_PATH PATHS "${DEPS_PATH}/lib/cmake/Qt6"
COMPONENTS Core Gui GuiPrivate Widgets LinguistTools DBus)
else()
find_package(Qt6 6.10.2 REQUIRED
NO_DEFAULT_PATH PATHS "${DEPS_PATH}/lib/cmake/Qt6"
COMPONENTS Core Gui GuiPrivate Widgets LinguistTools)
endif()
# Should be prebuilt.
if(LINUX)
find_package(Qt6 6.10.2 REQUIRED
NO_DEFAULT_PATH PATHS "${DEPS_PATH}/lib/cmake/Qt6"
COMPONENTS Core Gui GuiPrivate Widgets LinguistTools DBus)
else()
find_package(Qt6 6.10.2 REQUIRED
NO_DEFAULT_PATH PATHS "${DEPS_PATH}/lib/cmake/Qt6"
COMPONENTS Core Gui GuiPrivate Widgets LinguistTools)
endif()
# Have to verify it down here, don't want users using unpatched Qt.
if(NOT Qt6_DIR MATCHES "^${DEPS_PATH}")
message(FATAL_ERROR "Using incorrect Qt library. Check your dependencies.")
endif()
# Have to verify it down here, don't want users using unpatched Qt.
if(NOT Qt6_DIR MATCHES "^${DEPS_PATH}")
message(FATAL_ERROR "Using incorrect Qt library. Check your dependencies.")
endif()
# Libraries that are pulled in from host.

View File

@@ -51,8 +51,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reshadefx", "dep\reshadefx\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rapidyaml", "dep\rapidyaml\rapidyaml.vcxproj", "{1AD23A8A-4C20-434C-AE6B-0E07759EEB1E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "duckstation-mini", "src\duckstation-mini\duckstation-mini.vcxproj", "{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util-tests", "src\util-tests\util-tests.vcxproj", "{15538AD7-2201-45C2-B088-BBB7F37BD7F5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "installer", "src\installer\installer.vcxproj", "{CD6D0C84-042E-4C9A-AAB5-D3BDC80273DA}"
@@ -895,28 +893,6 @@ Global
{1AD23A8A-4C20-434C-AE6B-0E07759EEB1E}.ReleaseLTCG-Clang-SSE2|ARM64.ActiveCfg = ReleaseLTCG-Clang|ARM64
{1AD23A8A-4C20-434C-AE6B-0E07759EEB1E}.ReleaseLTCG-Clang-SSE2|x64.ActiveCfg = ReleaseLTCG-Clang-SSE2|x64
{1AD23A8A-4C20-434C-AE6B-0E07759EEB1E}.ReleaseLTCG-Clang-SSE2|x64.Build.0 = ReleaseLTCG-Clang-SSE2|x64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.Debug|ARM64.ActiveCfg = Debug-Clang|ARM64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.Debug|x64.ActiveCfg = Debug|x64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.Debug-Clang|ARM64.ActiveCfg = Debug-Clang|ARM64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.Debug-Clang|x64.ActiveCfg = Debug-Clang|x64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.Debug-Clang-SSE2|ARM64.ActiveCfg = Debug-Clang|ARM64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.Debug-Clang-SSE2|x64.ActiveCfg = Debug-Clang-SSE2|x64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.DebugFast|ARM64.ActiveCfg = DebugFast-Clang|ARM64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.DebugFast|x64.ActiveCfg = DebugFast|x64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.DebugFast-Clang|ARM64.ActiveCfg = DebugFast-Clang|ARM64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.DebugFast-Clang|x64.ActiveCfg = DebugFast-Clang|x64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.Devel-Clang|ARM64.ActiveCfg = Devel-Clang|ARM64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.Devel-Clang|x64.ActiveCfg = Devel-Clang|x64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.Release|ARM64.ActiveCfg = Release-Clang|ARM64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.Release|x64.ActiveCfg = Release|x64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.Release-Clang|ARM64.ActiveCfg = Release-Clang|ARM64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.Release-Clang|x64.ActiveCfg = Release-Clang|x64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.ReleaseLTCG|ARM64.ActiveCfg = ReleaseLTCG-Clang|ARM64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.ReleaseLTCG|x64.ActiveCfg = ReleaseLTCG|x64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.ReleaseLTCG-Clang|ARM64.ActiveCfg = ReleaseLTCG-Clang|ARM64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.ReleaseLTCG-Clang|x64.ActiveCfg = ReleaseLTCG-Clang|x64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.ReleaseLTCG-Clang-SSE2|ARM64.ActiveCfg = ReleaseLTCG-Clang|ARM64
{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}.ReleaseLTCG-Clang-SSE2|x64.ActiveCfg = ReleaseLTCG-Clang-SSE2|x64
{15538AD7-2201-45C2-B088-BBB7F37BD7F5}.Debug|ARM64.ActiveCfg = Debug-Clang|ARM64
{15538AD7-2201-45C2-B088-BBB7F37BD7F5}.Debug|x64.ActiveCfg = Debug|x64
{15538AD7-2201-45C2-B088-BBB7F37BD7F5}.Debug-Clang|ARM64.ActiveCfg = Debug-Clang|ARM64

View File

@@ -2,6 +2,7 @@ add_subdirectory(common)
add_subdirectory(util)
add_subdirectory(core)
add_subdirectory(scmversion)
add_subdirectory(duckstation-qt)
if(WIN32 OR APPLE)
add_subdirectory(updater)
@@ -12,14 +13,6 @@ if(WIN32)
add_subdirectory(uninstaller)
endif()
if(BUILD_QT_FRONTEND)
add_subdirectory(duckstation-qt)
endif()
if(BUILD_MINI_FRONTEND)
add_subdirectory(duckstation-mini)
endif()
if(BUILD_REGTEST)
add_subdirectory(duckstation-regtest)
endif()

View File

@@ -1,20 +0,0 @@
add_executable(duckstation-mini
mini_host.cpp
)
target_include_directories(duckstation-mini PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_link_libraries(duckstation-mini PRIVATE core util common imgui scmversion SDL3::SDL3)
add_core_resources(duckstation-mini)
if(WIN32)
target_sources(duckstation-mini PRIVATE
duckstation-mini.manifest
resource.h
)
# We want a Windows subsystem application not console.
set_target_properties(duckstation-mini PROPERTIES
WIN32_EXECUTABLE TRUE
DEBUG_POSTFIX "-debug")
endif()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:application>
<asmv3:windowsSettings>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
</assembly>

View File

@@ -1,110 +0,0 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (Australia) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
#pragma code_page(1252)
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "0c0904b0"
BEGIN
VALUE "CompanyName", "https://github.com/stenzek/duckstation"
VALUE "FileDescription", "DuckStation PS1 Emulator"
VALUE "FileVersion", "1.0.0.1"
VALUE "InternalName", "duckstation-mini.exe"
VALUE "LegalCopyright", "Copyright (C) 2020-2025 Stenzek and collaborators"
VALUE "OriginalFilename", "duckstation-mini.exe"
VALUE "ProductName", "DuckStation"
VALUE "ProductVersion", "1.0.0.1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0xc09, 1200
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON "duckstation-mini.ico"
#endif // English (Australia) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\dep\vsprops\Configurations.props" />
<ItemGroup>
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<Manifest Include="duckstation-mini.manifest" />
</ItemGroup>
<ItemGroup>
<Image Include="duckstation-mini.ico" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="duckstation-mini.rc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\common\common.vcxproj">
<Project>{ee054e08-3799-4a59-a422-18259c105ffd}</Project>
</ProjectReference>
<ProjectReference Include="..\core\core.vcxproj">
<Project>{868b98c8-65a1-494b-8346-250a73a48c0a}</Project>
</ProjectReference>
<ProjectReference Include="..\util\util.vcxproj">
<Project>{57f6206d-f264-4b07-baf8-11b9bbe1f455}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="mini_host.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{FA259BC0-1007-4FD9-8A47-87CC0ECB8445}</ProjectGuid>
<ProjectName>duckstation-mini</ProjectName>
</PropertyGroup>
<Import Project="..\..\dep\vsprops\Win32Application.props" />
<Import Project="..\core\core.props" />
<Import Project="..\..\dep\vsprops\Targets.props" />
</Project>

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<Manifest Include="duckstation-mini.manifest" />
</ItemGroup>
<ItemGroup>
<Image Include="duckstation-mini.ico" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="duckstation-mini.rc" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="mini_host.cpp" />
</ItemGroup>
</Project>

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by duckstation-sdl.rc
//
#define IDI_ICON1 102
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 103
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif