renamed project

This commit is contained in:
Blue 2023-12-03 11:39:48 -03:00
parent f547170728
commit da9513e4d9
Signed by: blue
GPG Key ID: 9B203B252A63EE38
4 changed files with 20 additions and 16 deletions

View File

@ -6,4 +6,4 @@ set(SOURCES
api.cpp
)
target_sources(megpie PRIVATE ${SOURCES})
target_sources(magpie PRIVATE ${SOURCES})

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.21.1)
project(megpie
project(magpie
VERSION 1.0
LANGUAGES CXX
)
@ -20,7 +20,7 @@ if(NOT EMSCRIPTEN AND CMAKE_TOOLCHAIN_FILE MATCHES ".*Emscripten\.cmake$")
set(EMSCRIPTEN TRUE)
endif()
qt_add_executable(megpie
qt_add_executable(magpie
root.cpp
)
@ -33,30 +33,30 @@ if (EMSCRIPTEN)
if (CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_CXX_FLAGS "-gsource-map")
else()
target_compile_options(megpie PRIVATE -Oz -g0)
target_link_options(megpie PRIVATE -0z -g0 --closure 1)
target_compile_options(magpie PRIVATE -Oz -g0)
target_link_options(magpie PRIVATE -0z -g0 --closure 1)
endif()
message("building for emscripten")
target_sources(megpie PRIVATE main_web.cpp)
target_sources(magpie PRIVATE main_web.cpp)
else()
if (CMAKE_BUILD_TYPE STREQUAL Debug)
else()
target_compile_options(megpie PRIVATE -O3)
target_compile_options(magpie PRIVATE -O3)
endif()
message("building for desktop")
target_sources(megpie PRIVATE main.cpp)
target_sources(magpie PRIVATE main.cpp)
endif()
if (CMAKE_BUILD_TYPE STREQUAL Debug)
else()
target_compile_options(megpie PRIVATE -flto)
target_link_options(megpie PRIVATE -flto)
target_compile_options(magpie PRIVATE -flto)
target_link_options(magpie PRIVATE -flto)
endif()
add_subdirectory(qml)
add_subdirectory(API)
target_link_libraries(megpie PRIVATE
target_link_libraries(magpie PRIVATE
Qt6::Core
Qt6::Gui
Qt6::Qml
@ -66,7 +66,7 @@ target_link_libraries(megpie PRIVATE
)
include(GNUInstallDirs)
install(TARGETS megpie
install(TARGETS magpie
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}

View File

@ -1,4 +1,4 @@
qt_add_qml_module(megpieQml
qt_add_qml_module(magpieQml
URI "qml"
VERSION 1.0
STATIC
@ -10,4 +10,4 @@ qt_add_qml_module(megpieQml
Welcome.qml
)
target_link_libraries(megpie PRIVATE megpieQml)
target_link_libraries(magpie PRIVATE magpieQml)

View File

@ -4,7 +4,7 @@ import QtQuick.Layouts
Page {
property string address
property bool valid
property bool valid: false
signal back()
signal success(address: string)
@ -111,7 +111,11 @@ Page {
}
function check () {
valid = false;
if (valid) {
success(address);
return;
}
modal.inProgress = true;
status.text = qsTr("Checking") + " " + address + "...";
modal.open()