few changes for running on windows

This commit is contained in:
Agel committed 2026-03-16 11:29:43 +01:00
1 parent 0fcf303946
commit 97c79c17d3
6 files changed
+119 -110

No files matched your search

+5
View File
@@ -22,6 +22,7 @@ find_package(Qt6 OPTIONAL_COMPONENTS Pdf DBus)
# Third-party libraries
find_package(PkgConfig REQUIRED)
pkg_check_modules(UCHARDET REQUIRED uchardet)
find_package(Iconv REQUIRED)
# Source files
set(SOURCES
@@ -67,6 +68,7 @@ endif()
target_include_directories(asteria-qt PRIVATE ${UCHARDET_INCLUDE_DIRS})
target_link_libraries(asteria-qt PRIVATE ${UCHARDET_LIBRARIES})
target_link_libraries(asteria-qt PRIVATE Iconv::Iconv)
# Set resource aliases so src/qml/* maps to qrc:/Asteria/*
set_source_files_properties(src/qml/Main.qml PROPERTIES QT_RESOURCE_ALIAS Main.qml)
@@ -83,6 +85,8 @@ set_source_files_properties(src/qml/pages/ReaderPage.qml PROPERTIES QT_RESOURCE_
set_source_files_properties(src/qml/pages/SettingsPage.qml PROPERTIES QT_RESOURCE_ALIAS pages/SettingsPage.qml)
# QML module
qt_policy(SET QTP0004 NEW)
qt_add_qml_module(asteria-qt
URI Asteria
VERSION 1.0
@@ -120,6 +124,7 @@ function(add_asteria_test TEST_NAME TEST_SOURCE)
)
target_include_directories(${TEST_NAME} PRIVATE ${UCHARDET_INCLUDE_DIRS})
target_link_libraries(${TEST_NAME} PRIVATE ${UCHARDET_LIBRARIES})
target_link_libraries(${TEST_NAME} PRIVATE Iconv::Iconv)
add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME})
endfunction()