Compare commits
5 Commits
33055ee899
...
31ea80ce5c
Author | SHA1 | Date |
---|---|---|
Valentino Orlandi | 31ea80ce5c | |
Valentino Orlandi | 7634023135 | |
Valentino Orlandi | 3e2155b691 | |
Valentino Orlandi | 931211527f | |
Valentino Orlandi | fc997a33ba |
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(LogDoctorInstaller VERSION 1.01 LANGUAGES CXX)
|
||||
project(LogDoctorInstaller VERSION 2.00 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
|
@ -8,7 +8,7 @@ set(CMAKE_AUTOUIC ON)
|
|||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
if(MSVC)
|
||||
|
@ -21,9 +21,15 @@ else()
|
|||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
||||
endif()
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets LinguistTools)
|
||||
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets LinguistTools)
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets LinguistTools)
|
||||
|
||||
if(${QT_VERSION_MAJOR} LESS 6)
|
||||
message("Error: Qt6 or greater required")
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
||||
set(TS_FILES
|
||||
translations/LogDoctorInstaller_en.ts
|
||||
translations/LogDoctorInstaller_es.ts
|
||||
|
@ -48,46 +54,28 @@ set(PROJECT_SOURCES
|
|||
${TS_FILES}
|
||||
)
|
||||
|
||||
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
|
||||
qt_add_executable(LogDoctorInstaller
|
||||
MANUAL_FINALIZATION
|
||||
${PROJECT_SOURCES}
|
||||
)
|
||||
# Define target properties for Android with Qt 6 as:
|
||||
# set_property(TARGET LogDoctorInstaller 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(LogDoctorInstaller 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(LogDoctorInstaller
|
||||
${PROJECT_SOURCES}
|
||||
)
|
||||
endif()
|
||||
|
||||
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
|
||||
endif()
|
||||
qt_add_executable(LogDoctorInstaller
|
||||
MANUAL_FINALIZATION
|
||||
${PROJECT_SOURCES}
|
||||
)
|
||||
qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
|
||||
|
||||
if(WIN32)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Bstatic -lgcc -lstdc++ -lwinpthread")
|
||||
target_link_libraries(LogDoctorInstaller PRIVATE
|
||||
-static Qt${QT_VERSION_MAJOR}::Widgets
|
||||
)
|
||||
else()
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
|
||||
target_link_libraries(LogDoctorInstaller PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(LogDoctorInstaller PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(LogDoctorInstaller PROPERTIES
|
||||
WIN32_EXECUTABLE TRUE)
|
||||
endif()
|
||||
|
||||
if(QT_VERSION_MAJOR EQUAL 6)
|
||||
qt_finalize_executable(LogDoctorInstaller)
|
||||
endif()
|
||||
qt_finalize_executable(LogDoctorInstaller)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -249,5 +249,9 @@ Continue?</translation>
|
|||
<source>To destination path</source>
|
||||
<translation>To destination path</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to change the owner of the resource</source>
|
||||
<translation>Failed to change the owner of the resource</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
@ -249,5 +249,9 @@ excepción hecha para databases, que no se verá afectada
|
|||
<source>To destination path</source>
|
||||
<translation type="unfinished">En el camino de destinación</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to change the owner of the resource</source>
|
||||
<translation type="unfinished">Error al cambiar el propietario del recurso</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
@ -249,5 +249,9 @@ Continuer?</translation>
|
|||
<source>To destination path</source>
|
||||
<translation type="unfinished">Vers le chemin de destination</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to change the owner of the resource</source>
|
||||
<translation type="unfinished">Échec du changement du propriétaire de la ressource</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
@ -249,5 +249,9 @@ Continuare?</translation>
|
|||
<source>To destination path</source>
|
||||
<translation>Nella destinazione</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to change the owner of the resource</source>
|
||||
<translation>Errore nel modificare il proprietario della risorsa</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
Loading…
Reference in New Issue