I need to build and install an old openssl lib both in debug
and release
on windows.
Unfortunately, the does not work out of the box.
with this setup
ExternalProject_Add(
openssl
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
PREFIX ${CMAKE_BINARY_DIR}
#--Download step--------------
URL ${OPENSSL_URL}
URL_HASH SHA256=${SHA256}
#--Update/Patch step----------
#--Configure step-------------
USES_TERMINAL_CONFIGURE TRUE
# see build/src/openssl/Configure
# first:
# build/src/openssl-stamp/openssl-configure-Debug.cmake
# build/src/openssl-stamp/openssl-configure-err.log
# build/src/openssl-stamp/openssl-configure-out.log
# second:
# build/src/openssl-stamp/openssl-build-Debug.cmake
# build/src/openssl-stamp/openssl-build-err.log
# build/src/openssl-stamp/openssl-build-out.log
CONFIGURE_COMMAND
cd <SOURCE_DIR> && ${PERL_PROGRAM} Configure ${CONFIG_DEBUG_PREFIX}${OS_CONFIG_SETUP} no-asm no-hw no-krb5
--prefix=${CMAKE_INSTALL_PREFIX} ${GENERATE_MAKE_FILES}
#--Build step-----------------
USES_TERMINAL_BUILD TRUE
BUILD_COMMAND
cd <SOURCE_DIR> && ${MAKE_PROGRAM}
# UNIX: ${MAKE_PROGRAM} -C <SOURCE_DIR>
#--Install step---------------
USES_TERMINAL_INSTALL TRUE
INSTALL_COMMAND
cd <SOURCE_DIR> && ${MAKE_PROGRAM} ${INSTALL_SW}
# UNIX: ${MAKE_PROGRAM} -C <SOURCE_DIR> ${INSTALL_SW}
#--Logging -------------------
LOG_DOWNLOAD OFF
LOG_CONFIGURE ${OPENSSL_WRITE_LOG}
LOG_BUILD ${OPENSSL_WRITE_LOG}
LOG_INSTALL OFF
)
I see this output
-- extracting...
src='C:/Users/KLEIN_CL/Workspace/Qt/openssl-cmake/build/src/openssl-1.0.2u.tar.gz'
dst='C:/Users/KLEIN_CL/Workspace/Qt/openssl-cmake/build/src/openssl'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[12/20] Performing configure step for 'openssl'CMake Error at C:/Users/KLEIN_CL/Workspace/Qt/openssl-cmake/build/src/openssl-stamp/openssl-configure-Debug.cmake:49 (message):
Command failed: no such file or directory
'cd' 'C:/Users/KLEIN_CL/Workspace/Qt/openssl-cmake/build/src/openssl' '&&' 'C:/Strawberry/perl/bin/perl.exe' 'Configure' 'debug-VC-WIN32' 'no-asm' 'no-hw' 'no-krb5' '--prefix=/tmp/install' '&&' 'ms\do_nt.bat'
See also
C:/Users/KLEIN_CL/Workspace/Qt/openssl-cmake/build/src/openssl-stamp/openssl-configure-*.log
FAILED: src/openssl-stamp/openssl-configure C:/Users/KLEIN_CL/Workspace/Qt/openssl-cmake/build/src/openssl-stamp/openssl-configure
C:\Windows\system32\cmd.exe /C "cd /D C:\Users\KLEIN_CL\Workspace\Qt\openssl-cmake\build\src\openssl-build && C:\Python\3.12\Lib\site-packages\cmake\data\bin\cmake.exe -P C:/Users/KLEIN_CL/Workspace/Qt/openssl-cmake/build/src/openssl-stamp/openssl-configure-Debug.cmake && C:\Python\3.12\Lib\site-packages\cmake\data\bin\cmake.exe -E touch C:/Users/KLEIN_CL/Workspace/Qt/openssl-cmake/build/src/openssl-stamp/openssl-configure"
ninja: build stopped: subcommand failed.
C:\Users\KLEIN_CL\Workspace\Qt\openssl-cmake>