Hello,

While verifying curl library build issue on Windows - I've discovered
some differences in check_library_exists behaviour for different
targets 64 vs 32 bits.

The problem as follows - check_library_exists find library symbol when
Win64 platform used, but not for default 32 bit.

Here the output for Win64 bit generation
-----------------------------------------
E:\WORK\github\cmake_issue_checklibraryexist\build.64>cmake ..
-G"Visual Studio 14 2015 Win64"
-- The C compiler identification is MSVC 19.0.24210.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft
Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft
Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Looking for CertFreeCertificateContext in crypt32;
-- Looking for CertFreeCertificateContext in crypt32; - found
crypt32 found
-- Configuring done
-- Generating done
-- Build files have been written to:
E:/WORK/github/cmake_issue_checklibraryexist/build.64
-----------------------------------------

Here the output for 32-bit generation
-----------------------------------------
E:\WORK\github\cmake_issue_checklibraryexist\build.32>cmake ..
-G"Visual Studio 14 2015"
-- The C compiler identification is MSVC 19.0.24210.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft
Visual Studio 14.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft
Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Looking for CertFreeCertificateContext in crypt32;
-- Looking for CertFreeCertificateContext in crypt32; - not found
crypt32 not found
-- Configuring done
-- Generating done
-- Build files have been written to:
E:/WORK/github/cmake_issue_checklibraryexist/build.32
-----------------------------------------

I've provided MVE on GitHub
https://github.com/snikulov/cmake_issue_checklibraryexist


Is this expected behavior our known issue?

CMake version is 3.6.0

Thank you.

-- 
Best Regards,
Sergei Nikulov
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to