Some bug fixes and enhancements

This commit is contained in:
Torsten Schulz
2025-02-14 09:51:01 +01:00
parent c9bf7db38c
commit 2d03c47d33
4 changed files with 133 additions and 68 deletions

View File

@@ -9,8 +9,10 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
#target_include_directories(RenpyTranslationHelper PRIVATE /usr/include/qt6)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets Network)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Network)
set(TS_FILES RenpyTranslationHelper_en_GB.ts)
@@ -27,19 +29,11 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
# Define target properties for Android with Qt 6 as:
# set_property(TARGET RenpyTranslationHelper APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
# ${CMAKE_CURRENT_SOURCE_DIR}/android)
# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
# qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
else()
if(ANDROID)
add_library(RenpyTranslationHelper SHARED
${PROJECT_SOURCES}
)
# Define properties for Android with Qt 5 after find_package() calls as:
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
else()
add_executable(RenpyTranslationHelper
${PROJECT_SOURCES}
@@ -51,12 +45,9 @@ endif()
target_link_libraries(RenpyTranslationHelper PRIVATE
Qt${QT_VERSION_MAJOR}::Widgets
Qt6Network
Qt${QT_VERSION_MAJOR}::Network
)
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
# If you are developing for iOS or macOS you should consider setting an
# explicit, fixed bundle identifier manually though.
if(${QT_VERSION} VERSION_LESS 6.1.0)
set(BUNDLE_ID_OPTION MACOSX_BUNDLE_GUI_IDENTIFIER com.example.RenpyTranslationHelper)
endif()