-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete Qt 6 port. Closes: #35
- Loading branch information
Showing
17 changed files
with
145 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,66 @@ | ||
# Translations | ||
file(GLOB LiriCalculator_TRANSLATIONS "${CMAKE_SOURCE_DIR}/translations/*_*.ts") | ||
qt5_add_translation(LiriCalculator_QM_FILES ${LiriCalculator_TRANSLATIONS}) | ||
if(WIN32) | ||
set(_translations_destdir "${CMAKE_CURRENT_BINARY_DIR}/translations") | ||
elseif(APPLE) | ||
set(_translations_destdir "${CMAKE_CURRENT_BINARY_DIR}/Contents/Resources/data/translations") | ||
elseif(LINUX OR BSD) | ||
set(_translations_destdir "${INSTALL_DATADIR}/liri-calculator/translations") | ||
endif() | ||
if(DEFINED _translations_destdir) | ||
install(FILES ${LiriCalculator_QM_FILES} DESTINATION "${_translations_destdir}") | ||
endif() | ||
qt_add_executable(LiriCalculator | ||
WIN32 MACOSX_BUNDLE | ||
main/main.cpp | ||
filehandler/filehandler.cpp filehandler/filehandler.h | ||
) | ||
|
||
qt_add_qml_module(LiriCalculator | ||
URI Application | ||
VERSION 2.0 | ||
QML_FILES | ||
engine/qmldir | ||
engine/math.js | ||
engine/MathJs.qml | ||
ui/qmldir | ||
ui/ButtonsPanel.qml | ||
ui/ButtonsView.qml | ||
ui/CalculationLine.qml | ||
ui/CalculationZone.qml | ||
ui/HistoryPanel.qml | ||
ui/Main.qml | ||
ui/NavButton.qml | ||
ui/Shortcuts.qml | ||
ui/Styles.qml | ||
RESOURCES | ||
icons/icon.png | ||
) | ||
|
||
target_compile_definitions(LiriCalculator PRIVATE | ||
QT_NO_CAST_FROM_ASCII | ||
QT_NO_FOREACH | ||
) | ||
|
||
file(GLOB ts_files "../translations/*.ts") | ||
qt_add_translations(LiriCalculator | ||
TS_FILES ${ts_files} | ||
RESOURCE_PREFIX /qt/qml/Application/i18n | ||
) | ||
|
||
target_link_libraries(LiriCalculator | ||
PRIVATE | ||
Qt6::Core | ||
Qt6::Core5Compat | ||
Qt6::Gui | ||
Qt6::Widgets | ||
Qt6::Qml | ||
Qt6::Quick | ||
Qt6::QuickControls2 | ||
) | ||
|
||
if(APPLE OR WIN32) | ||
set(LiriCalculator_OUTPUT_NAME "LiriCalculator") | ||
set_target_properties(LiriCalculator PROPERTIES OUTPUT_NAME "LiriCalculator") | ||
else() | ||
set(LiriCalculator_OUTPUT_NAME "liri-calculator") | ||
set_target_properties(LiriCalculator PROPERTIES OUTPUT_NAME "liri-calculator") | ||
endif() | ||
if(APPLE) | ||
set_target_properties(LiriCalculator PROPERTIES | ||
MACOSX_BUNDLE_GUI_IDENTIFIER "io.liri.Calculator" | ||
MACOSX_BUNDLE_ICON_FILE "io.liri.Calculator" | ||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}" | ||
) | ||
endif() | ||
|
||
liri_add_executable(LiriCalculator | ||
OUTPUT_NAME | ||
"${LiriCalculator_OUTPUT_NAME}" | ||
SOURCES | ||
main/main.cpp | ||
filehandler/filehandler.cpp | ||
filehandler/filehandler.h | ||
${LiriCalculator_QM_FILES} | ||
RESOURCES | ||
calculator.qrc | ||
DEFINES | ||
QT_NO_CAST_FROM_ASCII | ||
QT_NO_FOREACH | ||
APPDATA | ||
"${CMAKE_CURRENT_SOURCE_DIR}/../data/io.liri.Calculator.appdata.xml" | ||
DESKTOP | ||
"${CMAKE_CURRENT_SOURCE_DIR}/../data/io.liri.Calculator.desktop" | ||
LIBRARIES | ||
Qt5::Core | ||
Qt5::Gui | ||
Qt5::Widgets | ||
Qt5::Qml | ||
Qt5::Quick | ||
Qt5::QuickControls2 | ||
GUI | ||
install(TARGETS LiriCalculator | ||
BUNDLE DESTINATION . | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
) | ||
set_target_properties(LiriCalculator PROPERTIES | ||
MACOSX_BUNDLE_GUI_IDENTIFIER "io.liri.Calculator" | ||
MACOSX_BUNDLE_ICON_FILE "io.liri.Calculator" | ||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}" | ||
) | ||
|
||
liri_finalize_executable(LiriCalculator) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.