[LLVMdev] CMake configuration: Detecting zlib.h header in windows.

sgundapa at codeaurora.org sgundapa at codeaurora.org
Thu Apr 10 14:28:09 PDT 2014


Hi,
   I have having hard time to let cmake configuration detect the zlib
header in windows with "Visual Studio 12" generator. My cmake
configuration goes like


 >> Set path, include and lib environment variables to point to zlib
headers and libraries. Cmake version is 2.8.12.2
cmake -G "Visual Studio 12" -D LLVM_TARGETS_TO_BUILD:STRING=%TARG% -D
TARGET_TRIPLE:STRING=%TRIPLE% -D
LLVM_DEFAULT_TARGET_TRIPLE:STRING=%TRIPLE% -D
LLVM_TARGET_ARCH:STRING=%TRIPLE% -D LLVM_ENABLE_PIC:BOOL=ON -D
LLVM_ENABLE_ASSERTIONS:BOOL=ON -D
CMAKE_INSTALL_PREFIX=%win_top_install_dir% -D CMAKE_BUILD_TYPE=%BLDMODE%
-DLLVM_APPEND_VC_REV:BOOL=ON -D LLVM_VENDOR_NAME:STRING=%NAME% -D
LLVM_VENDOR_VERSION:STRING=%VER% %win_top_src_dir%/llvm


As far as I know, cmake tries to compile a simple file with "#include
<zlib.h>" with MSbuild.exe which invokes a project file. MSbuild has its
own environment and ignores the user's environment variables.

Any one face this issue before?
Let me know if you need more details on this.
The bottom line is , I want to set HAVE_ZLIB to 1









More information about the llvm-dev mailing list