Commit 1fb767e2 authored by Ghislain MARY's avatar Ghislain MARY

Fix HTTPS_CA_DIR definition on Mac OS X when building with CMake.

parent d4d07818
...@@ -22,17 +22,12 @@ ...@@ -22,17 +22,12 @@
if(APPLE) if(APPLE)
find_program(OPENSSL_PROGRAM openssl) find_program(OPENSSL_PROGRAM openssl)
find_program(SED_PROGRAM sed)
execute_process( execute_process(
COMMAND ${OPENSSL_PROGRAM} version -d COMMAND ${OPENSSL_PROGRAM} version -d
OUTPUT_VARIABLE OPENSSL_VERSION OUTPUT_VARIABLE OPENSSL_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
execute_process( string(REGEX REPLACE "OPENSSLDIR: \"(.*)\"" "\\1" HTTPS_CA_DIR "${OPENSSL_VERSION}")
COMMAND ${SED_PROGRAM} "s/OPENSSLDIR: \"\(.*\)\"/\1/" "${OPENSSL_VERSION}"
OUTPUT_VARIABLE HTTPS_CA_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif() endif()
execute_process(COMMAND ${CMAKE_COMMAND} -DHTTPS_CA_DIR=${HTTPS_CA_DIR} -DWORK_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/rootca.cmake) execute_process(COMMAND ${CMAKE_COMMAND} -DHTTPS_CA_DIR=${HTTPS_CA_DIR} -DWORK_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/rootca.cmake)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment