[ITK] [ITK-users] Switching between debug and release libaraies in Visual Studio
Tao Zhao
Tao.Zhao at intusurg.com
Fri May 20 11:57:03 EDT 2016
Hi Dženan,
Thank you for your reply. Here is the details:
I assume that I have to have something like this in my application cmake file:
set( ITK_DIR "${CMAKE_SOURCE_DIR}/build/external/ITK/Debug/lib/cmake/ITK-4.9" )
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
This works for debug version, but does not adapt to release when I build Release in Visual Studio. I believe this is a pretty common need and there must be a solution.
Thanks,
Tao
From: Dženan Zukić [mailto:dzenanz at gmail.com]
Sent: Friday, May 20, 2016 6:59 AM
To: Tao Zhao
Cc: insight-users at itk.org
Subject: Re: [ITK-users] Switching between debug and release libaraies in Visual Studio
Hi Tao,
with standard ITK setup, you don't have to do anything special. CMake takes care of setting up paths so you just switch between Debug and Release in your application which uses ITK.
Regards,
Dženan
On Thu, May 19, 2016 at 11:40 PM, Tao Zhao <Tao.Zhao at intusurg.com<mailto:Tao.Zhao at intusurg.com>> wrote:
Hi,
This might be a cmake question but it is related on how to use itk.
I built ITK in both debug and release modes and had them installed under
ITK
- Debug
- Release
I would like my application to link against ITK debug libs in debug mode and release libs in release mode. I can easily do this under qtcreator. However when I am using Visual Studio, ${CMAKE_BUILD_TYPE} does not take effect. I know there is a way if the libs are in one folder but have different names. I was wondering how can I achieve this with standard ITK set up (i.e., not using different names but using different path for debug and release libs).
Thank you very much!
Tao
_____________________________________
Powered by www.kitware.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com&d=CwMFaQ&c=zU8zY2zCUszYt_I-pOyd_mv7l16V_LqUcVo_CQ1Hrvg&r=d6wtAQ8fSpEhLu0_dzwpeUXO0dAG6lywMip9c70S8-k&m=ur5kkxzXSXG-9QZ4nnDPqvn_9ES3WHdFzsAunpxLg2M&s=g4NdZHsv8ChGouB1kMCyosRbQZiG1O1i9x0T3R_vBt4&e=>
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=CwMFaQ&c=zU8zY2zCUszYt_I-pOyd_mv7l16V_LqUcVo_CQ1Hrvg&r=d6wtAQ8fSpEhLu0_dzwpeUXO0dAG6lywMip9c70S8-k&m=ur5kkxzXSXG-9QZ4nnDPqvn_9ES3WHdFzsAunpxLg2M&s=ZeAmbwq089KuJZe7EvJkEOIYwFUJMZvYoJ-mILpjW1k&e=>
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_products_protraining.php&d=CwMFaQ&c=zU8zY2zCUszYt_I-pOyd_mv7l16V_LqUcVo_CQ1Hrvg&r=d6wtAQ8fSpEhLu0_dzwpeUXO0dAG6lywMip9c70S8-k&m=ur5kkxzXSXG-9QZ4nnDPqvn_9ES3WHdFzsAunpxLg2M&s=nWkLggvzsu38qPr3K38rIQihO2H0YrKaX-HEuxpY33U&e=>
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.itk.org_Wiki_ITK-5FFAQ&d=CwMFaQ&c=zU8zY2zCUszYt_I-pOyd_mv7l16V_LqUcVo_CQ1Hrvg&r=d6wtAQ8fSpEhLu0_dzwpeUXO0dAG6lywMip9c70S8-k&m=ur5kkxzXSXG-9QZ4nnDPqvn_9ES3WHdFzsAunpxLg2M&s=4slw82-cLhWPgkLziLAtIsgGChWBAdJoGJ2vd8afmHg&e=>
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users<https://urldefense.proofpoint.com/v2/url?u=http-3A__public.kitware.com_mailman_listinfo_insight-2Dusers&d=CwMFaQ&c=zU8zY2zCUszYt_I-pOyd_mv7l16V_LqUcVo_CQ1Hrvg&r=d6wtAQ8fSpEhLu0_dzwpeUXO0dAG6lywMip9c70S8-k&m=ur5kkxzXSXG-9QZ4nnDPqvn_9ES3WHdFzsAunpxLg2M&s=DkLPb7o2K5RozZMPF9OHnjUKvV_msa9uYTPX4R6wsIg&e=>
________________________________
NOTE THAT THIS EMAIL ORIGINATED FROM OUTSIDE OF INTUITIVE SURGICAL..
Be alert for fraudulent emails that spoof internal “@intusurg.com” email addresses. Report these or other security threats to: ITRequest at intusurg.com<mailto:ITRequest at intusurg.com>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160520/4cbb914a/attachment-0001.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list