<div dir="ltr">You can probably use -DCMAKE_CXX_COMPILER_FLAGS="/IC:\path\to\zlib".</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 10, 2014 at 2:31 PM, <span dir="ltr"><<a href="mailto:sgundapa@codeaurora.org" target="_blank">sgundapa@codeaurora.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
I have having hard time to let cmake configuration detect the zlib<br>
header in windows with "Visual Studio 12" generator. My cmake<br>
configuration goes like<br>
<br>
<br>
>> Set path, include and lib environment variables to point to zlib<br>
headers and libraries. Cmake version is 2.8.12.2<br>
cmake -G "Visual Studio 12" -D LLVM_TARGETS_TO_BUILD:STRING=%TARG% -D<br>
TARGET_TRIPLE:STRING=%TRIPLE% -D<br>
LLVM_DEFAULT_TARGET_TRIPLE:STRING=%TRIPLE% -D<br>
LLVM_TARGET_ARCH:STRING=%TRIPLE% -D LLVM_ENABLE_PIC:BOOL=ON -D<br>
LLVM_ENABLE_ASSERTIONS:BOOL=ON -D<br>
CMAKE_INSTALL_PREFIX=%win_top_install_dir% -D CMAKE_BUILD_TYPE=%BLDMODE%<br>
-DLLVM_APPEND_VC_REV:BOOL=ON -D LLVM_VENDOR_NAME:STRING=%NAME% -D<br>
LLVM_VENDOR_VERSION:STRING=%VER% %win_top_src_dir%/llvm<br>
<br>
<br>
As far as I know, cmake tries to compile a simple file with "#include<br>
<zlib.h>" with MSbuild.exe which invokes a project file. MSbuild has its<br>
own environment and ignores the user's environment variables.<br>
<br>
Any one face this issue before?<br>
Let me know if you need more details on this.<br>
The bottom line is , I want to set HAVE_ZLIB to 1<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>