<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><span lang="NO-BOK">Hello,<BR>

I have the following configuration;<BR>

FIND_PACKAGE(Qt4 4.7.1 COMPONENTS QtCore)<BR>
IF (Qt4_FOUND)<BR>
 &nbsp;&nbsp; INCLUDE(${QT_USE_FILE})<BR>
 &nbsp;&nbsp; MESSAGE(STATUS "QT_LIBRARIES:${QT_LIBRARIES}")<BR>
ENDIF()<BR>&nbsp;<BR>

# setup header and source files<BR>

&nbsp;<BR>ADD_EXECUTABLE(TBD ${_SOURCES} ${_HEADERS})<BR>
TARGET_LINK_LIBRARIES(TBD ${QT_LIBRARIES})<BR>

&nbsp;<BR>The message outputs;<BR>
QT_LIBRARIES:optimized;c:/tools/Qt_r/4.7.1-vs2005/lib/QtCore4.lib;debug;c:/tools/Qt_r/4.7.1-vs2005/lib/QtCored4.lib<BR>

&nbsp;<BR>So the target_link_libraries decode the content in QT_LIBRARIES variable to determine which library to link against. In this example that means if cmake_build_type is equal "release" then the optimized library is used. If cmake_build_type is equal "debug" then the debug library is used. This is a simple description of what happens.<BR>&nbsp;<BR>

Next I need to install the qt libraries. I am able to determine library path based on lib path. How do I determine to use "optimized" or "debug" or "general"? It would be great if this algorithm was the same as the one used by target_link_libraries api to select which library to link against.<BR>&nbsp;<BR>Appreciate any input.<BR>
</span>                                               </div></body>
</html>