[CMake] Problem building CMake with system OPENSSL
Lowekamp, Bradley (NIH/NLM/LHC) [C]
blowekamp at mail.nih.gov
Mon Jun 6 08:52:23 EDT 2016
Hi,
Just to clarify this is a problem building CMake itself not a project with CMake.
Brad
> On Jun 5, 2016, at 1:49 PM, Kristian <kristianonline28 at gmail.com> wrote:
>
> Maybe you should add something like
>
>> include_directories(${OPENSSL_INCLUDE_DIR})
>
> to your CMakeLists.txt ?
>
> 2016-06-03 10:27 GMT-04:00 Lowekamp, Bradley (NIH/NLM/LHC) [C]
> <blowekamp at mail.nih.gov>:
>> Hello,
>>
>> I am trying to build CMake on an old system with a new version of openssl.
>> My build script was working with CMake 3.4 but is not working with 3.5.2 or
>> current master. Here is how I am building cmake:
>>
>>
>> cd /tmp/cmake-build &&
>> ../${CMAKE_ROOT}/bootstrap &&
>> make -j ${NPROC} &&
>> ./bin/cmake -DCMAKE_BUILD_TYPE:STRING=Release
>> -DCMAKE_USE_OPENSSL:BOOL=ON -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl
>> -DCMAKE_USE_SYSTEM_CURL:BOOL=OFF . &&
>> make -j${NPROC}
>>
>> ERROR MESSAGE:
>> 41%] Building C object
>> Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o
>> cd /tmp/cmake-build/Utilities/cmlibarchive/libarchive &&
>> /opt/rh/devtoolset-2/root/usr/bin/gcc -DCURL_STATICLIB -DHAVE_CONFIG_H
>> -DLIBARCHIVE_STATIC -DLZMA_API_STATIC
>> -I/tmp/cmake/Utilities/cmlibarchive/libarchive
>> -I/tmp/cmake-build/Utilities/cmlibarchive -I/tmp/cmake-build/Utilities
>> -I/tmp/cmake/Utilities -I/tmp/cmake/Utilities/cmbzip2
>> -I/tmp/cmake/Utilities/cmliblzma/liblzma/api -w -O3 -DNDEBUG -std=gnu99
>> -o CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o -c
>> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor.c
>> In file included from
>> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor.c:32:0:
>> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:102:25:
>> fatal error: openssl/evp.h: No such file or directory
>> #include <openssl/evp.h>
>>
>> My work around it just to add "-I/usr/local/ssl/include/“ to the
>> CMAKE_C_FLAGS.
>>
>>
>> Thanks!
>> Brad
>>
>> --
>>
>> 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
More information about the CMake
mailing list