[CMake] How to find vcvarsall.bat (e.g. at "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC")? CMAKE_LINKER?

David Cole dlrdave at aol.com
Thu May 8 17:09:05 EDT 2014


How about:

    if(EXISTS "$ENV{VS110COMNTOOLS}../../VC")
       get_filename_component(VC11_DIR "$ENV{VS110COMNTOOLS}../../VC" 
ABSOLUTE)
    endif()
    if(EXISTS "$ENV{VS120COMNTOOLS}../../VC")
       get_filename_component(VC12_DIR "$ENV{VS120COMNTOOLS}../../VC" 
ABSOLUTE)
    endif()
    message(STATUS "VC11_DIR='${VC11_DIR}'")
    message(STATUS "VC12_DIR='${VC12_DIR}'")


HTH,
David C.



More information about the CMake mailing list