[cmake-developers] [CMake 0013291]: find_path(WIN32_INCLUDE_DIR windows.h) does not work with Visual Studio 10 generator

Mantis Bug Tracker mantis at public.kitware.com
Mon Jun 11 09:58:25 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://cmake.org/Bug/view.php?id=13291 
====================================================================== 
Reported By:                Dimitri Merejkowsky
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13291
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-06-11 09:58 EDT
Last Modified:              2012-06-11 09:58 EDT
====================================================================== 
Summary:                    find_path(WIN32_INCLUDE_DIR windows.h) does not work
with Visual Studio 10 generator
Description: 
Using find_path to find headers from the Microsoft SDK does not work
when using the Visual Studio 10 generator.

Steps to Reproduce: 
CMakeLists.txt looking like:

cmake_minimum_required(VERSION 2.8.8)
project(foo C)
find_path(WIN32_INC windows.h)
message(STATUS "WIN32_INC: ${WIN32_INC}")

Ran from normal cmd.exe:

> cmake ..
-- Building for: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- WIN32_INC: WIN32_INC-NOTFOUND
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/dmerejkowsky/work/tmp/cmake_bug/b




Additional Information: 
Note that this works when ran from Microsoft Visual Studio command prompt:

> cmake -G "NMake Makefiles" ..
-- The C compiler identification is MSVC 16.0.30319.1
-- Check for CL compiler version
-- Check for CL compiler version - 1600
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - no
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio
10.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio
10.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- WIN32_INC: C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Include
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/dmerejkowsky/work/tmp/cmake_bug/b

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-06-11 09:58 Dimitri MerejkowskyNew Issue                                   

======================================================================




More information about the cmake-developers mailing list