[CMake] FindQt4 QT_LIBRARIES
Hello,I have looked at FindQt4.cmake module for 2.8.2, but I can't find the code that sets the QT_LIBRARIES variable.Could someone point that out?Regards,___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] FindQt4 QT_LIBRARIES
On 29. Jul, 2010, at 10:47 , Hicham Mouline wrote: Hello,I have looked at FindQt4.cmake module for 2.8.2, but I can't find the code that sets the QT_LIBRARIES variable.Could someone point that out?Regards It's in UseQt4.cmake. HTH Michael ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] FindQt4 QT_LIBRARIES
On 29. Jul, 2010, at 10:47 , Hicham Mouline wrote: Hello,I have looked at FindQt4.cmake module for 2.8.2, but I can't find the code that sets the QT_LIBRARIES variable.Could someone point that out?Regards It's in UseQt4.cmake. HTH Michael I am now trying to link against QT debug libariries in the RelWithDebInfo cmake configuation case. However, it links against the QT release libs when I follow those lines of help of FindQt4.cmake that describe the typical usage. This is the cmake code: FIND_PACKAGE(Qt4 4.5.3 COMPONENTS QtCore QtGui QtOpenGL REQUIRED) INCLUDE(${QT_USE_FILE}) TARGET_LINK_LIBRARIES(main ${QT_LIBRARIES}) 1. when CMAKE_BUILD_TYPE is Release, vs2008 shows the release libs of qt 2. when CMAKE_BUILD_TYPE is Debug, vs2008 shows the debug libs of qt 3. However when CMAKE_BUILD_TYPE is RelWithDebInfo it picks the release qt libs where I'd want to pick the debug qt libs. Outputting QT_LIBRARIES shows: optimized;C:/Qt/4.6.0/lib/QtOpenGL4.lib;debug;C:/Qt/4.6.0/lib/QtOpenGLd4.lib;optimized;C:/Qt/4.6.0/lib/QtGui4.lib;debug;C:/Qt/4.6.0/lib/QtGuid4.lib;optimized;C:/Qt/4.6.0/lib/QtCore4.lib;debug;C:/Qt/4.6.0/lib/QtCored4.lib Regards, ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] FindQt4 QT_LIBRARIES
Hello,I have looked at FindQt4.cmake module for 2.8.2, but I can't find the code that sets the QT_LIBRARIES variable.Could someone point that out?Regards It's in UseQt4.cmake. HTH Michael I am now trying to link against QT debug libariries in the RelWithDebInfo cmake configuation case. However, it links against the QT release libs when I follow those lines of help of FindQt4.cmake that describe the typical usage. This is the cmake code: FIND_PACKAGE(Qt4 4.5.3 COMPONENTS QtCore QtGui QtOpenGL REQUIRED) INCLUDE(${QT_USE_FILE}) TARGET_LINK_LIBRARIES(main ${QT_LIBRARIES}) 1. when CMAKE_BUILD_TYPE is Release, vs2008 shows the release libs of qt 2. when CMAKE_BUILD_TYPE is Debug, vs2008 shows the debug libs of qt 3. However when CMAKE_BUILD_TYPE is RelWithDebInfo it picks the release qt libs where I'd want to pick the debug qt libs. Outputting QT_LIBRARIES shows: optimized;C:/Qt/4.6.0/lib/QtOpenGL4.lib;debug;C:/Qt/4.6.0/lib/QtOpenGLd4.lib;optimized;C:/Qt/4.6.0/lib/QtGui4.lib;debug;C:/Qt/4.6.0/lib/QtGuid4.lib;optimized;C:/Qt/4.6.0/lib/QtCore4.lib;debug;C:/Qt/4.6.0/lib/QtCored4.lib That will most likely cause your application to crash. You can not mix debug and release crt. Well at least I spent days figuring out why my simple qt dialog was crashing for no apparent reason. Then found that one of the dependencies was causing a mix of debug and release libs. John ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] FindQt4 QT_LIBRARIES
Hello,I have looked at FindQt4.cmake module for 2.8.2, but I can't find the code that sets the QT_LIBRARIES variable.Could someone point that out?Regards It's in UseQt4.cmake. HTH Michael I am now trying to link against QT debug libariries in the RelWithDebInfo cmake configuation case. However, it links against the QT release libs when I follow those lines of help of FindQt4.cmake that describe the typical usage. This is the cmake code: FIND_PACKAGE(Qt4 4.5.3 COMPONENTS QtCore QtGui QtOpenGL REQUIRED) INCLUDE(${QT_USE_FILE}) TARGET_LINK_LIBRARIES(main ${QT_LIBRARIES}) 1. when CMAKE_BUILD_TYPE is Release, vs2008 shows the release libs of qt 2. when CMAKE_BUILD_TYPE is Debug, vs2008 shows the debug libs of qt 3. However when CMAKE_BUILD_TYPE is RelWithDebInfo it picks the release qt libs where I'd want to pick the debug qt libs. Outputting QT_LIBRARIES shows: optimized;C:/Qt/4.6.0/lib/QtOpenGL4.lib;debug;C:/Qt/4.6.0/lib/QtOpenGLd4.lib ;optimized;C:/Qt/4.6.0/lib/QtGui4.lib;debug;C:/Qt/4.6.0/lib/QtGuid4.lib;opti mized;C:/Qt/4.6.0/lib/QtCore4.lib;debug;C:/Qt/4.6.0/lib/QtCored4.lib That will most likely cause your application to crash. You can not mix debug and release crt. Well at least I spent days figuring out why my simple qt dialog was crashing for no apparent reason. Then found that one of the dependencies was causing a mix of debug and release libs. John It does crash currently with release libs for relwithdebingfo config. If I link against debug libs, it doesn't crash. The question is: when config is relwithdebingfo, how can I get TARGET_LINK_LIBRARIES to pick the debug version of the libs from QT_LIBRARIES? rds, ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] FindQt4 QT_LIBRARIES
It does crash currently with release libs for relwithdebingfo config. If I link against debug libs, it doesn't crash. The question is: when config is relwithdebingfo, how can I get TARGET_LINK_LIBRARIES to pick the debug version of the libs from QT_LIBRARIES? I use Qt release libs with my RelWithDebInfo all the time (2+ years). Since that is the only release build that I use with CMake. I would use depends to verify what .dlls are being used. This one case with a crash I believe I forgot to build 1 lib for RelWithDebInfo and that ended up bringing in Qt debug. John ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] FindQt4 QT_LIBRARIES
-Original Message- From: John Drescher [mailto:dresche...@gmail.com] Sent: 29 July 2010 21:35 To: Hicham Mouline; CMake mailing list Subject: Re: [CMake] FindQt4 QT_LIBRARIES It does crash currently with release libs for relwithdebingfo config. If I link against debug libs, it doesn't crash. The question is: when config is relwithdebingfo, how can I get TARGET_LINK_LIBRARIES to pick the debug version of the libs from QT_LIBRARIES? I use Qt release libs with my RelWithDebInfo all the time (2+ years). Since that is the only release build that I use with CMake. I would use depends to verify what .dlls are being used. This one case with a crash I believe I forgot to build 1 lib for RelWithDebInfo and that ended up bringing in Qt debug. John - You are right. Apologies. I had other libraries that had the debug version (linked against debug runtime) and that was the culprit (std::string). Now all libs are release with RelWithDebInfo and that works. Rds, ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake