Re: [Interest] qmake: set CFBundleDisplayName?

2023-05-31 Thread Tony Rietwyk

Hi,

In our iOS builds we use our own .plist files.  They are included in the 
.pro file by


    QMAKE_INFO_PLIST = $$_PRO_FILE_PWD_/Info.plist

The .plist file looks like:


"http://www.apple.com/DTDs/PropertyList-1.0.dtd;>



    CFBundleDevelopmentRegion
    en
    CFBundleDisplayName
    Cadences
    CFBundleDisplayName~ipad
    Cadences
    CFBundleExecutable
    ${EXECUTABLE_NAME}
    CFBundleIdentifier
    com.companyname.ios.a-cad
    CFBundleInfoDictionaryVersion
    6.0
    CFBundleName
    ${PRODUCT_NAME}
    CFBundlePackageType
    APPL
    CFBundleShortVersionString
    0.1
    CFBundleSignature
    
    CFBundleVersion
    20150312
    ... lots and lots of other crap




Hope that helps!

Tony

On 31/05/2023 10:29 pm, Alexander Dyagilev wrote:

Hello,

Is there a way to set this value from within qmake using some of its 
built-in variables?


By default, qmake generates Info.plist with the following content:

CFBundleDisplayName
${PRODUCT_NAME}


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qmake: set CFBundleDisplayName?

2023-05-31 Thread Alexander Dyagilev

There is a way using QMAKE_SUBSTITUTES (https://forum.qt.io/post/546870)

But I would prefer a more simple way.

On 5/31/2023 3:29 PM, Alexander Dyagilev wrote:

Hello,

Is there a way to set this value from within qmake using some of its 
built-in variables?


By default, qmake generates Info.plist with the following content:

CFBundleDisplayName
${PRODUCT_NAME}



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qmake: set CFBundleDisplayName?

2023-05-31 Thread Alexander Dyagilev

Unfortunately, this does not work...

On 5/31/2023 3:46 PM, Alexandru Croitor wrote:

Hi,

 From   
https://doc.qt.io/qt-6/ios.html#customizing-xcode-project-settings

Something like this should work?

product_name.name = PRODUCT_NAME
product_name.value = 
QMAKE_MAC_XCODE_SETTINGS += product_name


On 31. May 2023, at 14:29, Alexander Dyagilev  wrote:

Hello,

Is there a way to set this value from within qmake using some of its built-in 
variables?

By default, qmake generates Info.plist with the following content:

CFBundleDisplayName
${PRODUCT_NAME}


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qmake: set CFBundleDisplayName?

2023-05-31 Thread Alexandru Croitor via Interest
Hi,

>From   
https://doc.qt.io/qt-6/ios.html#customizing-xcode-project-settings

Something like this should work?

product_name.name = PRODUCT_NAME
product_name.value = 
QMAKE_MAC_XCODE_SETTINGS += product_name

> On 31. May 2023, at 14:29, Alexander Dyagilev  wrote:
> 
> Hello,
> 
> Is there a way to set this value from within qmake using some of its built-in 
> variables?
> 
> By default, qmake generates Info.plist with the following content:
> 
> CFBundleDisplayName
> ${PRODUCT_NAME}
> 
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] qmake: set CFBundleDisplayName?

2023-05-31 Thread Alexander Dyagilev

Hello,

Is there a way to set this value from within qmake using some of its 
built-in variables?


By default, qmake generates Info.plist with the following content:

CFBundleDisplayName
${PRODUCT_NAME}


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qmake to cmake - error: redefinition of 'unit' const QQmlPrivate::CachedQmlUnit unit

2022-12-15 Thread Nuno Santos
Ulf,

I found the culprit. I was indeed doing a duplicated import of my qml.cmake 
file, which was adding each qml twice to the compilation.

Thanks for the heads up.

Best regards,

Nuno

> On 15 Dec 2022, at 12:21, Ulf Hermann via Interest  
> wrote:
> 
>> list(APPEND QML_FILES
>> resources/qml/Browser.qml
>> resources/qml/BrowserBank.qml
>> resources/qml/BrowserButton.qml
>> …
> 
> Are there more files called "Browser.qml" in the same module? That doesn't 
> work. Your QML components need unique names.
> 
> Or is there some qt_target_qml_sources() or similar, repeating the same QML 
> files?
> 
> In general, I think we need a bug report with a complete example.
> 
> best regards,
> Ulf
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qmake to cmake - error: redefinition of 'unit' const QQmlPrivate::CachedQmlUnit unit

2022-12-15 Thread Ulf Hermann via Interest

list(APPEND QML_FILES
 resources/qml/Browser.qml
 resources/qml/BrowserBank.qml
 resources/qml/BrowserButton.qml
 …


Are there more files called "Browser.qml" in the same module? That 
doesn't work. Your QML components need unique names.


Or is there some qt_target_qml_sources() or similar, repeating the same 
QML files?


In general, I think we need a bug report with a complete example.

best regards,
Ulf
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qmake to cmake - error: redefinition of 'unit' const QQmlPrivate::CachedQmlUnit unit

2022-12-15 Thread Nuno Santos
Thiago,

Thanks for your reply. Too big to paste it here. I have included the errors and 
content of the shared_qmlcache_loader.cpp here:

https://pastebin.com/vV6DjRk6 

Thanks!

Regards,

Nuno

> On 14 Dec 2022, at 19:57, Thiago Macieira  wrote:
> 
> On Wednesday, 14 December 2022 16:11:10 -03 Nuno Santos wrote:
>> error: redefinition of ‘unit' const QQmlPrivate::CachedQmlUnit unit
> 
> Please paste the full error message. In particular, the compiler must have 
> told you where the other definition was.
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Cloud Software Architect - Intel DCAI Cloud Engineering
> 
> 
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qmake to cmake - error: redefinition of 'unit' const QQmlPrivate::CachedQmlUnit unit

2022-12-14 Thread Thiago Macieira
On Wednesday, 14 December 2022 16:11:10 -03 Nuno Santos wrote:
> error: redefinition of ‘unit' const QQmlPrivate::CachedQmlUnit unit

Please paste the full error message. In particular, the compiler must have 
told you where the other definition was.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] qmake to cmake - error: redefinition of 'unit' const QQmlPrivate::CachedQmlUnit unit

2022-12-14 Thread Nuno Santos
Hi,

I’m trying to start porting my .pro/.pri files to cmake and I’m stumbling on 
the following error:

error: redefinition of ‘unit' const QQmlPrivate::CachedQmlUnit unit

The file shared_qmlcache_loader.cpp has a the following content:

namespace QmlCacheGeneratedCode {
namespace _shared_resources_qml_Browser_qml { 
extern const unsigned char qmlData[];
extern const QQmlPrivate::AOTCompiledFunction aotBuiltFunctions[];
const QQmlPrivate::CachedQmlUnit unit = {
reinterpret_cast(), 
[0], nullptr
};
}
namespace _shared_resources_qml_BrowserBank_qml { 
extern const unsigned char qmlData[];
extern const QQmlPrivate::AOTCompiledFunction aotBuiltFunctions[];
const QQmlPrivate::CachedQmlUnit unit = {
reinterpret_cast(), 
[0], nullptr
};
}

unit is always being used as a variable for each qml component.

In my CMakeLists.txt I have the following include:

include(qml.cmake)

list(APPEND QML_FILES
resources/qml/Browser.qml
resources/qml/BrowserBank.qml
resources/qml/BrowserButton.qml
…


qt_add_qml_module(shared
URI shared
VERSION 1.0
QML_FILES ${QML_FILES}
SOURCES ${SOURCE_FILES}
)

Not specifying qml source, it compiles correctly.




___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qmake to CMake project conversion android build

2022-11-16 Thread Michael Heiser | SYSTRONIK Elektronik und Systemtechnik GmbH
To answer this myself: Get rid of all find_package(Qt5...) in CMakeList.txt not 
containing source files. Only search for qt packages in library or application 
related CMakeList.txt.

if(ANDROID)
set(QT_ANDROID_APPLICATION_BINARY EuroSoft_live)
endif()

has to be inserted before find_package() call for Qt library cause of a bug in 
Qt5 cmake tools that root PROJECT_NAME is used for the Android shared object 
file. This is fixed with Qt6.

Von: Interest  Im Auftrag von Michael Heiser | 
SYSTRONIK Elektronik und Systemtechnik GmbH
Gesendet: Mittwoch, 16. November 2022 13:28
An: semla...@gmail.com
Cc: interest@qt-project.org
Betreff: Re: [Interest] Qmake to CMake project conversion android build

I’m using Qt Creator and in Run EuroSoft live is already present:

[cid:image002.png@01D8FA58.56189FB0]

Regards Michael

Von: Alexey Edelev mailto:semla...@gmail.com>>
Gesendet: Mittwoch, 16. November 2022 13:09
An: Michael Heiser | SYSTRONIK Elektronik und Systemtechnik GmbH 
mailto:hei...@systronik.de>>
Cc: interest@qt-project.org<mailto:interest@qt-project.org>
Betreff: Re: [Interest] Qmake to CMake project conversion android build

Hi,

Do you use Qt Creator to build, deploy and run the application? If yes I would 
guess you need to switch the "Run" target on in bottom part of the left panel.

Regards,
Alexey.

ср, 16 нояб. 2022 г. в 12:10, Michael Heiser | SYSTRONIK Elektronik und 
Systemtechnik GmbH mailto:hei...@systronik.de>>:
Hello experts,
currently trying to move from qmake to cmake. Starting point in my Framework 
was using qmake2cmake tool. This generated a bunch of heavy cmake files, 
stripped them down and got it working that my integrated internal libs are 
building on windows.
I have managed to get building and running working under MSVC. Now I stuck with 
Android, my libraries and UI components in applets are building, also the final 
shared lib for EuroSoft_live is building but build process stops with following 
error:
 Fehler: Cannot find application binary in build dir 
D:/Projects/QtEuroSoftProjectQt6/build/Android_Qt_5_15_10_Clang_Multi_Abi-Debug/android-build//libs/armeabi-v7a/libEuroSoftProject_armeabi-v7a.so<https://v7a.so/>.

Project structure:
EuroSoftProject
CMakeLists.txt
- applications
CMakeLists.txt
- EuroSoft_live
CMakeLists.txt
- applets
- libraries
..

Why does the compiler search for libEuroSoftProject... and not for 
libEuroSoft_live...? When i remove the project tag from root CMakeLists.txt it 
searches for libProject... The final libEuroSoft_live is already exisiting in 
build-dir/android-build/libs/armeabi-v7a/...

Do you have any advice for me?

Regards Michael

SYSTRONIK Elektronik u. Systemtechnik GmbH, Gewerbestr. 57, D-88636 Illmensee
Registergericht Ulm - HRB 710423, Sitz der Gesellschaft Illmensee, USt-IdNr. DE 
811 264 405
Geschäftsführer: Dipl.-VW Elmar Fritz, Ing. Ramon J. van Tuijl, Dipl.-Ing. (FH) 
Richard Skoberla

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. 
Wenn Sie nicht der richtige Adressat sind oder die E-Mail irrtümlich erhalten 
haben, informieren
Sie bitte sofort den Absender und löschen Sie die E-Mail. Das unerlaubte 
Kopieren sowie die unbefugte Weitergabe der E-Mail ist nicht gestattet.

This e-mail may contain confidential and / or privileged information. If you 
are not the intended recipient or the e-mail may contain error, inform you 
immediately ask the sender and delete the e-mail. Unauthorized copying, 
unauthorized disclosure of e-mail is strictly forbidden.

___
Interest mailing list
Interest@qt-project.org<mailto:Interest@qt-project.org>
https://lists.qt-project.org/listinfo/interest
SYSTRONIK Elektronik u. Systemtechnik GmbH, Gewerbestr. 57, D-88636 Illmensee
Registergericht Ulm - HRB 710423, Sitz der Gesellschaft Illmensee, USt-IdNr. DE 
811 264 405
Geschäftsführer: Dipl.-VW Elmar Fritz, Ing. Ramon J. van Tuijl, Dipl.-Ing. (FH) 
Richard Skoberla

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. 
Wenn Sie nicht der richtige Adressat sind oder die E-Mail irrtümlich erhalten 
haben, informieren
Sie bitte sofort den Absender und löschen Sie die E-Mail. Das unerlaubte 
Kopieren sowie die unbefugte Weitergabe der E-Mail ist nicht gestattet.

This e-mail may contain confidential and / or privileged information. If you 
are not the intended recipient or the e-mail may contain error, inform you 
immediately ask the sender and delete the e-mail. Unauthorized copying, 
unauthorized disclosure of e-mail is strictly forbidden.


SYSTRONIK Elektronik u. Systemtechnik GmbH, Gewerbestr. 57, D-88636 Illmensee
Registergericht Ulm - HRB 710423, Sitz der Gesellschaft Illmensee, USt-IdNr. DE 
811 264 405
Geschäftsführer: Dipl.-VW Elmar Fritz, Ing. Ramon J. van Tuijl, Dipl.-Ing. (FH) 
Richard Skoberla

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. 
Wenn Sie ni

Re: [Interest] Qmake to CMake project conversion android build

2022-11-16 Thread Michael Heiser | SYSTRONIK Elektronik und Systemtechnik GmbH
I’m using Qt Creator and in Run EuroSoft live is already present:

[cid:image002.png@01D8F9BF.37A3EFB0]

Regards Michael

Von: Alexey Edelev 
Gesendet: Mittwoch, 16. November 2022 13:09
An: Michael Heiser | SYSTRONIK Elektronik und Systemtechnik GmbH 

Cc: interest@qt-project.org
Betreff: Re: [Interest] Qmake to CMake project conversion android build

Hi,

Do you use Qt Creator to build, deploy and run the application? If yes I would 
guess you need to switch the "Run" target on in bottom part of the left panel.

Regards,
Alexey.

ср, 16 нояб. 2022 г. в 12:10, Michael Heiser | SYSTRONIK Elektronik und 
Systemtechnik GmbH mailto:hei...@systronik.de>>:
Hello experts,
currently trying to move from qmake to cmake. Starting point in my Framework 
was using qmake2cmake tool. This generated a bunch of heavy cmake files, 
stripped them down and got it working that my integrated internal libs are 
building on windows.
I have managed to get building and running working under MSVC. Now I stuck with 
Android, my libraries and UI components in applets are building, also the final 
shared lib for EuroSoft_live is building but build process stops with following 
error:
 Fehler: Cannot find application binary in build dir 
D:/Projects/QtEuroSoftProjectQt6/build/Android_Qt_5_15_10_Clang_Multi_Abi-Debug/android-build//libs/armeabi-v7a/libEuroSoftProject_armeabi-v7a.so<https://v7a.so/>.

Project structure:
EuroSoftProject
CMakeLists.txt
- applications
CMakeLists.txt
- EuroSoft_live
CMakeLists.txt
- applets
- libraries
..

Why does the compiler search for libEuroSoftProject... and not for 
libEuroSoft_live...? When i remove the project tag from root CMakeLists.txt it 
searches for libProject... The final libEuroSoft_live is already exisiting in 
build-dir/android-build/libs/armeabi-v7a/...

Do you have any advice for me?

Regards Michael

SYSTRONIK Elektronik u. Systemtechnik GmbH, Gewerbestr. 57, D-88636 Illmensee
Registergericht Ulm - HRB 710423, Sitz der Gesellschaft Illmensee, USt-IdNr. DE 
811 264 405
Geschäftsführer: Dipl.-VW Elmar Fritz, Ing. Ramon J. van Tuijl, Dipl.-Ing. (FH) 
Richard Skoberla

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. 
Wenn Sie nicht der richtige Adressat sind oder die E-Mail irrtümlich erhalten 
haben, informieren
Sie bitte sofort den Absender und löschen Sie die E-Mail. Das unerlaubte 
Kopieren sowie die unbefugte Weitergabe der E-Mail ist nicht gestattet.

This e-mail may contain confidential and / or privileged information. If you 
are not the intended recipient or the e-mail may contain error, inform you 
immediately ask the sender and delete the e-mail. Unauthorized copying, 
unauthorized disclosure of e-mail is strictly forbidden.

___
Interest mailing list
Interest@qt-project.org<mailto:Interest@qt-project.org>
https://lists.qt-project.org/listinfo/interest
SYSTRONIK Elektronik u. Systemtechnik GmbH, Gewerbestr. 57, D-88636 Illmensee
Registergericht Ulm - HRB 710423, Sitz der Gesellschaft Illmensee, USt-IdNr. DE 
811 264 405
Geschäftsführer: Dipl.-VW Elmar Fritz, Ing. Ramon J. van Tuijl, Dipl.-Ing. (FH) 
Richard Skoberla

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. 
Wenn Sie nicht der richtige Adressat sind oder die E-Mail irrtümlich erhalten 
haben, informieren
Sie bitte sofort den Absender und löschen Sie die E-Mail. Das unerlaubte 
Kopieren sowie die unbefugte Weitergabe der E-Mail ist nicht gestattet.

This e-mail may contain confidential and / or privileged information. If you 
are not the intended recipient or the e-mail may contain error, inform you 
immediately ask the sender and delete the e-mail. Unauthorized copying, 
unauthorized disclosure of e-mail is strictly forbidden.
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qmake to CMake project conversion android build

2022-11-16 Thread Alexey Edelev
Hi,

Do you use Qt Creator to build, deploy and run the application? If yes I
would guess you need to switch the "Run" target on in bottom part of the
left panel.

Regards,
Alexey.

ср, 16 нояб. 2022 г. в 12:10, Michael Heiser | SYSTRONIK Elektronik und
Systemtechnik GmbH :

> Hello experts,
> currently trying to move from qmake to cmake. Starting point in my
> Framework was using qmake2cmake tool. This generated a bunch of heavy cmake
> files, stripped them down and got it working that my integrated internal
> libs are building on windows.
> I have managed to get building and running working under MSVC. Now I stuck
> with Android, my libraries and UI components in applets are building, also
> the final shared lib for EuroSoft_live is building but build process stops
> with following error:
>  Fehler: Cannot find application binary in build dir
> D:/Projects/QtEuroSoftProjectQt6/build/Android_Qt_5_15_10_Clang_Multi_Abi-Debug/android-build//libs/armeabi-v7a/libEuroSoftProject_armeabi-
> v7a.so.
>
> Project structure:
> EuroSoftProject
> CMakeLists.txt
> - applications
> CMakeLists.txt
> - EuroSoft_live
> CMakeLists.txt
> - applets
> - libraries
> ..
>
> Why does the compiler search for libEuroSoftProject... and not for
> libEuroSoft_live...? When i remove the project tag from root CMakeLists.txt
> it searches for libProject... The final libEuroSoft_live is already
> exisiting in build-dir/android-build/libs/armeabi-v7a/...
>
> Do you have any advice for me?
>
> Regards Michael
>
>
> *SYSTRONIK Elektronik u. Systemtechnik GmbH*, Gewerbestr. 57, D-88636
> Illmensee
> Registergericht Ulm - HRB 710423, Sitz der Gesellschaft Illmensee,
> USt-IdNr. DE 811 264 405
> Geschäftsführer: Dipl.-VW Elmar Fritz, Ing. Ramon J. van Tuijl, Dipl.-Ing.
> (FH) Richard Skoberla
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen. Wenn Sie nicht der richtige Adressat sind oder die E-Mail
> irrtümlich erhalten haben, informieren
> Sie bitte sofort den Absender und löschen Sie die E-Mail. Das unerlaubte
> Kopieren sowie die unbefugte Weitergabe der E-Mail ist nicht gestattet.
>
> This e-mail may contain confidential and / or privileged information. If
> you are not the intended recipient or the e-mail may contain error, inform
> you immediately ask the sender and delete the e-mail. Unauthorized copying,
> unauthorized disclosure of e-mail is strictly forbidden.
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Qmake to CMake project conversion android build

2022-11-16 Thread Michael Heiser | SYSTRONIK Elektronik und Systemtechnik GmbH
Hello experts,
currently trying to move from qmake to cmake. Starting point in my Framework 
was using qmake2cmake tool. This generated a bunch of heavy cmake files, 
stripped them down and got it working that my integrated internal libs are 
building on windows.
I have managed to get building and running working under MSVC. Now I stuck with 
Android, my libraries and UI components in applets are building, also the final 
shared lib for EuroSoft_live is building but build process stops with following 
error:
 Fehler: Cannot find application binary in build dir 
D:/Projects/QtEuroSoftProjectQt6/build/Android_Qt_5_15_10_Clang_Multi_Abi-Debug/android-build//libs/armeabi-v7a/libEuroSoftProject_armeabi-v7a.so.

Project structure:
EuroSoftProject
CMakeLists.txt
- applications
CMakeLists.txt
- EuroSoft_live
CMakeLists.txt
- applets
- libraries
..

Why does the compiler search for libEuroSoftProject... and not for 
libEuroSoft_live...? When i remove the project tag from root CMakeLists.txt it 
searches for libProject... The final libEuroSoft_live is already exisiting in 
build-dir/android-build/libs/armeabi-v7a/...

Do you have any advice for me?

Regards Michael

SYSTRONIK Elektronik u. Systemtechnik GmbH, Gewerbestr. 57, D-88636 Illmensee
Registergericht Ulm - HRB 710423, Sitz der Gesellschaft Illmensee, USt-IdNr. DE 
811 264 405
Geschäftsführer: Dipl.-VW Elmar Fritz, Ing. Ramon J. van Tuijl, Dipl.-Ing. (FH) 
Richard Skoberla

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. 
Wenn Sie nicht der richtige Adressat sind oder die E-Mail irrtümlich erhalten 
haben, informieren
Sie bitte sofort den Absender und löschen Sie die E-Mail. Das unerlaubte 
Kopieren sowie die unbefugte Weitergabe der E-Mail ist nicht gestattet.

This e-mail may contain confidential and / or privileged information. If you 
are not the intended recipient or the e-mail may contain error, inform you 
immediately ask the sender and delete the e-mail. Unauthorized copying, 
unauthorized disclosure of e-mail is strictly forbidden.
cmake_minimum_required(VERSION 3.16)
set(APPLICATION_COPYRIGHT "2015-2022")
set(APPLICATION_NAME "EuroSoft live")
set(ORGANIZATION_DOMAIN "www.systronik.com")
set(ORGANIZATION_NAME "Systronik")
set(APPLICATION_VERSION 2.11.0)

include(${CMAKE_CURRENT_SOURCE_DIR}/../../global_conf.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../global_functions.cmake)

project(EuroSoft_live VERSION ${APPLICATION_VERSION} LANGUAGES CXX)

# Set up AUTOMOC and some sensible defaults for runtime execution
# When using Qt 6.3, you can replace the code block below with
# qt_standard_project_setup()
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt5 Qt6 COMPONENTS Core REQUIRED)
find_package(Qt5  COMPONENTS Bluetooth Charts Concurrent Gui Multimedia Network 
Qml Quick Script Sql WebSockets WebChannel Widgets Xml REQUIRED)
if(ANDROID)
find_package(Qt5 COMPONENTS AndroidExtras PrintSupport REQUIRED)
endif()
if(MSVC OR MACOS)
find_package(Qt5 COMPONENTS SerialPort PrintSupport REQUIRED)
endif()

# Resources:

file (GLOB_RECURSE 3rdarty_headers CONFIGURE_DEPENDS 
"../../libraries/3rdparty/*.h")

set (3rdparty_includeDirs "")
foreach (_headerFile ${3rdarty_headers})
get_filename_component(_dir ${_headerFile} PATH)
list (APPEND EuroSoftUi_includeDirs ${_dir})
endforeach()
list (REMOVE_DUPLICATES 3rdparty_includeDirs)

include_directories(
..
${3rdparty_includeDirs}
../../libraries/EuroSoft/..
../../libraries/EuroSoftUi/..
)

set(EuroSoft_live_src
../../libraries/EuroSoftUi/supporting/ComponentInitializer.cpp 
../../libraries/EuroSoftUi/supporting/ComponentInitializer.h
EuroSoftLiveController.cpp EuroSoftLiveController.h
EuroSoftLiveViewQml.cpp EuroSoftLiveViewQml.h
main.cpp
)

set(EuroSoft_live_rc
EuroSoft_live.qrc
../../libraries/EuroSoft/EuroSoft.qrc
../../libraries/EuroSoftUi/EuroSoftUi.qrc
../../libraries/EuroSoftUi/EuroSoftUi_resources.qrc
../../applets/measurement/measurement.qrc
../../applets/settings/settings.qrc
../../libraries/3rdparty/3rdparty.qrc
../../textdata/ApplicationMetaData/EuroSoftProject_metadata.qrc
../../translations/compiled/EuroSoftProject_translations.qrc
../../translations/compiled/qtbase_translations.qrc
../../translations/compiled/qtconnectivity_translations.qrc
../../translations/compiled/qtquickcontrols_translations.qrc
)

if(MSVC)
set(EuroSoft_live_rc
${EuroSoft_live_rc}

../../libraries/EuroSoft/loggerconfig/supporting/images/CapbsSensIcons.qrc
)
enable_language("RC")

add_executable(${PROJECT_NAME} WIN32
${EuroSoft_live_src}
${EuroSoft_live_rc}
${CMAKE_CURRENT_SOURCE_DIR}/windows/icon.rc

${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/EuroSoft/Win10Compatibility.manifest
)
elseif(ANDROID)

Re: [Interest] qmake (wasm) : qtlogo.svg

2021-04-30 Thread Morten Sørvig


> On 29 Apr 2021, at 20:56, Nicholas Yue  wrote:
> 
> Hi,
> 
>   When building a Qt app with qmake that was build as WASM, it generate a 
> corresponding *.html which references the qtlogo.svg file
> 
> cme.html: style="display:block">
> 
>   Is there some option in the *.pro I can specify to tell qmake to use a 
> different SVG file instead?
> 

Hi,

Short answer is no, there is no option.

The expectation is that applications will provide their own .html file which 
suites their use case. The default one makes the app canvas cover the entire 
viewport, so if that is the presentation you want then you can use the 
generated html as a base and replace the Qt branding.

Regards,
Morten

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] qmake (wasm) : qtlogo.svg

2021-04-29 Thread Nicholas Yue
Hi,

  When building a Qt app with qmake that was build as WASM, it generate a
corresponding *.html which references the qtlogo.svg file

cme.html:

  Is there some option in the *.pro I can specify to tell qmake to use a
different SVG file instead?

Cheers
-- 
Nicholas Yue
Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
http://au.linkedin.com/in/nicholasyue
https://vimeo.com/channels/naiadtools
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qmake bug. Any workaround?

2021-01-15 Thread Alexander Dyagilev
I've created additional .cpp file in which I've just included 
disarm.cpp. This helped.


But I would like to get a solution which will work after any changes are 
made to Detours lib so I do not have to make such modifications in the 
future.


On 1/15/2021 6:36 PM, Allan Sandfeld Jensen wrote:
Rename disarm.cpp to a header file, and include that in two different 
source

files?

'Allan



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qmake bug. Any workaround?

2021-01-15 Thread Allan Sandfeld Jensen
On Freitag, 15. Januar 2021 15:54:25 CET Alexander Dyagilev wrote:
> Hello,
> 
> I am trying to create a .pro file to compile Microsoft Detours lib.
> 
> Failed, it generates linker error:
> 
> detours.obj:-1: error: LNK2019: unresolved external symbol
> DetourCopyInstruction referenced in function DetourAttachEx
> 
> This function is defined in disasm.cpp in case there are no special
> defines existing.
> 
> But, there are disolarm.cpp disolarm64.cpp disolia64.cpp disolx64.cpp
> disolx86.cpp sources which defines platform-depended definitions and
> then includes this disasm.cpp.
> 
> E.g. disolarm.cpp contains of only these 2 lines of code:
> #define DETOURS_ARM_OFFLINE_LIBRARY
> #include "disasm.cpp"
> 
> In this case disasm.cpp defines DetourCopyInstructionARM instead of
> DetourCopyInstruction.
> 
> Qmake has the bug (https://bugreports.qt.io/browse/QTBUG-24906) which
> causes qmake to DROP disasm.cpp from SOURCES because it's included in
> these source files . Thus plain DetourCopyInstruction is not defined
> anywhere.
> 
> If I replace #include "disasm.cpp" lines with file's content, all works
> fine. But this is not a workaround I want.
> 
Rename disarm.cpp to a header file, and include that in two different source 
files?

'Allan


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qmake bug. Any workaround?

2021-01-15 Thread Thiago Macieira
On Friday, 15 January 2021 06:54:25 PST Alexander Dyagilev wrote:
> Is there one which can be used in a real project? Why is this ugly bug
> not fixed yet (8 years has passed)?

Because it's not a bug, it's an intentional feature.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] qmake bug. Any workaround?

2021-01-15 Thread Alexander Dyagilev

Hello,

I am trying to create a .pro file to compile Microsoft Detours lib.

Failed, it generates linker error:

detours.obj:-1: error: LNK2019: unresolved external symbol 
DetourCopyInstruction referenced in function DetourAttachEx


This function is defined in disasm.cpp in case there are no special 
defines existing.


But, there are disolarm.cpp disolarm64.cpp disolia64.cpp disolx64.cpp 
disolx86.cpp sources which defines platform-depended definitions and 
then includes this disasm.cpp.


E.g. disolarm.cpp contains of only these 2 lines of code:
#define DETOURS_ARM_OFFLINE_LIBRARY
#include "disasm.cpp"

In this case disasm.cpp defines DetourCopyInstructionARM instead of 
DetourCopyInstruction.


Qmake has the bug (https://bugreports.qt.io/browse/QTBUG-24906) which 
causes qmake to DROP disasm.cpp from SOURCES because it's included in 
these source files . Thus plain DetourCopyInstruction is not defined 
anywhere.


If I replace #include "disasm.cpp" lines with file's content, all works 
fine. But this is not a workaround I want.


Is there one which can be used in a real project? Why is this ugly bug 
not fixed yet (8 years has passed)?


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QMake contains and include

2020-05-22 Thread Jérôme Godbout
The filter make it slightly better, still see the .pri and those part clear, I 
still have to dig them to see if they are used. I would love to see the .pri 
and folder grey out if nothing is used into it.
Thanks for the info all.

-Original Message-
From: Interest  On Behalf Of Christian Kandeler
Sent: May 22, 2020 3:34 AM
To: interest@qt-project.org
Subject: Re: [Interest] QMake contains and include

On Thu, 21 May 2020 13:35:08 +
Jérôme Godbout  wrote:

> It would be nice to see the .pri grey out or something more obvious. Or even 
> better an option to show/hide them.

The project tree filter has an option "Hide disabled files".


Christian
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QMake contains and include

2020-05-22 Thread Christian Kandeler
On Wed, 20 May 2020 18:44:19 -0700
Thiago Macieira  wrote:

> The Qt Creator ProParser code has some different error recovery mechanisms 
> than qmake. Obviously it's going to be non-fatal to interact with a 
> repository 
> that is missing. It will also not run $$system() and do some other things 
> that 
> qmake would.

Actually, it does run system(), in order to provide correct project information 
for constructs such as
   system(...): SOURCES += ...


Christian
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QMake contains and include

2020-05-22 Thread Christian Kandeler
On Thu, 21 May 2020 13:35:08 +
Jérôme Godbout  wrote:

> It would be nice to see the .pri grey out or something more obvious. Or even 
> better an option to show/hide them.

The project tree filter has an option "Hide disabled files".


Christian
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QMake contains and include

2020-05-21 Thread Jérôme Godbout
I understand your point, but I would love to see a different UX for non include 
.pri to be quickly different from the one included (now I have to dig to the 
resources, headers or sources to see the difference). It would be nice to see 
the .pri grey out or something more obvious. Or even better an option to 
show/hide them.

-Original Message-
From: André Pönitz  
Sent: May 21, 2020 12:02 AM
To: Jérôme Godbout 
Cc: gm...@ratijas.tk; interest@qt-project.org
Subject: Re: [Interest] QMake contains and include

On Wed, May 20, 2020 at 04:30:41PM +, Jérôme Godbout wrote:
>It kinda work, it’s really weird, but all the project get display, the
>.pri and the include/source no matter the condition, but they are grey
>out if the include condition is false, so it does scan the .pri no
>matter what but doesn’t really include them to be used only for
>display!?! So I got all the optional part display but not really used.
>The compile seem to work. This leave an horrible UX view for developer
>to see part that aren’t used but source is display and searchable for
>the project!
> 
> 
>I think I can live with it but this is an horrible UX to display those
>include no matter the condition that include them or not, here what it
>does (image in attachment) with:

I guess you also would prefer refactorings, searches for occurences of symbols 
and translatable strings not to happen in branches of your project that are 
currently not active.

That's not the case for everybody.

Andre'
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QMake contains and include

2020-05-21 Thread Jérôme Godbout
Thanks Thiago, it clear up. It does make more sense to me now.

My use case is my projects use a subrepository that have a core code mandatory 
and some optional parts. Many projects use that subrepos and inlclude or not 
the optional part based on the application need. It look like this:

MyApp1.pro
MySubreposMandatory.pri
MySubreposOption1.pri (included)
MySubreposOption2.pri (not inlcuded)

MyApp2.pro
MySubreposMandatory.pri
MySubreposOption1.pri (included)
MySubreposOption2.pri (inlcuded)

This is a simpler use case but this is how we do reuse many code part between 
our applications with generic code. When I'm doing app2 it make sens to edit 
the  Option2, but when I do work in app1 I do not use the option2, I won't edit 
it. It ain't that bad, I was more confuse about that behavior. 

This is only my own opinion on the behavior:

Pro:
-I can see the available options project that I can include in my applications
-Search also fetch code from unused parts (replace API less chance to forget a 
code into optional part)

Cons:
-Clutter the UI with unsued parts and confuse my junior dev about what is used 
into the projects. We have to open the module and look if the source is grey 
out or not to known if that module is used into the application or look 
directly into the .pro
-Search also fetch code from unused parts (unwanted used code into application)

I do something like this into my app to easily add or remove stuff from it:


// MyApp.pro
AMOTUS_SUBREPOS_NAMES = Amotus_CPP Amotus_Qt Amotus_Qml Amotus_Style
AMOTUS_SUBREPOS_OPTIONAL_NAMES = i18n Amotus_Qt_FileSystem Amotus_Qt_OAuth 
Amotus_Qt_Network Amotus_Qt_Bluetooth Amotus_Qt_GUI 

for(a, AMOTUS_SUBREPOS_NAMES){
!include($${AMOTUS_SUBREPOS_PATH}/$${a}/pri/$${a}.pri){
error(Cannot find the sub repos 
$${AMOTUS_SUBREPOS_PATH}/$${a}/pri/$${a}.pri)
}
}


// Amotus_Qt.pri
contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, i18n){
include(i18n.pri)
HEADERS += $$AMOTUS_Qt_PATH/i18n.h
SOURCES += $$AMOTUS_Qt_PATH/i18n.cpp
}
contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, Amotus_Qt_FileSystem){
include(Amotus_Qt_FileSystem.pri)
}
...

-Original Message-
From: Interest  On Behalf Of Thiago Macieira
Sent: May 20, 2020 9:44 PM
To: interest@qt-project.org
Subject: Re: [Interest] QMake contains and include

On Wednesday, 20 May 2020 10:39:50 PDT Jérôme Godbout wrote:
> If I may, why I want that in QtCreator exactly? what is the use case 
> for this? If my project doesn't use a part, why is it parsed at all? 
> What will happen if that unused .pri make a failure for something 
> missing? Will it failed to load the project and stop? let's say I have 
> an option that require an interaction with another subrepos, one 
> project might not need that part and not have it checkout, the .pri 
> that interact with it would not be include, how would QtCreator react to this?

Are those two source files not part of your project? If they are, then they 
should be included in the file listing. I assume you sometimes edit them.

The Qt Creator ProParser code has some different error recovery mechanisms than 
qmake. Obviously it's going to be non-fatal to interact with a repository that 
is missing. It will also not run $$system() and do some other things that qmake 
would.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QMake contains and include

2020-05-20 Thread André Pönitz
On Wed, May 20, 2020 at 04:30:41PM +, Jérôme Godbout wrote:
>It kinda work, it’s really weird, but all the project get display, the
>.pri and the include/source no matter the condition, but they are grey
>out if the include condition is false, so it does scan the .pri no
>matter what but doesn’t really include them to be used only for
>display!?! So I got all the optional part display but not really used.
>The compile seem to work. This leave an horrible UX view for developer
>to see part that aren’t used but source is display and searchable for
>the project!
> 
> 
>I think I can live with it but this is an horrible UX to display those
>include no matter the condition that include them or not, here what it
>does (image in attachment) with:

I guess you also would prefer refactorings, searches for occurences of
symbols and translatable strings not to happen in branches of your
project that are currently not active.

That's not the case for everybody.

Andre'
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QMake contains and include

2020-05-20 Thread Thiago Macieira
On Wednesday, 20 May 2020 10:39:50 PDT Jérôme Godbout wrote:
> If I may, why I want that in QtCreator exactly? what is the use case for
> this? If my project doesn't use a part, why is it parsed at all? What will
> happen if that unused .pri make a failure for something missing? Will it
> failed to load the project and stop? let's say I have an option that
> require an interaction with another subrepos, one project might not need
> that part and not have it checkout, the .pri that interact with it would
> not be include, how would QtCreator react to this?

Are those two source files not part of your project? If they are, then they 
should be included in the file listing. I assume you sometimes edit them.

The Qt Creator ProParser code has some different error recovery mechanisms 
than qmake. Obviously it's going to be non-fatal to interact with a repository 
that is missing. It will also not run $$system() and do some other things that 
qmake would.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QMake contains and include

2020-05-20 Thread Jérôme Godbout
Sorry about that, yeah it's QtCreator, I figure out it was displaying the 
unused .pri along all the file inclusion of it. At first I was thinking it was 
including the .pri straight since I could see it, then I realized the source, 
headers and resources files was gray out, which seem to indicate it won't be 
used. The compiler seem to do the right thing. It was very confusing to see the 
non included .pri showing up along their content.

If I may, why I want that in QtCreator exactly? what is the use case for this? 
If my project doesn't use a part, why is it parsed at all? What will happen if 
that unused .pri make a failure for something missing? Will it failed to load 
the project and stop? let's say I have an option that require an interaction 
with another subrepos, one project might not need that part and not have it 
checkout, the .pri that interact with it would not be include, how would 
QtCreator react to this?

Thanks,

-Original Message-
From: Interest  On Behalf Of Thiago Macieira
Sent: May 20, 2020 1:23 PM
To: interest@qt-project.org
Subject: Re: [Interest] QMake contains and include

On Wednesday, 20 May 2020 09:30:41 PDT Jérôme Godbout wrote:
> It kinda work, it’s really weird, but all the project get display, the 
> .pri and the include/source no matter the condition, but they are grey 
> out if the include condition is false, so it does scan the .pri no 
> matter what but doesn’t really include them to be used only for 
> display!?! So I got all the optional part display but not really used. 
> The compile seem to work. This leave an horrible UX view for developer 
> to see part that aren’t used but source is display and searchable for the 
> project!

Are you talking about qmake or about Qt Creator's .pro file parsing?

Qt Creator evaluates all conditions, including false ones, so it can gather all 
dependencies and all possibilities. For example, if you had:

contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, i18n): \
SOURCES += $$AMOTUS_Qt_PATH/i18n.cpp
else: \
SOURCES += $$AMOTUS_Qt_PATH/no-i18n.cpp

Then Qt Creator should display both files in your file listing. You *want* that.

But qmake will follow only one code path when generating your Makefile.

So please be precise: are you talking about Qt Creator or are you talking about 
the actual build?
--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QMake contains and include

2020-05-20 Thread Thiago Macieira
On Wednesday, 20 May 2020 09:30:41 PDT Jérôme Godbout wrote:
> It kinda work, it’s really weird, but all the project get display, the .pri
> and the include/source no matter the condition, but they are grey out if
> the include condition is false, so it does scan the .pri no matter what but
> doesn’t really include them to be used only for display!?! So I got all the
> optional part display but not really used. The compile seem to work. This
> leave an horrible UX view for developer to see part that aren’t used but
> source is display and searchable for the project!

Are you talking about qmake or about Qt Creator's .pro file parsing?

Qt Creator evaluates all conditions, including false ones, so it can gather 
all dependencies and all possibilities. For example, if you had:

contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, i18n): \
SOURCES += $$AMOTUS_Qt_PATH/i18n.cpp
else: \
SOURCES += $$AMOTUS_Qt_PATH/no-i18n.cpp

Then Qt Creator should display both files in your file listing. You *want* 
that.

But qmake will follow only one code path when generating your Makefile.

So please be precise: are you talking about Qt Creator or are you talking 
about the actual build?
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QMake contains and include

2020-05-20 Thread Jérôme Godbout
It kinda work, it’s really weird, but all the project get display, the .pri and 
the include/source no matter the condition, but they are grey out if the 
include condition is false, so it does scan the .pri no matter what but doesn’t 
really include them to be used only for display!?! So I got all the optional 
part display but not really used. The compile seem to work. This leave an 
horrible UX view for developer to see part that aren’t used but source is 
display and searchable for the project!

I think I can live with it but this is an horrible UX to display those include 
no matter the condition that include them or not, here what it does (image in 
attachment) with:
if(true) {
include(Amotus_Qt_GUI.pri)
}
if(false){
include(Amotus_Qt_Commands.pri)
}


From: gm...@ratijas.tk 
Sent: May 20, 2020 11:41 AM
To: Jérôme Godbout ; interest@qt-project.org
Subject: Re: [Interest] QMake contains and include

qmake is strange, it implements custom syntax and grammar. Don't search for any 
deep logic there. It will be superseded by CMake soon anyway.

About your issue, I looked it up on DuckDuckGo, and the first result is the 
discussion on StackOverflow which looks like it:
https://stackoverflow.com/questions/46078270/qmake-scope-syntax-with-contains-function

Hope that helps somehow~

20.05.2020, 18:29, "Jérôme Godbout" 
mailto:godbo...@amotus.ca>>:

Sorry for the noise, but I did found a way simpler example to test this:



if(false){

  message(“Pass here”)

  include(“myfile.pri”)

}



myfile.pri is always included no matter what, but the message is not printed! 
this is really counter intuitive. Any way to make a conditional include?!?





From: Interest 
mailto:interest-boun...@qt-project.org>> On 
Behalf Of Jérôme Godbout
Sent: May 20, 2020 11:17 AM
To: interest@qt-project.org<mailto:interest@qt-project.org>
Subject: [Interest] QMake contains and include



Hi,

QMAKE question: anybody manage to use an include inside a contains(){} into 
QMake? the include is processed no matter what!?!

message("list: '$$AMOTUS_SUBREPOS_OPTIONAL_NAMES' ")
contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, i18n){
message("Using i18n...")
HEADERS += $$AMOTUS_Qt_PATH/i18n.h
SOURCES += $$AMOTUS_Qt_PATH/i18n.cpp
include(i18n.pri)
}contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, Amotus_Qt_Network){
message("Using Amotus_Qt_Network...")
include(Amotus_Qt_Network.pri)
}

If I put AMOTUS_SUBREPOS_OPTIONAL_NAMES = i18n
The message print:

Project MESSAGE: list: 'i18n'
Project MESSAGE: Using i18n...

The message is correct. But I get both the i18n.pri and the 
Amotus_Qt_Network.pri include anyway!? if I remove the i18n entry from the 
variable AMOTUS_SUBREPOS_OPTIONAL_NAMES =
I get the following:

Project MESSAGE: list: ''

The include for i18n.pri and Amotus_Qt_Network.pri are still included, but the 
i18n.h and i18n.cpp are grey out which seem to work for HEADERS and SOURCES but 
not include!?! is include special or parsed without any consideration of the 
scope?! I did try to close QtCreator and reopen without luck (using QtCreator 
4.12.0 on Mac OS)


,

___
Interest mailing list
Interest@qt-project.org<mailto:Interest@qt-project.org>
https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QMake contains and include

2020-05-20 Thread gmail
qmake is strange, it implements custom syntax and grammar. Don't search for any deep logic there. It will be superseded by CMake soon anyway. About your issue, I looked it up on DuckDuckGo, and the first result is the discussion on StackOverflow which looks like it:https://stackoverflow.com/questions/46078270/qmake-scope-syntax-with-contains-function Hope that helps somehow~ 20.05.2020, 18:29, "Jérôme Godbout" :Sorry for the noise, but I did found a way simpler example to test this: if(false){  message(“Pass here”)  include(“myfile.pri”)} myfile.pri is always included no matter what, but the message is not printed! this is really counter intuitive. Any way to make a conditional include?!?  From: Interest <interest-boun...@qt-project.org> On Behalf Of Jérôme GodboutSent: May 20, 2020 11:17 AMTo: interest@qt-project.orgSubject: [Interest] QMake contains and include Hi,QMAKE question: anybody manage to use an include inside a contains(){} into QMake? the include is processed no matter what!?!message("list: '$$AMOTUS_SUBREPOS_OPTIONAL_NAMES' ")contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, i18n){    message("Using i18n...")    HEADERS += $$AMOTUS_Qt_PATH/i18n.h    SOURCES += $$AMOTUS_Qt_PATH/i18n.cpp    include(i18n.pri)}contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, Amotus_Qt_Network){    message("Using Amotus_Qt_Network...")    include(Amotus_Qt_Network.pri)}If I put AMOTUS_SUBREPOS_OPTIONAL_NAMES = i18nThe message print:Project MESSAGE: list: 'i18n'Project MESSAGE: Using i18n...The message is correct. But I get both the i18n.pri and the Amotus_Qt_Network.pri include anyway!? if I remove the i18n entry from the variable AMOTUS_SUBREPOS_OPTIONAL_NAMES =I get the following:Project MESSAGE: list: '' The include for i18n.pri and Amotus_Qt_Network.pri are still included, but the i18n.h and i18n.cpp are grey out which seem to work for HEADERS and SOURCES but not include!?! is include special or parsed without any consideration of the scope?! I did try to close QtCreator and reopen without luck (using QtCreator 4.12.0 on Mac OS) ,___Interest mailing listInterest@qt-project.orghttps://lists.qt-project.org/listinfo/interest___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QMake contains and include

2020-05-20 Thread Jérôme Godbout
Sorry for the noise, but I did found a way simpler example to test this:

if(false){
  message("Pass here")
  include("myfile.pri")
}

myfile.pri is always included no matter what, but the message is not printed! 
this is really counter intuitive. Any way to make a conditional include?!?


From: Interest  On Behalf Of Jérôme Godbout
Sent: May 20, 2020 11:17 AM
To: interest@qt-project.org
Subject: [Interest] QMake contains and include

Hi,
QMAKE question: anybody manage to use an include inside a contains(){} into 
QMake? the include is processed no matter what!?!
message("list: '$$AMOTUS_SUBREPOS_OPTIONAL_NAMES' ")
contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, i18n){
message("Using i18n...")
HEADERS += $$AMOTUS_Qt_PATH/i18n.h
SOURCES += $$AMOTUS_Qt_PATH/i18n.cpp
include(i18n.pri)
}contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, Amotus_Qt_Network){
message("Using Amotus_Qt_Network...")
include(Amotus_Qt_Network.pri)
}
If I put AMOTUS_SUBREPOS_OPTIONAL_NAMES = i18n
The message print:
Project MESSAGE: list: 'i18n'
Project MESSAGE: Using i18n...
The message is correct. But I get both the i18n.pri and the 
Amotus_Qt_Network.pri include anyway!? if I remove the i18n entry from the 
variable AMOTUS_SUBREPOS_OPTIONAL_NAMES =
I get the following:
Project MESSAGE: list: ''
The include for i18n.pri and Amotus_Qt_Network.pri are still included, but the 
i18n.h and i18n.cpp are grey out which seem to work for HEADERS and SOURCES but 
not include!?! is include special or parsed without any consideration of the 
scope?! I did try to close QtCreator and reopen without luck (using QtCreator 
4.12.0 on Mac OS)

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] QMake contains and include

2020-05-20 Thread Jérôme Godbout
Hi,
QMAKE question: anybody manage to use an include inside a contains(){} into 
QMake? the include is processed no matter what!?!
message("list: '$$AMOTUS_SUBREPOS_OPTIONAL_NAMES' ")
contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, i18n){
message("Using i18n...")
HEADERS += $$AMOTUS_Qt_PATH/i18n.h
SOURCES += $$AMOTUS_Qt_PATH/i18n.cpp
include(i18n.pri)
}contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, Amotus_Qt_Network){
message("Using Amotus_Qt_Network...")
include(Amotus_Qt_Network.pri)
}
If I put AMOTUS_SUBREPOS_OPTIONAL_NAMES = i18n
The message print:
Project MESSAGE: list: 'i18n'
Project MESSAGE: Using i18n...
The message is correct. But I get both the i18n.pri and the 
Amotus_Qt_Network.pri include anyway!? if I remove the i18n entry from the 
variable AMOTUS_SUBREPOS_OPTIONAL_NAMES =
I get the following:
Project MESSAGE: list: ''
The include for i18n.pri and Amotus_Qt_Network.pri are still included, but the 
i18n.h and i18n.cpp are grey out which seem to work for HEADERS and SOURCES but 
not include!?! is include special or parsed without any consideration of the 
scope?! I did try to close QtCreator and reopen without luck (using QtCreator 
4.12.0 on Mac OS)

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] [qmake] COPIES broken for recent QT?

2019-04-12 Thread Olivier B.
Seems fixed in 
https://code.qt.io/cgit/qt/qtbase.git/commit/mkspecs/features/file_copies.prf?h=dev=7227e54445021b8c2ce4f4ab638cc7d43e32a5a7

I'll take back that modif in my qt installs

Le ven. 12 avr. 2019 à 04:15, Thiago Macieira
 a écrit :
>
> On Thursday, 11 April 2019 06:43:25 PDT Olivier B. wrote:
> > I just noticed that my COPIES fail in Qt 5.11.1+ in visual studio
> > solutions. This seems caused by the change in
> > mkspecs/features/file_copies.prf; to use $(QINSTALL) instead of the
> > previous $$QMAKE_COPY.
> > But unlike in makefiles, QINSTALL is not defined in the visual studio
> > solutions :(
>
> Please report this to https://bugreports.qt.io.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel System Software Products
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] [qmake] COPIES broken for recent QT?

2019-04-11 Thread Olivier B.
I just noticed that my COPIES fail in Qt 5.11.1+ in visual studio
solutions. This seems caused by the change in
mkspecs/features/file_copies.prf; to use $(QINSTALL) instead of the
previous $$QMAKE_COPY.
But unlike in makefiles, QINSTALL is not defined in the visual studio
solutions :(
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qmake with release config is called for debug build

2018-11-12 Thread Olivier B.
You can also use the COPIES qmake variable. It's used in a similar way
as INSTALLS, but instead of being run when you 'make install', it will
be run when you run 'make' of build the generated project in your IDE.
It's usefull when your exe has deps that need to be beside it in the
temp build dir for debugging
Le lun. 12 nov. 2018 à 15:13, Jérôme Godbout  a écrit :
>
> The way you wrote it, it will only copy the file when parsing the .pro/.pri 
> files, you need to make a target and add it to the build sequence.
>
> Here's the doc example:
> mytarget.target = .buildfile
> mytarget.commands = touch $$mytarget.target
> mytarget.depends = mytarget2
>
> mytarget2.commands = @echo Building $$mytarget.target
> QMAKE_EXTRA_TARGETS += mytarget mytarget2
>
> http://doc.qt.io/qt-5/qmake-advanced-usage.html
>
> I still wonder why it's not as simple as the MSBuild target system (I not a 
> lover of MSBuild, but that part was clear and simple) where QMake make it 
> super unfriendly.
>
>
> -Original Message-
> From: Interest  On Behalf 
> Of Alexander Dyagilev
> Sent: November 10, 2018 3:28 AM
> To: interest@qt-project.org
> Subject: [Interest] qmake with release config is called for debug build
>
> Hello,
>
> I'm using the following .pri file:
>
> include(macros.pri)
> win32:CONFIG(release, debug|release) {
>VC_RUNTIME_FOLDER="c:/Program Files (x86)/Microsoft Visual Studio 
> 14.0/VC/redist/x64/Microsoft.VC140.CRT"
>copyFilesToDestdir($$VC_RUNTIME_FOLDER, "msvcp140.dll") }
>
> It's supposed to copy msvcp140.dll to build folder for Release configuration 
> (so it will be included into the installer then).
>
> I do not need this msvcp140.dll to be copied to my Debug folder when I'm 
> working on the project. But it does copy it.
>
> Steps:
> 1) Remove file
> 2) Run qmake on project (active configuration is Debug).
>
> Result: file is copied.
>
> Can anything be done here except the using of QMAKE_POST_LINK here instead? 
> Why is CONFIG(release, debug|release) "not working" here?
>
> Some details below:
>
> copyFilesToDestdir is defined in macros.pri:
>
> defineTest(copyFilesToDestdir) {
>  pathSrc = $$1
>  files = $$2
>  folderDst = $$DESTDIR
>  subfolder = $$3
>  !isEmpty(subfolder) {
>  folderDst=$$folderDst/$$subfolder
>  }
>
>  DEST = $$shell_path($$OUT_PWD/$$folderDst)
>
>  for(filename, files) {
>  FILE = $$shell_path($$pathSrc/$$filename)
>  system($$QMAKE_COPY $$shell_quote($$FILE) $$shell_quote($$DEST))
>  }
> }
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake with release config is called for debug build

2018-11-12 Thread Jérôme Godbout
The way you wrote it, it will only copy the file when parsing the .pro/.pri 
files, you need to make a target and add it to the build sequence.

Here's the doc example:
mytarget.target = .buildfile
mytarget.commands = touch $$mytarget.target
mytarget.depends = mytarget2

mytarget2.commands = @echo Building $$mytarget.target
QMAKE_EXTRA_TARGETS += mytarget mytarget2

http://doc.qt.io/qt-5/qmake-advanced-usage.html

I still wonder why it's not as simple as the MSBuild target system (I not a 
lover of MSBuild, but that part was clear and simple) where QMake make it super 
unfriendly.


-Original Message-
From: Interest  On Behalf 
Of Alexander Dyagilev
Sent: November 10, 2018 3:28 AM
To: interest@qt-project.org
Subject: [Interest] qmake with release config is called for debug build

Hello,

I'm using the following .pri file:

include(macros.pri)
win32:CONFIG(release, debug|release) {
   VC_RUNTIME_FOLDER="c:/Program Files (x86)/Microsoft Visual Studio 
14.0/VC/redist/x64/Microsoft.VC140.CRT"
   copyFilesToDestdir($$VC_RUNTIME_FOLDER, "msvcp140.dll") }

It's supposed to copy msvcp140.dll to build folder for Release configuration 
(so it will be included into the installer then).

I do not need this msvcp140.dll to be copied to my Debug folder when I'm 
working on the project. But it does copy it.

Steps:
1) Remove file
2) Run qmake on project (active configuration is Debug).

Result: file is copied.

Can anything be done here except the using of QMAKE_POST_LINK here instead? Why 
is CONFIG(release, debug|release) "not working" here?

Some details below:

copyFilesToDestdir is defined in macros.pri:

defineTest(copyFilesToDestdir) {
     pathSrc = $$1
     files = $$2
     folderDst = $$DESTDIR
     subfolder = $$3
     !isEmpty(subfolder) {
     folderDst=$$folderDst/$$subfolder
     }

     DEST = $$shell_path($$OUT_PWD/$$folderDst)

     for(filename, files) {
     FILE = $$shell_path($$pathSrc/$$filename)
     system($$QMAKE_COPY $$shell_quote($$FILE) $$shell_quote($$DEST))
     }
}

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qmake with release config is called for debug build

2018-11-10 Thread Alexander Dyagilev

Hello,

I'm using the following .pri file:

include(macros.pri)
win32:CONFIG(release, debug|release) {
  VC_RUNTIME_FOLDER="c:/Program Files (x86)/Microsoft Visual Studio 
14.0/VC/redist/x64/Microsoft.VC140.CRT"

  copyFilesToDestdir($$VC_RUNTIME_FOLDER, "msvcp140.dll")
}

It's supposed to copy msvcp140.dll to build folder for Release 
configuration (so it will be included into the installer then).


I do not need this msvcp140.dll to be copied to my Debug folder when I'm 
working on the project. But it does copy it.


Steps:
1) Remove file
2) Run qmake on project (active configuration is Debug).

Result: file is copied.

Can anything be done here except the using of QMAKE_POST_LINK here 
instead? Why is CONFIG(release, debug|release) "not working" here?


Some details below:

copyFilesToDestdir is defined in macros.pri:

defineTest(copyFilesToDestdir) {
    pathSrc = $$1
    files = $$2
    folderDst = $$DESTDIR
    subfolder = $$3
    !isEmpty(subfolder) {
    folderDst=$$folderDst/$$subfolder
    }

    DEST = $$shell_path($$OUT_PWD/$$folderDst)

    for(filename, files) {
    FILE = $$shell_path($$pathSrc/$$filename)
    system($$QMAKE_COPY $$shell_quote($$FILE) $$shell_quote($$DEST))
    }
}

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qmake, pkg-config and "Requires"

2018-10-22 Thread René Hansen
After upgrading to the latest XCode, I had to recompile some native libs
and ran into an old familiar bug.

Basically it seems qmake doesn't now what to do whenever it runs into a
`Requires` directive in a pkg-config file. Here's for example openssl:

prefix=/usr/local/Cellar/openssl/1.0.2p
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: OpenSSL
Description: Secure Sockets Layer and cryptography libraries and tools
Version: 1.0.2p
Requires: libssl libcrypto

If I don't uncomment the last line, qmake will spit out the following
generic error:

Project ERROR: /usr/local/opt/openssl/lib/pkgconfig/openssl.pc development
package not found

Now, the solution I've resorted to is to just uncomment any "Requires" in
all dependant libraries .pc files, (all the way down), and add each one
manually. Tedious.

Have I missed something in the docs, or is this simply not something qmake
knows how to handle?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qmake PRECOMPILED_HEADER when building for Android

2018-08-05 Thread Alexander Dyagilev

Hello,

This option works fine for Windows and Mac OS X.

But it does not work when building for Android (GCC is used).

Is there a way to enable precompiled headers? The building is too slow 
without it...


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QMake install

2018-04-09 Thread Jérôme Godbout
Hi,

I'm having some trouble to find the proper way to install multiple sources into 
the same directory.

I have a git repos with some java source for Android and some subRepos I want 
to also contribute to java src. I have hard time to figure out how to install 
all of them into the android subfolder:


  *   myMainRepos\
 *   myMain.pro
 *   android\  my android source for this application
*   src\
   *   ...
 *   subrepos\
*   mySubRepos1\
   *   mySubRepos1.pri
   *   android\ generic android code reused
  *   src\
 *   ...


my sub repos is simple .pri that add his own file to the solution sources, 
headers.


I try something like this but end up with full path into my build dir: 
android/Users/MyUser/projects/MyMainRepos/subrepos/mySubRepos1/android/...


myMain.pro

ANDROID_SOURCES.path = android

ANDROID_SOURCES.files = $$files($$PWD/android/*)

INSTALLS += ANDROID_SOURCES


mySubRepos1.pri

SUBREPOS1_ANDROID_SOURCES.path = android

SUBREPOS1_ANDROID_SOURCES.files = $$files($$PWD/subrepos/smySubRepos1/android/*)

INSTALLS += SUBREPOS1_ANDROID_SOURCES


Is there a better way to do this? How can I ditch some of the source path? I 
need all thoses files into mybuilddir/android


I also encounter some problems after ditching the single 
ANDROID_PACKAGE_SOURCE_DIR = android

Seem like the build think it now build a library and look for an application 
(my .pro TEMPLATE = app)

Seek into the build folder

android-MyApp-deployment-settings.json

but only the following file is generated:

android-libMyApp.so-deployment-settings.json


What is needed to tell the .pro I make android app release? Seem like the 
template is not enough and ANDROID_PACKAGE_SOURCE_DIR is doing some extra.


[1515684621069_logo.png]

Jérôme Godbout

2992 chemin Sainte-Foy

Quebec, Canada G1X1P6

tel: +1 (581) 777-0050

email: godbo...@amotus.ca

web: www.amotus-solutions.com
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMake, (static) libraries and LTCG (LTO) on Mac

2017-11-13 Thread Thiago Macieira
On segunda-feira, 13 de novembro de 2017 03:24:46 PST René J. V. Bertin wrote:
> Thiago Macieira wrote:
> > it's a limitation of your environment. Static linking LTCG precompiled
> > code
> > requires a special linker. It's not very well supported everywhere.
> 
> Erm, this is on Mac, and I am using a much more recent linker editor than
> the one from the system. I've been able to build Qt itself with LTCG (I
> rebuilt Qt4 that way only a week or 2 ago) so while you're undoubtedly
> right in general I think this is not at cause here.

Right, it's not very well supported everywhere. Clang + Apple's ld is one of 
those environments where it's not.

I test LTCG frequently, but only with GCC and Linux. I know GCC + Binutils 
(gold and BFD) work properly for static linking, but I'm not sure about Clang 
+ LLVM. Please volunteer to make it work for Clang and macOS. Please see 
mkspecs/features/ltcg.prf.

(because qtbase's build involves creating one static library and using it, you 
don't need a static build to confirm that it works; just force ltcg in qtbase/
src)

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMake, (static) libraries and LTCG (LTO) on Mac

2017-11-13 Thread René J . V . Bertin
Thiago Macieira wrote:


> it's a limitation of your environment. Static linking LTCG precompiled code
> requires a special linker. It's not very well supported everywhere.

Erm, this is on Mac, and I am using a much more recent linker editor than the 
one from the system. I've been able to build Qt itself with LTCG (I rebuilt Qt4 
that way only a week or 2 ago) so while you're undoubtedly right in general I 
think this is not at cause here.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMake, (static) libraries and LTCG (LTO) on Mac

2017-11-11 Thread Thiago Macieira
On sábado, 11 de novembro de 2017 05:01:53 PST René J.V. Bertin wrote:
> Am I doing something wrong or am I simply hitting a limitation?

it's a limitation of your environment. Static linking LTCG precompiled code 
requires a special linker. It's not very well supported everywhere.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMake, (static) libraries and LTCG (LTO) on Mac

2017-11-11 Thread René J . V . Bertin
On Saturday November 11 2017 17:47:14 Konstantin Tokarev wrote:

>Well, LTO and missing symbols go hand in hand, you should be ready to deal 
>with such errors.

That shouldn't be the case IMHO, and most of the time it isn't at least not 
when building Qt.

>What is your reason to use LTO? Can you avoid using it?

In this case it's mostly to obtain the most compact build possible, esp. since 
I'm using a static build of libQtHelp . On Linux the size difference is 
considerable for the assistant executable (a factor 2-3 IIRC). It's not a great 
deal otherwise, just something I like to understand.

R.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMake, (static) libraries and LTCG (LTO) on Mac

2017-11-11 Thread Konstantin Tokarev


> On Saturday November 11 2017 16:12:38 Konstantin Tokarev wrote:
> 
>> Note that you should be able to build whole qttools module against any Qt 
>> install. It should work without any modifications.
> 
> That's what I'd expect but not really what I'm looking for here. I could try 
> it once to see if I get the same LTO-related failures, though.

Well, LTO and missing symbols go hand in hand, you should be ready to deal with 
such errors.

What is your reason to use LTO? Can you avoid using it?

> 
> FWIW, I found that I had to remove the `help` module from the `QT` line in 
> assistant.pro because otherwise the linker would use the installed version 
> (5.8.0 in my case, which evidently lacks some API). That surprised me a bit, 
> I would have expected that qmake knows how to link the library from the same 
> project, given that it's marked as a dependency for the assistant target.
> 
> R.
-- 
Regards,
Konstantin
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMake, (static) libraries and LTCG (LTO) on Mac

2017-11-11 Thread René J . V . Bertin
On Saturday November 11 2017 16:12:38 Konstantin Tokarev wrote:

>Note that you should be able to build whole qttools module against any Qt 
>install. It should work without any modifications.

That's what I'd expect but not really what I'm looking for here. I could try it 
once to see if I get the same LTO-related failures, though.

FWIW, I found that I had to remove the `help` module from the `QT` line in 
assistant.pro because otherwise the linker would use the installed version 
(5.8.0 in my case, which evidently lacks some API). That surprised me a bit, I 
would have expected that qmake knows how to link the library from the same 
project, given that it's marked as a dependency for the assistant target.

R.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMake, (static) libraries and LTCG (LTO) on Mac

2017-11-11 Thread Konstantin Tokarev


> Hi,
> 
> I have made some tweaks to the qttools/src/assistant directories so that I 
> can build the Assistant as a standalone application against any Qt install.

Note that you should be able to build whole qttools module against any Qt 
install. It should work without any modifications.

>To do that, I removed the qtNomakeTools(), load(qt_module) and load(qt_app) 
>statements from the relevant .pro files, set up QtHelp to build as a static 
>library and removed the `help` from `QT` in the Assistant's .pro file, 
>replacing that with `LIB += -L../help -lQHelp`.
> 
> That works, and on Linux I can build the resulting application with LTO by 
> adding `-config ltcg` to the qmake invocation. On Mac however that leads to a 
> whole list of missing symbol errors in the final link step, all from the 
> QtHelp library.
> 
> Am I doing something wrong or am I simply hitting a limitation?
> 
> Thanks,
> René
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
-- 
Regards,
Konstantin
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QMake, (static) libraries and LTCG (LTO) on Mac

2017-11-11 Thread René J . V . Bertin
Hi,

I have made some tweaks to the qttools/src/assistant directories so that I can 
build the Assistant as a standalone application against any Qt install. To do 
that, I removed the qtNomakeTools(), load(qt_module) and load(qt_app) 
statements from the relevant .pro files, set up QtHelp to build as a static 
library and removed the `help` from `QT` in the Assistant's .pro file, 
replacing that with `LIB += -L../help -lQHelp`.

That works, and on Linux I can build the resulting application with LTO by 
adding `-config ltcg` to the qmake invocation. On Mac however that leads to a 
whole list of missing symbol errors in the final link step, all from the QtHelp 
library.

Am I doing something wrong or am I simply hitting a limitation?

Thanks,
René
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QMake: How to add xcconfig file and set for target config

2017-08-30 Thread Patrick Stinson

I am generating an Xcode project from a .pro file and want to set an xcconfig 
file as the build configuration for a particular target in the project. This 
means that I need to edit the .pro file to:

1) add the xcconfig file to the project
2) set the xcconfig in the build settings for the target.

How can I do this with qmake?

Thanks!
-Patrick

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QMake: Way to set capabilities for Xcode project?

2017-08-30 Thread Patrick Stinson
I am dependent on a tool that uses qmake to regenerate an xcodeproject whenever 
I add a source file, and so I always have to find the way to make any changes 
to the Xcode project within the .pro file. I have done well until this point 
with the Info.plist file.

But now I need to be able to enable the iCloud Drive and Push Notifications 
capabilities, which can not be done from the Info.plist. This setting has to 
happen in the Xcode project file itself. How can I set this from the .pro file?

Thanks!

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qmake replaces 'debug'/'release' in DESTDIR

2017-06-21 Thread Benjamin TERRIER
Hi everyone,

I have encountered something unexpected with qmake on Windows.
If DESTDIR contains either "release" or "debug", qmake will replace
it with the one matching the actual build configuration.

For instance if I have: "DESTDIR = foo/release/bar"
and I run: "qmake CONFIG+=debug"
the actual DESTDIR in the generated Makefile will be "foo/debug/bar".

As far as I know it looks like it is caused by:
qtbase/mkspecs/features/exclusive_builds_post.prf

Also it doesn't happen anymore if I do not do and "debug_and_release"
build on Windows
and it never happens on Linux (with or without "debug_and_release").

It looks like a bug to me. Is this behavior expected for some use cases?

Regards

Benjamin Terrier
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qmake and IDEs

2017-05-20 Thread Roland Hughes


On 05/20/2017 01:02 AM, André Pönitz wrote:


I would neither call part of a 'philosophy' around Qt, that'd be
probably something with 'cross platform', 'ease of use'.
It's a philosophy. I have worked with many "cross platform" toolkits 
over my 3+ decades. Up until Qt ZAF was the most successful/complete of 
the toolkits. Successful enough I wrote several books on the package. 
You can find one here 
 
thanks to the world's largest copyright infringer.




Moc is there because it provides functionality that is not easily
available in C++, qmake/.pro is the build system that happens to be used
for Qt itself currently. While moc is kind of mandatory to use for Qt
application development for technical reasons, qmake is not, and it is
completely reasonable for an IDE to support, or even to focus on, other
build systems.

Creating make files for embedded targets which use serial ports and 
other devices "could" be done by hand, but, the documentation one needs 
to sift through identifying which library contains what classes and 
features would be daunting for projects going much beyond "Hello World."


While it is completely within the rights of whatever IDE team to focus 
on whatever language and build environment they wish it is also within 
the rights of those developers working with tools that don't quite 
cleanly fit within said IDEs to declare said IDEs unusable for 
development. My professional view is that if you have to hack a script 
so an IDE can identify/utilize one or more of the required tools it is 
unusable.


I've been at this game a lng time. Started out with BASIC then BASIC 
PLUS on PDP 11/70 running RSTS/E. When moving to BASIC, COBOL and 
FORTRAN on the VAX platform we moved to command line compiled languages. 
Still just a raw text editor on a green screen without any syntax 
highlighting or language sensitive help and no code management systems 
other than being really careful about what directory things got copied 
to and coordinating said copying within teams exceeding 40 developers. 
One thing was common within this universe.  We had an extremely limited 
set of libraries to keep track of. Most of those libraries were things 
we wrote ourselves.


True IDEs became necessary when both compiler developers and third 
parties started providing massive numbers of libraries. In truth the IDE 
movement started with Borland's Turbo Pascal and Turbo C products 
because Borland provided a (for the time) large number of non-standard 
libraries. (We barely had a PASCAL standard and the C standards 
committee had yet to be formed.) This lead to other compiler vendors in 
the PC and mainframe space to develop complete IDEs which did not 
require developers to hack configuration scripts or leave the 
environment. Microsoft finally figured it all out with Programmer's 
Workbench under DOS which they promptly abandoned for their Windows only 
IDE. Watcom created a pretty incredible IDE which run under OS/2, 
Windows and several other platforms. IBM came out with flavors of their 
Visual Age product line which let developers have a full IDE integrated 
to the mainframe so they could test and develop from PC then check-in 
and deploy on mainframe. Their BASIC 
 
product died though.


In order to be called an IDE for whatever language/toolset a developer 
should not have to hack custom scripts to give the tool access. A 
develop needs to be able to perform all forms design, coding, debugging 
and project deployment from within the IDE.


Using that definition QtCreator is truly and IDE for Qt. So are/were 
QDevelop, Monkey Studio and the Eclipse plug-in. KDevelop is just a high 
end editor when it comes to Qt. Perhaps when it comes to all of its 
supported languages. While I did not do an extensive search I did not 
see anything resembling built in support for any kind of forms design, 
just coding, compiling and debugging.


Please allow me to put this in perspective.

I own a multi-machine license for UltraEdit . 
I use it whenever I'm working on a project which does not allow for KDE 
desktop that would give me KATE natively. (Installing KATE on non-KDE 
desktops tends to install a fair chunk of KDE which does not get tested 
in conjunction with other desktops on most distros. One of the few 
reasons I stuck with SuSE so long was the fact they installed ALL 
desktops together so everything was tested together.) UltraEdit can do 
many many things. When you get the full UltraEditStudio it integrates 
debugging via many different debuggers and has this massive UltraCompare 
tool which I never really figured out though I own a license for as 
well. (I've always found Meld simple and robust 

Re: [Interest] QMake

2017-05-09 Thread Till Oliver Knoll


> Am 08.05.2017 um 20:49 schrieb Hamish Moffatt :
> 
>> On 08/05/17 21:38, Till Oliver Knoll wrote:
>> 
>> 
>> Am 08.05.2017 um 04:12 schrieb Hamish Moffatt :
>> 
 On 08/05/17 17:07, Igor Mironchik wrote:
 Hi,
 
 Is it possible to set in qmake project file to put executable right in "." 
 directory and   don't use "debug" and "release" subdirs?
>>> 
>>> Which platform? It does that on linux.
>>> 
>>> Maybe you can use the DESTDIR variable to control where it's output. (I had 
>>> trouble with that on Windows or Mac, I can't remember which.)
>>> 
>>> The inconsistencies between platforms are annoying.
>> 
>> There are no inconsistencies. Qmake puts all command line executables in 
>> ".", unless otherwise specified by DESTDIR, as correctly observed.
> 
> No it doesn't, which is what Igor posted about in the first place. On Windows 
> it puts them in Debug and Release subdirectories.
> 
> André pointed out that the difference is that debug_and_release is on by 
> default on Windows. You can enable it on Mac, which moves where the object 
> files go, but the .app is still written to the main output directory instead. 
> Except if you use "-spec macx-xcode" and build with xcodebuild, then the .app 
> goes into Release/ instead.

Oh, my bad then. Since I /always/ specify DESTDIR myself - with debug and 
release specific paths set by myself - I haven't noticed that behaviour. For 
sure didn't expect it either ;)

Also, I am using the plain vanilla MinGW based binary Qt build, so there it 
might yet again be different: I actually /thought/ the final binary would be 
placed in "." when no DESTDIR was set (and when building "on the console", that 
is not "within Qt Creator".

But again, not sure anymore. My apologies.

Bottom line: always set DESTDIR, debug/release specific, to be in control.

Cheers,
  Oliver___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMake

2017-05-08 Thread Hamish Moffatt

On 08/05/17 21:38, Till Oliver Knoll wrote:



Am 08.05.2017 um 04:12 schrieb Hamish Moffatt 
>:



On 08/05/17 17:07, Igor Mironchik wrote:

Hi,

Is it possible to set in qmake project file to put executable right 
in "." directory and don't use "debug" and "release" subdirs?


Which platform? It does that on linux.

Maybe you can use the DESTDIR variable to control where it's output. 
(I had trouble with that on Windows or Mac, I can't remember which.)


The inconsistencies between platforms are annoying.


There are no inconsistencies. Qmake puts all command line executables 
in ".", unless otherwise specified by DESTDIR, as correctly observed.


No it doesn't, which is what Igor posted about in the first place. On 
Windows it puts them in Debug and Release subdirectories.


André pointed out that the difference is that debug_and_release is on by 
default on Windows. You can enable it on Mac, which moves where the 
object files go, but the .app is still written to the main output 
directory instead. Except if you use "-spec macx-xcode" and build with 
xcodebuild, then the .app goes into Release/ instead.


On Linux, where the output is written to the main directory even with 
debug_and_release. The debug and release binaries overwrite each other.





That's no "inconsistency", but "expected platform-specific behaviour".


Your platform-specific behaviour is my inconsistency :-) It's not 
even consistent between generators/makespecs on the same platform, or 
even between Qt versions in the past.



Hamish
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMake

2017-05-08 Thread Till Oliver Knoll


> Am 08.05.2017 um 04:12 schrieb Hamish Moffatt :
> 
>> On 08/05/17 17:07, Igor Mironchik wrote:
>> Hi,
>> 
>> Is it possible to set in qmake project file to put executable right in "." 
>> directory and don't use "debug" and "release" subdirs?
> 
> Which platform? It does that on linux.
> 
> Maybe you can use the DESTDIR variable to control where it's output. (I had 
> trouble with that on Windows or Mac, I can't remember which.)
> 
> The inconsistencies between platforms are annoying.

There are no inconsistencies. Qmake puts all command line executables in ".", 
unless otherwise specified by DESTDIR, as correctly observed.

When compiling "within Qt Creator" those settings are usually overruled by the 
(local, per user) project settings, which are initialised the first time you 
open (or create) a *.pro project file.

Furthermore, when compiling a "normal" application on macOS the executable is - 
by default - placed in an "app bundle" (which by itself is placed in DESTDIR).

That's no "inconsistency", but "expected platform-specific behaviour".

Refer to

  http://doc.qt.io/qt-5/osx-deployment.html

for more details.

Cheers,
  Oliver___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMake

2017-05-08 Thread André Hartmann

Hi Igor,

the trick is CONFIG-=debug_and_release

BUT BE WARNED: This option is set by default, because on Windows debug 
and release object CANNOT be mixed. If you disable it, your'e on your own.


Please see https://bugreports.qt.io/browse/QTBUG-52347 for more 
information on this.


Best regards,
André

Am 08.05.2017 um 10:01 schrieb Igor Mironchik:



2017-05-08 10:12, Hamish Moffatt пишет:

On 08/05/17 17:07, Igor Mironchik wrote:

Hi,

Is it possible to set in qmake project file to put executable right
in "." directory and don't use "debug" and "release" subdirs?


Which platform? It does that on linux.


I'm on Windows.



Maybe you can use the DESTDIR variable to control where it's output.
(I had trouble with that on Windows or Mac, I can't remember which.)


I use DESTDIR = . But executable places in "debug" or "release" subfolder.



The inconsistencies between platforms are annoying.

Hamish
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest



---
This email has been checked for viruses by AVG.
http://www.avg.com

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMake

2017-05-08 Thread Igor Mironchik



2017-05-08 10:12, Hamish Moffatt пишет:

On 08/05/17 17:07, Igor Mironchik wrote:

Hi,

Is it possible to set in qmake project file to put executable right 
in "." directory and don't use "debug" and "release" subdirs?


Which platform? It does that on linux.


I'm on Windows.



Maybe you can use the DESTDIR variable to control where it's output. 
(I had trouble with that on Windows or Mac, I can't remember which.)


I use DESTDIR = . But executable places in "debug" or "release" subfolder.



The inconsistencies between platforms are annoying.

Hamish
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest



---
This email has been checked for viruses by AVG.
http://www.avg.com

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMake

2017-05-08 Thread Hamish Moffatt

On 08/05/17 17:07, Igor Mironchik wrote:

Hi,

Is it possible to set in qmake project file to put executable right in 
"." directory and don't use "debug" and "release" subdirs?


Which platform? It does that on linux.

Maybe you can use the DESTDIR variable to control where it's output. (I 
had trouble with that on Windows or Mac, I can't remember which.)


The inconsistencies between platforms are annoying.

Hamish
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QMake

2017-05-08 Thread Igor Mironchik

Hi,

Is it possible to set in qmake project file to put executable right in 
"." directory and don't use "debug" and "release" subdirs?


Thank you.


---
This email has been checked for viruses by AVG.
http://www.avg.com

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake one-line Qt version checking?

2017-01-06 Thread André Hartmann

Hi Michael,

Am 06.01.2017 um 13:34 schrieb Michael Sué:

Hi,


#if QT_VERSION < 0x050800
#   error "This program requires Qt 5.8 or higher"
#endif


You can use:
lessThan(QT_VERSION, 5.8.0): message(This program requires Qt 5.8 or higher)


That works indeed - thank you very much!

André


- Michael.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake one-line Qt version checking?

2017-01-06 Thread Michael Sué
Hi,

>#if QT_VERSION < 0x050800
>#  error "This program requires Qt 5.8 or higher"
>#endif

You can use: 
lessThan(QT_VERSION, 5.8.0): message(This program requires Qt 5.8 or higher)

- Michael.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake one-line Qt version checking?

2017-01-05 Thread Rainer Wiesenfarth
Ah, forget about it, read it the wrong way...


-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake one-line Qt version checking?

2017-01-05 Thread Rainer Wiesenfarth
2017-01-05 16:56 GMT+01:00 André Hartmann :

> lessThan(QT_MAJOR_VERSION, 5): message("This program requires Qt 5.8")
> else: lessThan(QT_MINOR_VERSION, 8): message("This program...")
>
> Is there a way to do a comparison here like in C++ in one line?
>

​With C++ >= 11, ...

static_assert(QT_VERSION >= 0x050800, "​This program requires Qt 5.8 or
higher");

​...should work​ (untested).

​Best regards
Rainer​


-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qmake one-line Qt version checking?

2017-01-05 Thread André Hartmann

Hi,

in C++ code I can do a Qt version comparison in one line like this:

#if QT_VERSION < 0x050800
#   error "This program requires Qt 5.8 or higher"
#endif

To do something similar in a .pro file, I have to use a
construct like this:

lessThan(QT_MAJOR_VERSION, 5): message("This program requires Qt 5.8")
else: lessThan(QT_MINOR_VERSION, 8): message("This program...")

Is there a way to do a comparison here like in C++ in one line?

Best regards,
Andre

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qmake path wrong in boot2qt on device

2016-10-14 Thread 心翔
Hi,
I compiled boot2qt with qtbase-tools and also *-dev package, but when run
qmake -query ,the qmake environment variable points to the host, so I can't
use qmake in target.

Does anybody know how fix this problem?

Thanks.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qmake replace functions

2016-06-03 Thread Igor Mironchik

Hi,

with Qt5 I can do like this:

$$shell_path( $$absolute_path( $${OUT_PWD}/../../executable ) )

but in Qt4 there is no shell_path() and absolute_path() functions.

So my question is it possible to do something similar with Qt4?

Thank you.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake: Detecting if QSerialPort is installed

2016-03-10 Thread André Hartmann

Hi Thiago,

This looks like the best solution. I already get a message when load() 
fails*, and I can use it as test expression for conditional compile.


Maybe the wiki https://wiki.qt.io/Qt_Serial_Port
should be updated, as load() seems the best way to do it.

@Kai: QT_CONFIG seems to include everything Qt was build with, but 
QtSerialPort is an "add-on" for Qt 4 that has to be build against the 
installed Qt version.


Best regards,
Andre

* I don't fully memorize the message because I tested it on an other 
computer.


Am 10.03.2016 um 14:48 schrieb Thiago Macieira:

On quinta-feira, 10 de março de 2016 09:10:49 PST André Hartmann wrote:

Hi all,

I'm working on a library that (optionally) depends on QSerialPort.

This library should also compile on Qt 4, so I did the following in the
project file:

greaterThan(QT_MAJOR_VERSION, 4) {
  QT += serialport
} else {
  CONFIG += serialport
}

Thats fine so far, but if QSerialPort is not installed for the
corresponding Qt4 version, I'd like to get a message during the qmake run.


What happens if, instead of that CONFIG += serialport, you write:

load(serialport)

?



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake: Detecting if QSerialPort is installed

2016-03-10 Thread Thiago Macieira
On quinta-feira, 10 de março de 2016 09:10:49 PST André Hartmann wrote:
> Hi all,
> 
> I'm working on a library that (optionally) depends on QSerialPort.
> 
> This library should also compile on Qt 4, so I did the following in the
> project file:
> 
> greaterThan(QT_MAJOR_VERSION, 4) {
>  QT += serialport
> } else {
>  CONFIG += serialport
> }
> 
> Thats fine so far, but if QSerialPort is not installed for the
> corresponding Qt4 version, I'd like to get a message during the qmake run.

What happens if, instead of that CONFIG += serialport, you write:

load(serialport)

?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake: Detecting if QSerialPort is installed

2016-03-10 Thread Koehne Kai


> -Original Message-
> From: Interest [mailto:interest-
> bounces+kai.koehne=theqtcompany@qt-project.org] On Behalf Of
> Koehne Kai
> Sent: Thursday, March 10, 2016 1:57 PM
> To: André Hartmann <andre.hartm...@iseg-hv.de>; Interest@qt-
> project.org
> Subject: Re: [Interest] Qmake: Detecting if QSerialPort is installed
> 
> 
> 
> > -Original Message-
> > From: Interest [mailto:interest-
> > bounces+kai.koehne=theqtcompany@qt-project.org] On Behalf Of
> > Andre Hartmann
> > Sent: Thursday, March 10, 2016 9:11 AM
> > To: Interest@qt-project.org
> > Subject: [Interest] Qmake: Detecting if QSerialPort is installed
> >
> > Hi all,
> >
> > I'm working on a library that (optionally) depends on QSerialPort.
> >
> > This library should also compile on Qt 4, so I did the following in the
> project
> > file:
> >
> > greaterThan(QT_MAJOR_VERSION, 4) {
> >  QT += serialport
> > } else {
> >  CONFIG += serialport
> > }
> >
> > Thats fine so far, but if QSerialPort is not installed for the corresponding
> > Qt4 version, I'd like to get a message during the qmake run.
> >
> > What's the easiest way to do this with qmake?
> 
> You can use qtHaveModule() to check for a Qt module, and message(),
> error(), warning() ... to print stuff.
> 
>   !qtHaveModule(serialport): error(Qt SerialPort module not found)

... which will work for Qt 5. I missed that you asked about Qt 4, sorry about 
that.

Does QT_CONFIG contain "serialport" in Qt 4?

Regards

Kai 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake: Detecting if QSerialPort is installed

2016-03-10 Thread Koehne Kai


> -Original Message-
> From: Interest [mailto:interest-
> bounces+kai.koehne=theqtcompany@qt-project.org] On Behalf Of
> Andre Hartmann
> Sent: Thursday, March 10, 2016 9:11 AM
> To: Interest@qt-project.org
> Subject: [Interest] Qmake: Detecting if QSerialPort is installed
> 
> Hi all,
> 
> I'm working on a library that (optionally) depends on QSerialPort.
> 
> This library should also compile on Qt 4, so I did the following in the 
> project
> file:
> 
> greaterThan(QT_MAJOR_VERSION, 4) {
>  QT += serialport
> } else {
>  CONFIG += serialport
> }
> 
> Thats fine so far, but if QSerialPort is not installed for the corresponding
> Qt4 version, I'd like to get a message during the qmake run.
> 
> What's the easiest way to do this with qmake?

You can use qtHaveModule() to check for a Qt module, and message(), error(), 
warning() ... to print stuff.

!qtHaveModule(serialport): error(Qt SerialPort module not found)

Regards

Kai 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qmake: Detecting if QSerialPort is installed

2016-03-10 Thread André Hartmann

Hi all,

I'm working on a library that (optionally) depends on QSerialPort.

This library should also compile on Qt 4, so I did the following in the 
project file:


greaterThan(QT_MAJOR_VERSION, 4) {
QT += serialport
} else {
CONFIG += serialport
}

Thats fine so far, but if QSerialPort is not installed for the 
corresponding Qt4 version, I'd like to get a message during the qmake run.


What's the easiest way to do this with qmake?

Best regards,
Andre
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake "requires" function

2016-02-22 Thread Carel Combrink
Thiago,

> MY_ENV_VAR_TEST=$$(MY_ENV_VAR)
> > isEmpty(MY_ENV_VAR_TEST) {
> > error("The env var MY_ENV_VAR must be set when enabling this
> library")
> > }
> >
> > *PS: Is there a better way to check if an environmental variable is set
> > using qmake that is cross platform for Linux, Windows and Mac? *
>
> The above should work. If you were having problems, say what they were.


Thanks, no issue so far, just wanted to find out if there was another way.

requires() with a false predicate does not interrupt execution. It creates a
> Makefile that doesn't do anything.
>
> error() interrupts execution.
>

It makes sense, just not what I expected initially.

Thank you for the valued input.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake "requires" function

2016-02-22 Thread Thiago Macieira
On terça-feira, 23 de fevereiro de 2016 07:51:13 PST Carel Combrink wrote:
> I had the following code in my pro file:
> 
> requires(true)
> requires(false)
> 
> To force it to fail, to test the requires() function.

As I said, the requires(false) predicate does work: it produces a Makefile that 
prints a warning and does nothing else. As documented, like you pasted.

> So the issue that I have:
> Before starting to test the requires() function I had the following in my
> code to test for the env var:
> MY_ENV_VAR_TEST=$$(MY_ENV_VAR)
> isEmpty(MY_ENV_VAR_TEST) {
> error("The env var MY_ENV_VAR must be set when enabling this library")
> }
> 
> *PS: Is there a better way to check if an environmental variable is set
> using qmake that is cross platform for Linux, Windows and Mac? *

The above should work. If you were having problems, say what they were.

> Even with the forced fail (as above) qmake was interrupted with the error
> above. I was hoping/expecting that it would break out at the
> forced requires(false) before interrupting the whole qmake process due to
> the error message.

requires() with a false predicate does not interrupt execution. It creates a 
Makefile that doesn't do anything.

error() interrupts execution.

> So what is failing:
> in my pro file:
> 
> requires(false)
> 
> error("Should not get here")

Wrong expectation. It will get here.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake "requires" function

2016-02-22 Thread Carel Combrink
Morning Thiago,


> Please give a concrete usecase.
>
I have developed a framework that contains a set of libraries using subdirs
template.

One library needs specific tools to be installed before it can be built. My
initial implementation was to pass a argument to qmake to enable this
library if you have the correct tools installed into the correct locations.
This was working but looking through the qmake docs I came across the
"requires" test. So I started playing with the idea to check for an
environmental variable and if set, enable the specific library. That is
when I started getting stuck.


> > requires(true)
> >
> > requires(false)
>
> In your .pro file.
>
> Please also explain what you mean by "a positive result".


I had the following code in my pro file:

requires(true)
requires(false)

To force it to fail, to test the requires() function.

So the issue that I have:
Before starting to test the requires() function I had the following in my
code to test for the env var:
MY_ENV_VAR_TEST=$$(MY_ENV_VAR)
isEmpty(MY_ENV_VAR_TEST) {
error("The env var MY_ENV_VAR must be set when enabling this library")
}

*PS: Is there a better way to check if an environmental variable is set
using qmake that is cross platform for Linux, Windows and Mac? *

Even with the forced fail (as above) qmake was interrupted with the error
above. I was hoping/expecting that it would break out at the
forced requires(false) before interrupting the whole qmake process due to
the error message.


> I've just tested a
> .pro file containing "requires(false)" and it produced a Makefile that just
> does:
>
> @echo "Some of the required modules (false) are not available."
> @echo "Skipped."
>

If I remove the error("...") as mentioned above, I get the same behaviour
that you get.

So what is failing:
in my pro file:


requires(false)

error("Should not get here")


My conclusion: It does seem like qmake will evaluate the whole pro file
even past the "requires(false)" and fail completely on error messages.

For now I removed the error message and it seems like it behaves as
expected.

Regards,
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake "requires" function

2016-02-22 Thread Thiago Macieira
On segunda-feira, 22 de fevereiro de 2016 12:44:30 PST Carel Combrink wrote:
> I have tested with the following but cant seem to get a positive result:

Please give a concrete usecase. Obviously you don't have both

> requires(true)
> 
> requires(false)

In your .pro file.

Please also explain what you mean by "a positive result". I've just tested a 
.pro file containing "requires(false)" and it produced a Makefile that just 
does:

@echo "Some of the required modules (false) are not available."
@echo "Skipped."

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qmake "requires" function

2016-02-22 Thread Carel Combrink
Hi All,

What is the syntax for using the qmake "requires" function?

The documentation

states the following:
*Evaluates condition. If the condition is false, qmake skips this project
(and its SUBDIRS) when building.*

I want to use it to check if an environmental variable is set or not, if
possible. But I can not figure out how the command is used (even for a
basic test).

I have tested with the following but cant seem to get a positive result:

requires(true)

requires(false)

TEST_1=

requires(isEmpty(TEST_1))

requires(!isEmpty(TEST_1))

TEST_2="Test"

requires(isEmpty(TEST_2))

requires(!isEmpty(TEST_2))


requires(linux-g++)

requires(win32)


Any help will be appreciated, first of all of how the command should look
and secondly information or assistance to check if an environmental
variable is set for usage in the "requires" function.

Regards,
Carel
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake: execute two different link steps?

2015-12-04 Thread André Hartmann

Wow. With full example :)

Thanks a lot Elvis, this works indeed fine.

I've also added the following common lines to myProg-sources.pri:

QT += core network
QT -= gui

CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

List of sources goes here...

The both .pro files now simply contain the TARGET and the link lines,
which is very nice.

Thanks again and best regards,
André


Am 04.12.2015 um 13:28 schrieb Elvis Stansvik:

2015-12-04 7:12 GMT+01:00 André Hartmann :

Hi Elvis and Konstantin,

thanks for your suggestions.

I think I will take the SUBDIRS way.


If you want to avoid having to repeat the SOURCES, you can always have
a myProg-sources.pri that both your myProg.pro and myProg-test
includes.

Attaching an example with four subdirs (myProg, myProg-test, libXXX
and libXXXtest) of how you could set it up.

Good luck,
Elvis



Best regards,
André


Am 03.12.2015 um 13:04 schrieb Elvis Stansvik:


2015-12-03 13:02 GMT+01:00 Konstantin Tokarev :




03.12.2015, 15:00, "Elvis Stansvik" :


Hi André,

2015-12-03 10:51 GMT+01:00 André Hartmann :


   Hello,

   I have a Qmake based project that is developed in Qt Creator
(currently
   compiled with Linux/gcc and Windows/MinGW).

   Depending on a configuration variable the PRO file my program links
to one
   of two librarys:

   TARGET = myProg

   CONFIG += TESTLIB

   CONFIG(TESTLIB): LIBS += libXXXtest
   else: LIBS += libXXX

   For now, I have to change the config variable each time.

   Is there an easy way to have a second target that is automatically
linked to
   the correct version? The object files are all the same,
   just the link step needs to be executed again. After that, I'd like
have two
   executeables, e.g.:

   myProg-test -> linked to libXXXtest
   myProg -> linked to libXXX

   Is this possible?



I think with QMake this is not possible without converting your
project to a subdirs project (TEMPLATE = subdirs), with separate
sub-directories for the executables you wish to build (TEMPLATE =
app). Or switch to QBS or CMake.

Happy to be proven wrong though :)



You can create custom target and do one of link steps manually



Ah yes, that is of course a possibility.

Elvis



--
Regards,
Konstantin


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest







--
Best regards / Mit freundlichen Grüßen
André Hartmann, Dipl.-Ing. (FH)
Software Project Manager

iseg Spezialelektronik GmbH |  phone: ++49 (0)351 26996-43
Bautzner Landstr. 23|  fax:   ++49 (0)351 26996-21
D-01454 Radeberg / Rossendorf   |  web:   www.iseg-hv.com

Geschäftsführer / Managing director: Dr. F. Gleisberg, Dr. J. Pöthig
Amtsgericht / Lower district court: Dresden HRB 16250
Ust.-Id.-Nr. / VAT-ID: DE812508942

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder
diese E-Mail irrtümlich erhalten haben, informieren Sie bitte
sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser
Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this e-mail
in error) please notify the sender immediately and delete this e-mail.
Any unauthorized copying, disclosure or distribution of the material
in this e-mail is strictly forbidden.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake: execute two different link steps?

2015-12-03 Thread André Hartmann

Hi Elvis and Konstantin,

thanks for your suggestions.

I think I will take the SUBDIRS way.

Best regards,
André

Am 03.12.2015 um 13:04 schrieb Elvis Stansvik:

2015-12-03 13:02 GMT+01:00 Konstantin Tokarev :



03.12.2015, 15:00, "Elvis Stansvik" :

Hi André,

2015-12-03 10:51 GMT+01:00 André Hartmann :

  Hello,

  I have a Qmake based project that is developed in Qt Creator (currently
  compiled with Linux/gcc and Windows/MinGW).

  Depending on a configuration variable the PRO file my program links to one
  of two librarys:

  TARGET = myProg

  CONFIG += TESTLIB

  CONFIG(TESTLIB): LIBS += libXXXtest
  else: LIBS += libXXX

  For now, I have to change the config variable each time.

  Is there an easy way to have a second target that is automatically linked to
  the correct version? The object files are all the same,
  just the link step needs to be executed again. After that, I'd like have two
  executeables, e.g.:

  myProg-test -> linked to libXXXtest
  myProg -> linked to libXXX

  Is this possible?


I think with QMake this is not possible without converting your
project to a subdirs project (TEMPLATE = subdirs), with separate
sub-directories for the executables you wish to build (TEMPLATE =
app). Or switch to QBS or CMake.

Happy to be proven wrong though :)


You can create custom target and do one of link steps manually


Ah yes, that is of course a possibility.

Elvis



--
Regards,
Konstantin

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake: execute two different link steps?

2015-12-03 Thread Elvis Stansvik
Hi André,

2015-12-03 10:51 GMT+01:00 André Hartmann :
> Hello,
>
> I have a Qmake based project that is developed in Qt Creator (currently
> compiled with Linux/gcc and Windows/MinGW).
>
> Depending on a configuration variable the PRO file my program links to one
> of two librarys:
>
> TARGET = myProg
>
> CONFIG += TESTLIB
>
> CONFIG(TESTLIB): LIBS += libXXXtest
> else: LIBS += libXXX
>
> For now, I have to change the config variable each time.
>
> Is there an easy way to have a second target that is automatically linked to
> the correct version? The object files are all the same,
> just the link step needs to be executed again. After that, I'd like have two
> executeables, e.g.:
>
> myProg-test -> linked to libXXXtest
> myProg  -> linked to libXXX
>
> Is this possible?

I think with QMake this is not possible without converting your
project to a subdirs project (TEMPLATE = subdirs), with separate
sub-directories for the executables you wish to build (TEMPLATE =
app). Or switch to QBS or CMake.

Happy to be proven wrong though :)

Cheers,
Elvis

>
> Best regards,
> André
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake: execute two different link steps?

2015-12-03 Thread Elvis Stansvik
2015-12-03 13:02 GMT+01:00 Konstantin Tokarev :
>
>
> 03.12.2015, 15:00, "Elvis Stansvik" :
>> Hi André,
>>
>> 2015-12-03 10:51 GMT+01:00 André Hartmann :
>>>  Hello,
>>>
>>>  I have a Qmake based project that is developed in Qt Creator (currently
>>>  compiled with Linux/gcc and Windows/MinGW).
>>>
>>>  Depending on a configuration variable the PRO file my program links to one
>>>  of two librarys:
>>>
>>>  TARGET = myProg
>>>
>>>  CONFIG += TESTLIB
>>>
>>>  CONFIG(TESTLIB): LIBS += libXXXtest
>>>  else: LIBS += libXXX
>>>
>>>  For now, I have to change the config variable each time.
>>>
>>>  Is there an easy way to have a second target that is automatically linked 
>>> to
>>>  the correct version? The object files are all the same,
>>>  just the link step needs to be executed again. After that, I'd like have 
>>> two
>>>  executeables, e.g.:
>>>
>>>  myProg-test -> linked to libXXXtest
>>>  myProg -> linked to libXXX
>>>
>>>  Is this possible?
>>
>> I think with QMake this is not possible without converting your
>> project to a subdirs project (TEMPLATE = subdirs), with separate
>> sub-directories for the executables you wish to build (TEMPLATE =
>> app). Or switch to QBS or CMake.
>>
>> Happy to be proven wrong though :)
>
> You can create custom target and do one of link steps manually

Ah yes, that is of course a possibility.

Elvis

>
> --
> Regards,
> Konstantin
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qmake: execute two different link steps?

2015-12-03 Thread André Hartmann

Hello,

I have a Qmake based project that is developed in Qt Creator (currently 
compiled with Linux/gcc and Windows/MinGW).


Depending on a configuration variable the PRO file my program links to 
one of two librarys:


TARGET = myProg

CONFIG += TESTLIB

CONFIG(TESTLIB): LIBS += libXXXtest
else: LIBS += libXXX

For now, I have to change the config variable each time.

Is there an easy way to have a second target that is automatically 
linked to the correct version? The object files are all the same,
just the link step needs to be executed again. After that, I'd like have 
two executeables, e.g.:


myProg-test -> linked to libXXXtest
myProg  -> linked to libXXX

Is this possible?

Best regards,
André
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qmake findmocs randomly skips header files (about 1 in 1000 times)

2015-10-13 Thread Pieter-Jan Busschaert
Hello,


We have a software project which consists of roughly 50 QT components, each
with their own .pro file. On our continuous build server we run qmake on
all of them after every commit. About 1 in 20 builds we have a random
linking error due to not finding the metaobject related code for some
(everytime different) class. Rerunning the build without changing anything
fixes it. I traced this problem a bit and found these things:

=> The bad .vcxproj file is missing the necessary pre-build steps for
generating the MOC objects for a random class. The .pro file clearly lists
the header file, the header file does have the Q_OBJECT macro and the class
does subclass QObject as first superclass.

=> I captured level-2 debug info from all qmake executions and found the
"findMocs" step just randomly skips a file, while it is listed correctly in
the HEADERS variable under "Dumping all variables".


Good example output of qmake -d -d:
...
DEBUG 2: findMocs: fileA.h
DEBUG 2: Mocgen: fileA.h:29 Found MOC symbol Q_OBJECT
DEBUG 2: findMocs: fileB.h
DEBUG 2: Mocgen: fileB.h:36 Found MOC symbol Q_OBJECT
DEBUG 2: findMocs: fileC.h
DEBUG 2: Mocgen: fileC.h:27 Found MOC symbol Q_OBJECT
...
DEBUG 1: HEADERS === fileA.h :: fileB.h :: fileC.h
...

Bad example output of qmake -d -d (without any changes to the relevant
files):
...
DEBUG 2: findMocs: fileA.h
DEBUG 2: Mocgen: fileA.h:29 Found MOC symbol Q_OBJECT
DEBUG 2: findMocs: fileC.h
DEBUG 2: Mocgen: fileC.h:27 Found MOC symbol Q_OBJECT
...
DEBUG 1: HEADERS === fileA.h :: fileB.h :: fileC.h
...


So, this is about 1 in 1000 (= 50 .pro files * 20 builds) qmake invocations
where a random file is skipped.
Any idea why this might happen or how I could investigate further what the
rootcause might be?

Googling doesn't turn up anything usefull, only advice to people who forget
to rerun qmake after making a change that requires it. In our case this
irrelevant, because we rerun qmake every single time.

For completeness, we are using QT 4.8.6, which has qmake version 2.01a



Kind regards,

Pieter-Jan Busschaert
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake/ make check

2015-08-26 Thread Gregory Redder
Thiago,

Thanks for the help. tracked it to what seems to be an issue with our test
code.


On Wed, Aug 26, 2015 at 11:22 AM, Thiago Macieira thiago.macie...@intel.com
 wrote:

 On Wednesday 26 August 2015 10:35:44 Gregory Redder wrote:
  Hello all,
 
  I'm setting up a CI build script for my qt project and I'm running into
  issues.
 
  qmake $project -r -spec linux-g++ CONFIG+=debug CONFIG+=declarative_debug
  CONFIG+=qml_debug CONFIG+=testcase
 
  running make and make install. everything is fine but when I run make
 check
  it attempts to run an executable from each sub-library and fails. How do
 I
  stop it from looking for the executables that are never created, while
  still checking the testcase?

 remove the CONFIG+=testcase part.

 Leave that only in your testcases. The make check target is a default
 target
 already in all projects.

 --
 Thiago Macieira - thiago.macieira (AT) intel.com
   Software Architect - Intel Open Source Technology Center

 ___
 Interest mailing list
 Interest@qt-project.org
 http://lists.qt-project.org/mailman/listinfo/interest




-- 
Greg Redder
Rochester Institute of Technology
Computer Engineering Technology `17
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qmake/ make check

2015-08-26 Thread Gregory Redder
Hello all,

I'm setting up a CI build script for my qt project and I'm running into
issues.

qmake $project -r -spec linux-g++ CONFIG+=debug CONFIG+=declarative_debug
CONFIG+=qml_debug CONFIG+=testcase

running make and make install. everything is fine but when I run make check
it attempts to run an executable from each sub-library and fails. How do I
stop it from looking for the executables that are never created, while
still checking the testcase?

Thank you
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake/ make check

2015-08-26 Thread Thiago Macieira
On Wednesday 26 August 2015 10:35:44 Gregory Redder wrote:
 Hello all,
 
 I'm setting up a CI build script for my qt project and I'm running into
 issues.
 
 qmake $project -r -spec linux-g++ CONFIG+=debug CONFIG+=declarative_debug
 CONFIG+=qml_debug CONFIG+=testcase
 
 running make and make install. everything is fine but when I run make check
 it attempts to run an executable from each sub-library and fails. How do I
 stop it from looking for the executables that are never created, while
 still checking the testcase?

remove the CONFIG+=testcase part.

Leave that only in your testcases. The make check target is a default target 
already in all projects.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake Library VERSION issues on Windows

2015-07-30 Thread Thiago Macieira
On Thursday 30 July 2015 07:58:15 Carel Combrink wrote:
 How does the Linux side know which version to link to, I am assuming this
 is then a feature of gcc/make and not qmake?

No, it's really qmake. It creates symlinks.

When you pass -lXXX, the linker searches for libXXX.so and then libXXX.a. 
qmake creates a symlink from libXXX.so to the actual file.

 I can't see that my dependent lib knows the version of the base lib because
 the VERSION variable is set in the PRO file, but my dependent lib links
 against the PRI file that does not contain this information. It is then
 probably because I normally build them together?
 If it is not qmake related then I understand if you do not have more
 information on this.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake Library VERSION issues on Windows

2015-07-29 Thread Carel Combrink
Any help?

I forgot to mention my environment:
Windows 7 x64
Qt 5.4.2
mingw 4.9.1 32bit

Regards,
Carel

On Tue, Jul 28, 2015 at 2:26 PM, Carel Combrink carel.combr...@gmail.com
wrote:

 Hi,

 I have developed a few libraries in Linux and everything is working
 correctly.
 The libraries set the VERSION variable in the project file and some
 depend on others.

 I am now trying to test the code on Windows but have issues due to the
 versioning of the libraries. I get linker errors for libraries that depend
 on another.

 The first library creates: MyLibd0.dll and MyLibd0.a
 The depending library fails with the following error: ld.exe cannot find
 -lMyLibd
 I have checked that my -L path is correct and points to the directory that
 contains MyLibd0.dll

 PS: The same issue was discussed on QtCentre here
 http://www.qtcentre.org/threads/19266-qmake-and-library-version-handling 
 (2009)
 but no solution was given. In this discussion it is mentioned that it
 should 'just work' on Windows as well as Linux but no final solution is
 given.

 On Linux I can see, using ldd, that the libraries link to the correct
 versions as specified in the VERSION variable.

 Is there something that I am missing?

 Any help will be appreciated.

 Regards,
 Carel

 ---
 Check out my SpellChecker Plugin for Qt Creator on github @
 https://github.com/CJCombrink/SpellChecker-Plugin




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake Library VERSION issues on Windows

2015-07-29 Thread Thiago Macieira
On Tuesday 28 July 2015 14:26:12 Carel Combrink wrote:
 Is there something that I am missing?

You're not missing anything. What you see is what you get.

On Windows, you need to specify the exact name of the library. So either don't 
put the version number there or do specify it in the LIBS variable.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake Library VERSION issues on Windows

2015-07-29 Thread Carel Combrink
Thanks Thiago,

I was afraid of that.
For now I have the following in my project file:

win32:unset(VERSION)

Just out of curiosity:
How does the Linux side know which version to link to, I am assuming this
is then a feature of gcc/make and not qmake?
I can't see that my dependent lib knows the version of the base lib because
the VERSION variable is set in the PRO file, but my dependent lib links
against the PRI file that does not contain this information. It is then
probably because I normally build them together?
If it is not qmake related then I understand if you do not have more
information on this.

Regards,


On Thu, Jul 30, 2015 at 7:40 AM, Thiago Macieira thiago.macie...@intel.com
wrote:

 On Tuesday 28 July 2015 14:26:12 Carel Combrink wrote:
  Is there something that I am missing?

 You're not missing anything. What you see is what you get.

 On Windows, you need to specify the exact name of the library. So either
 don't
 put the version number there or do specify it in the LIBS variable.

 --
 Thiago Macieira - thiago.macieira (AT) intel.com
   Software Architect - Intel Open Source Technology Center

 ___
 Interest mailing list
 Interest@qt-project.org
 http://lists.qt-project.org/mailman/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qmake Library VERSION issues on Windows

2015-07-28 Thread Carel Combrink
Hi,

I have developed a few libraries in Linux and everything is working
correctly.
The libraries set the VERSION variable in the project file and some depend
on others.

I am now trying to test the code on Windows but have issues due to the
versioning of the libraries. I get linker errors for libraries that depend
on another.

The first library creates: MyLibd0.dll and MyLibd0.a
The depending library fails with the following error: ld.exe cannot find
-lMyLibd
I have checked that my -L path is correct and points to the directory that
contains MyLibd0.dll

PS: The same issue was discussed on QtCentre here
http://www.qtcentre.org/threads/19266-qmake-and-library-version-handling
(2009)
but no solution was given. In this discussion it is mentioned that it
should 'just work' on Windows as well as Linux but no final solution is
given.

On Linux I can see, using ldd, that the libraries link to the correct
versions as specified in the VERSION variable.

Is there something that I am missing?

Any help will be appreciated.

Regards,
Carel

---
Check out my SpellChecker Plugin for Qt Creator on github @
https://github.com/CJCombrink/SpellChecker-Plugin
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake, executable static libs...

2015-06-18 Thread Thiago Macieira
On Thursday 18 June 2015 09:24:38 Igor Mironchik wrote:
 Hi guys,
 
 I'm porting Qt 5 application to Linux and ran into a problem of linking.
 
 This application depends on two external static libs (let's say libs A
 and B). But this libs is in the tree of the project.
 
 And this project depends on two yet internal static libs (let's say libs
 C and D). Libs C and D depends on libs A and B.
 
 All static libs creates successfully.
 
 But executable can't link. I have added all 4 static libs ( A,B,C,D ) to
 the project of executable ( link rules, pretarget deps...)
 
 And ld says when linking executable that in static lib C there are
 undefined references to functions and methods from static lib A.
 
 What should I do in .pro files to solve this problem.

You need to list the libraries in the right order. The order of static 
libraries is relevant, unlike for dynamic libraries.

You must first list the library that requires a symbol, then the library that 
provides the symbol, so that the undefined reference can be resolved.

Or the other way around...
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake, executable static libs...

2015-06-18 Thread Igor Mironchik
Hi.

On 18.06.2015 09:48, Thiago Macieira wrote:
 On Thursday 18 June 2015 09:24:38 Igor Mironchik wrote:
 Hi guys,

 I'm porting Qt 5 application to Linux and ran into a problem of linking.

 This application depends on two external static libs (let's say libs A
 and B). But this libs is in the tree of the project.

 And this project depends on two yet internal static libs (let's say libs
 C and D). Libs C and D depends on libs A and B.

 All static libs creates successfully.

 But executable can't link. I have added all 4 static libs ( A,B,C,D ) to
 the project of executable ( link rules, pretarget deps...)

 And ld says when linking executable that in static lib C there are
 undefined references to functions and methods from static lib A.

 What should I do in .pro files to solve this problem.
 You need to list the libraries in the right order. The order of static
 libraries is relevant, unlike for dynamic libraries.

 You must first list the library that requires a symbol, then the library that
 provides the symbol, so that the undefined reference can be resolved.

 Or the other way around...

Didn't know about it... Thank you, reorder of libraries helped.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qmake, executable static libs...

2015-06-18 Thread Igor Mironchik
Hi guys,

I'm porting Qt 5 application to Linux and ran into a problem of linking.

This application depends on two external static libs (let's say libs A 
and B). But this libs is in the tree of the project.

And this project depends on two yet internal static libs (let's say libs 
C and D). Libs C and D depends on libs A and B.

All static libs creates successfully.

But executable can't link. I have added all 4 static libs ( A,B,C,D ) to 
the project of executable ( link rules, pretarget deps...)

And ld says when linking executable that in static lib C there are 
undefined references to functions and methods from static lib A.

What should I do in .pro files to solve this problem.

P.S. On windows with MSVC linking is successful.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qmake: Test if environment variable is set.

2015-05-27 Thread Carel Combrink
Hi,

How do one test if an environmental variable is set from qmake?

I have searched a lot but can't get the code working. People and
documentation point to isEmpty() but that does not achieve the correct
result, see below:

My Code in my pro file:

isEmpty(TEST_1) {

message(Test 1: Empty ($$TEST_1))

} else {

message(Test 1: Not empty ($$TEST_1))

}

TEST_2=1

isEmpty(TEST_2) {

message(Test 2: Empty ($$TEST_2))

} else {

message(Test 2: Not empty ($$TEST_2))

}

TEST_3=$(FOO)

isEmpty(TEST_3) {

message(Test 3: Empty ($$TEST_3))

} else {

message(Test 3: Not empty ($$TEST_3))

}


TEST_4=$(PATH)

isEmpty(TEST_4) {

message(Test 4: Empty ($$TEST_4))

} else {

message(Test 4: Not empty ($$TEST_4))

}

TEST_5=

isEmpty(TEST_5) {

message(Test 5: Empty ($$TEST_5))

} else {

message(Test 5: Not empty ($$TEST_5))

}


And the output is:

Project MESSAGE: Test 1: Empty ()

Project MESSAGE: Test 2: Not empty (1)

Project MESSAGE: Test 3: Not empty ()

Project MESSAGE: Test 4: Not empty (/my/actual/path/)

Project MESSAGE: Test 5: Empty ()

So from this one can see that Test 3 does not give the required result.


Am I doing something wrong?

Is this intended behaviour?

How can I proceed to get the correct result?


Qt: 5.3.2

OS: Ubuntu 14.04 x64


Regards,
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake: Test if environment variable is set.

2015-05-27 Thread Michael Sué
Hi,

I would use TEST_3=$$(FOO) instead of TEST_3=$(FOO)

- Michael.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake: Test if environment variable is set.

2015-05-27 Thread Thiago Macieira
On Wednesday 27 May 2015 09:03:24 Carel Combrink wrote:
 Am I doing something wrong?

Yes, you're expecting qmake to observe environment variables. It does not. 
Make honours and processes them, but that's run after qmake has finished 
running and has written the Makefile. Two separate and independent steps.

 Is this intended behaviour?

Yes.

 How can I proceed to get the correct result?

You cannot with qmake. You need to either make the variable a pure qmake one 
by passing it on the qmake command-line instead of the environment, or you 
skip doing the qmake checks and rely on Make rules only.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake: Test if environment variable is set.

2015-05-27 Thread Thiago Macieira
On Wednesday 27 May 2015 00:10:19 Thiago Macieira wrote:
 On Wednesday 27 May 2015 09:03:24 Carel Combrink wrote:
  Am I doing something wrong?
 
 Yes, you're expecting qmake to observe environment variables. It does not.
 Make honours and processes them, but that's run after qmake has finished
 running and has written the Makefile. Two separate and independent steps.

Actually, I was partially right, but the explanation is wrong.

When you write:

SOURCES = $(FOO)

Then qmake will write to the Makefile:

SOURCES = $(FOO)

and like I said in the email above, Make will expand and do its job.

When you write:
isEmpty(SOURCES)

then qmake looks at SOURCES and sees it's *not* empty. It contains one item: 
$(FOO) (literally).

When you write:
message(Abc $$SOURCES def)

Then qmake will do the replacement and get the string Abc $(FOO) def. At 
that point, it notices the environment expansion and expands that, at that 
time. If you run with debugging enabled, you'll see it saying:

DEBUG 2: literal Abc $(FOO) def
DEBUG 2: evaluated expression = Abc $(FOO) def
DEBUG 1: /dev/stdin:1: calling built-in message(Abc $(FOO) def)
Project MESSAGE: Abc  def

So TEST_3 isn't empty. Only the output from message was empty because it 
performed an extra expansion.

The rest of the email was right:

  Is this intended behaviour?
 
 Yes.
 
  How can I proceed to get the correct result?
 
 You cannot with qmake. You need to either make the variable a pure qmake one
 by passing it on the qmake command-line instead of the environment, or you
 skip doing the qmake checks and rely on Make rules only.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake: Test if environment variable is set.

2015-05-27 Thread Carel Combrink
Thiago,

 So TEST_3 isn't empty. Only the output from message was empty because it
 performed an extra expansion.


Thanks for the explanation, it makes a sense now.

Michael,

 I would use TEST_3=$$(FOO) instead of TEST_3=$(FOO)


This does work correctly thanks.

Reading the documentation on the difference between $$() and $() it makes
sense as Thiago explained.

Thank you both for the help.

Regards,
Carel
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake command usage

2015-05-19 Thread Dale Marchand
On 5/19/2015 8:11 AM, Dale Marchand wrote:
 Can someone explain why the following line in a .pro file fails to
 create a softlink:
 
 system(ln -s /home/marchand/test.xml /home/marchand/test2.xml)
 
 but when the output is stored in a variable, the link is created as
 expected:
 
 THROW_AWAY_VAR=$$system(ln -s /home/marchand/test.xml
 /home/marchand/test2.xml)
 
 This is using qmake bundled with Qt 5.4.1.
 Perhaps it quotes the latter for you but expects the first to be 
 quoted? :

 system(ln -s /home/marchand/test.xml /home/marchand/test2.xml) 
Unfortunately no.  Tried that and still no luck without the variable 
assignment.

Dale
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


  1   2   3   >