From: <ai...@us...> - 2009-05-08 20:47:23
|
Revision: 9945 http://plplot.svn.sourceforge.net/plplot/?rev=9945&view=rev Author: airwin Date: 2009-05-08 20:47:07 +0000 (Fri, 08 May 2009) Log Message: ----------- Only use the appropriate component of QT_LIBRARIES depending on the embedded keywords. Modified Paths: -------------- trunk/cmake/modules/qt.cmake Modified: trunk/cmake/modules/qt.cmake =================================================================== --- trunk/cmake/modules/qt.cmake 2009-05-08 20:30:19 UTC (rev 9944) +++ trunk/cmake/modules/qt.cmake 2009-05-08 20:47:07 UTC (rev 9945) @@ -50,6 +50,33 @@ set(qt_COMPILE_FLAGS "${qt_COMPILE_FLAGS} -I${DIR}") endforeach(DIR ${QT_INCLUDES}) + split_libraries_list(QT_LIBRARIES QT_LIBRARIES_general QT_LIBRARIES_debug QT_LIBRARIES_optimized) + + # There is a complicated interpretation issue to be considered here. + # FindQt4.cmake associates "debug" with the Qt4 library DEBUG suffix (with + # currently unknown criteria for which libraries are labelled that way), + # and "optimized" with the Qt4 library RELEASE suffix (again with + # currently unknown criteria). Furthermore, CMake documentation is + # is not completely clear on how the debug and optimized keywords are to + # be interpreted by target_link_libraries for the Debug, Release, + # RelWithDebInfo and MinSizeRes possibilities for CMAKE_BUILD_TYPE. For + # example with gcc, the C options are Debug=-g, Release=-O3, + # RelWithDebInfo = -g -O2, and MinSizeRes=-Os. For that compiler, some of + # the options are clearly debug (Debug), some of the options are clearly + # optimized (Release), but the rest are ambiguous. This decision may + # be changed in the future, but for now choose the debug or optimized + # Qt4 libraries only for the cases which are clearly justified, and + # otherwise just use the general Qt4 libraries. + message(STATUS "QT_LIBRARIES (mixed for all CMAKE_BUILD_TYPES) = ${QT_LIBRARIES}") + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(QT_LIBRARIES ${QT_LIBRARIES_debug}) + elseif(CMAKE_BUILD_TYPE STREQUAL "Release") + set(QT_LIBRARIES ${QT_LIBRARIES_optimized}) + else(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(QT_LIBRARIES ${QT_LIBRARIES_general}) + endif(CMAKE_BUILD_TYPE STREQUAL "Debug") + message(STATUS "specific QT_LIBRARIES results used for this CMAKE_BUILD_TYPE = ${QT_LIBRARIES}") + set(qt_LINK_FLAGS ${QT_LIBRARIES}) #message("qt_LINK_FLAGS = ${qt_LINK_FLAGS}") set(qt_RPATH ${QT_LIBRARY_DIR}) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |