I was trying to install openssl in external project using CMake in ubuntu , android and Windows. Its working fine in ubuntu . but in windows , Its failing with the following line
Performing configure step for 'openssl_external'
This version of D:\17-6-2022\main\src\external\openssl\config.com is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
Looks like the issue is with the config.com file is not supported in windows 10. Not sure how to fix it since the above error might come with architecture change . my system is windows 64 and this openssl 3.0.5 is creating lib64 folders in my ubuntu.
I have added the CMake command for configure and install below:
set(OPENSSL_INSTALL_DIR ${CMAKE_BINARY_DIR}/install)
set(OPENSSL_INCLUDE_DIR ${OPENSSL_INSTALL_DIR}/include)
set(OPENSSL_LIB_DIR ${OPENSSL_INSTALL_DIR}/lib)
set(OPENSSL_DATA_DIR ${OPENSSL_INCLUDE_DIR}/openssl-data)
set(OPENSSL_CONFIGURE_COMMAND ${CMAKE_CURRENT_LIST_DIR}/config)
ExternalProject_Add(
openssl_external
PREFIX openssl
SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}"
CONFIGURE_COMMAND ${OPENSSL_CONFIGURE_COMMAND}
--prefix=${OPENSSL_INSTALL_DIR}
--openssldir=${OPENSSL_DATA_DIR}
--libdir=${OPENSSL_LIB_DIR}
no-shared
BUILD_COMMAND make
TEST_COMMAND ""
INSTALL_COMMAND make install
INSTALL_DIR ${OPENSSL_INSTALL_DIR}
BUILD_IN_SOURCE 0)