<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hello, first time on the list<DIV><BR class="khtml-block-placeholder"></DIV><DIV>I am working on a project that links with some external libs that we build ourselves (OpenSceneGraph).</DIV><DIV>To accommodate the use of release and debug versions the current layout looks like this:</DIV><DIV>osg/lib.rel/ .....</DIV><DIV>osg/lib.dbg/ .....</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The CMakeLists.txt for our code has this to set the directory to add to search for libs:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>set(tool_libs ${OSG_ROOT}/lib.${${CMAKE_BUILD_TYPE}_DIR}/)</DIV><DIV>link_directories(${tool_libs})</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The problem is that at project generation time CMAKE_BUILD_TYPE is set to, for example, DEBUG, so the debug path is burned into the project files and it does not get re-evaluated when the IDE changes to RELEASE.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I thought that using double variable referencing might confuse the generator and I rewrote the first line as an if statement (pseudocode, I don't find the proper version now):</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>IF(${CMAKE_BUILD_TYPE} EQUAL 'DEBUG')</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>set(tool_libs ${OSG_ROOT}/lib.dbg/)</DIV><DIV>ELSE(${CMAKE_BUILD_TYPE} EQUAL 'DEBUG')</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>IF(${CMAKE_BUILD_TYPE} EQUAL 'RELEASE')</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>set(tool_libs ${OSG_ROOT}/lib.rel/)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>ENDIF(${CMAKE_BUILD_TYPE} EQUAL 'RELEASE')</DIV><DIV>ENDIF(${CMAKE_BUILD_TYPE} EQUAL 'DEBUG')</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>But this would not be adjusted either.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Is there any way to set LINK_DIRECTORIES based on the configuration in such a way that VC8(7,6) will have the directory change when the build type is changed in the IDE ?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thank you</DIV><DIV><BR></DIV><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>--------------------------</DIV><DIV>Radu Mihai</DIV><DIV><A href="mailto:radu@cm-labs.com">radu@cm-labs.com</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV></SPAN><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>