fix: fix qwfassoc build error

- fix qwfassoc build error
- set version of wfassoc to official version
- add version restriction when qwfassoc finding wfassoc
- rename qwfassoc project name in cmake configuration file
- set standalone build to OFF in default
This commit is contained in:
2026-08-18 20:27:08 +08:00
parent 6687ccb143
commit 27235c2619
7 changed files with 127 additions and 10 deletions
+117
View File
@@ -0,0 +1,117 @@
## ===== Personal =====
build/
install/
## ===== Visual Studio (Partial) =====
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
## ===== C++ =====
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
## ===== Qt =====
# C++ objects and libs
*.slo
*.lo
*.o
*.a
*.la
*.lai
*.so
*.so.*
*.dll
*.dylib
# Qt-es
object_script.*.Release
object_script.*.Debug
*_plugin_import.cpp
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.qbs.user
*.qbs.user.*
*.moc
moc_*.cpp
moc_*.h
qrc_*.cpp
ui_*.h
*.qmlc
*.jsc
Makefile*
*build-*
*.qm
*.prl
# Qt unit tests
target_wrapper.*
# QtCreator
*.autosave
# QtCreator Qml
*.qmlproject.user
*.qmlproject.user.*
# QtCreator CMake
CMakeLists.txt.user*
# QtCreator 4.8< compilation database
compile_commands.json
# QtCreator local machine specific files for imported projects
*creator.user*
*_qmlcache.qrc
+3 -3
View File
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.20)
project(qwfassoc_suite LANGUAGES CXX)
project(qwfassoc LANGUAGES CXX)
# Qt 6 requires C++17 at minimum.
set(CMAKE_CXX_STANDARD 17)
@@ -22,10 +22,10 @@ set(CMAKE_AUTORCC ON)
# toml11 is only needed when the standalone executable is built, so it is
# looked up conditionally below.
find_package(Qt6 REQUIRED COMPONENTS Widgets LinguistTools)
find_package(wfassoc REQUIRED)
find_package(wfassoc 1.0.0 REQUIRED)
# The standalone executable is optional: embedders may want only the library.
option(QWFASSOC_BUILD_STANDALONE "Build the qwfassoc-standalone executable" ON)
option(QWFASSOC_BUILD_STANDALONE "Build the qwfassoc-standalone executable" OFF)
add_subdirectory(qwfassoc)
@@ -91,7 +91,7 @@ Manifest parseManifestFile(const std::string& path) {
}
} catch (const std::exception& e) {
throw std::runtime_error(
"Manifest \"exts\" table contains an invalid entry: " +
std::string("Manifest \"exts\" table contains an invalid entry: ") +
e.what());
}
}