[CMake] changing Visual Studio project environment setting withCMake

Neuhaus Jochen j.neuhaus at dkfz-heidelberg.de
Tue Apr 7 02:06:32 EDT 2009


Sorry for the repost, but does anyone have a hint for how to achieve this? If it is not possible, should I file a feature request in the cmake bugtracker?
 
Thanks
  Jochen

________________________________

Von: cmake-bounces at cmake.org im Auftrag von Neuhaus Jochen
Gesendet: Fr 4/3/2009 12:04
An: cmake at cmake.org
Betreff: [CMake] changing Visual Studio project environment setting withCMake



Hi,

in Visual Studio, you can add custom environment variables that will
exist if you run your application from visual studio. They are at
[execuatable project]-->Properties-->Configuration
Properties-->Debugging-->Environment
My project needs to have a debug version of ITKCommon.dll in its PATH
when running in Debug mode and a Release version of the DLL in Release
mode respectively.
Setting the project environment setting to
"PATH=%ITK_DIR%\bin\$(OutType);%PATH%" allows me to automatically use
the correct path, as is suggested in the VTK FAQ
(<http://vtkedge.org/Wiki/VTK_FAQ#Shared_builds_of_VTK_and_debugging_QVT
KWidget_using_Visual_Studio>).

But how can I add this setting with CMake?

I tried the following without success:

ADD_EXECUTABLE(MyExecutable ${MAIN_APP_CPP})
IF(WIN32)
   SET_TARGET_PROPERTIES(MainApp PROPERTIES ENVIRONMENT_DEBUG

"PATH=${ITK_DIR}/bin/$(OutDir);${VTK_DIR}/bin/$(OutDir);${QT_DIR}/bin;%P
ATH%")
   SET_TARGET_PROPERTIES(MainApp PROPERTIES ENVIRONMENT_RELEASE  

"PATH=${ITK_DIR}/bin/$(OutDir);${VTK_DIR}/bin/$(OutDir);${QT_DIR}/bin;%P
ATH%")
ENDIF(WIN32)


Any hints?

Jochen Neuhaus

---
MSc. Jochen Neuhaus
DKFZ
German Cancer Research Center (Deutsches Krebsforschungszentrum)
Member of the Helmholtz Association
Division Medical and Biological Informatics E130
Im Neuenheimer Feld 280
D-69120 Heidelberg
Phone: 49-(0)6221-42-2329
Fax: 49-(0)6221-42-2345
E-Mail: j.neuhaus at dkfz-heidelberg.de
Web: http://www.dkfz-heidelberg.de/en/mbi/people/Jochen_Neuhaus.html

Confidentiality Note: This message is intended only for the use of the
named recipient(s) and may obtain confidential and/or privileged
information. If you are not the intended recipient, please contact the
sender and delete the message. Any unauthorized use of the information
contained in this message is prohibited.


_______________________________________________
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




More information about the CMake mailing list