mirror of
https://github.com/Syping/dtranslatebot.git
synced 2024-11-22 13:50:22 +01:00
DPPAsExternalProject: call Perl directly for OpenSSL
This commit is contained in:
parent
c21ed31889
commit
bb099d644a
2 changed files with 12 additions and 9 deletions
|
@ -17,6 +17,7 @@
|
||||||
****************************************************************************]]
|
****************************************************************************]]
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
cmake_policy(VERSION 3.16...3.27)
|
||||||
project(dtranslatebot VERSION 0.2.0 LANGUAGES CXX)
|
project(dtranslatebot VERSION 0.2.0 LANGUAGES CXX)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
# Needed for compiler passthrough
|
# Needed for compiler passthrough
|
||||||
if (DEFINED CMAKE_C_COMPILER)
|
if (DEFINED CMAKE_C_COMPILER)
|
||||||
set(CC_ENV "CC=${CMAKE_C_COMPILER}")
|
set(CMAKE_ENV_CC_COMMAND "${CMAKE_COMMAND}" -E env "CC=${CMAKE_C_COMPILER}")
|
||||||
set(DEFINE_CMAKE_C_COMPILER "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
|
set(DEFINE_CMAKE_C_COMPILER "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -26,14 +26,15 @@ if (DEFINED CMAKE_CXX_COMPILER)
|
||||||
set(DEFINE_CMAKE_CXX_COMPILER "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}")
|
set(DEFINE_CMAKE_CXX_COMPILER "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# OpenSSL needs to be build with make
|
# OpenSSL needs to be configured with perl and build with make
|
||||||
|
find_package(Perl REQUIRED)
|
||||||
find_program(MAKE_EXECUTABLE NAMES make gmake)
|
find_program(MAKE_EXECUTABLE NAMES make gmake)
|
||||||
if (NOT MAKE_EXECUTABLE)
|
if (NOT DEFINED MAKE_EXECUTABLE)
|
||||||
message(SEND_ERROR "make not found")
|
message(SEND_ERROR "make not found")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_program(NPROC_EXECUTABLE nproc)
|
find_program(NPROC_EXECUTABLE nproc)
|
||||||
if (NPROC_EXECUTABLE)
|
if (DEFINED NPROC_EXECUTABLE)
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${NPROC_EXECUTABLE}
|
COMMAND ${NPROC_EXECUTABLE}
|
||||||
OUTPUT_VARIABLE NPROC
|
OUTPUT_VARIABLE NPROC
|
||||||
|
@ -60,18 +61,19 @@ ExternalProject_Add(OpenSSL
|
||||||
URL https://www.openssl.org/source/openssl-3.0.13.tar.gz
|
URL https://www.openssl.org/source/openssl-3.0.13.tar.gz
|
||||||
URL_HASH SHA256=88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313
|
URL_HASH SHA256=88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313
|
||||||
CONFIGURE_COMMAND
|
CONFIGURE_COMMAND
|
||||||
"${CC_ENV}"
|
${CMAKE_ENV_CC_COMMAND}
|
||||||
"<SOURCE_DIR>/config"
|
"${PERL_EXECUTABLE}"
|
||||||
|
"<SOURCE_DIR>/Configure"
|
||||||
"--prefix=<INSTALL_DIR>"
|
"--prefix=<INSTALL_DIR>"
|
||||||
$<$<CONFIG:Debug>:-d>
|
$<$<CONFIG:Debug>:-d>
|
||||||
no-deprecated
|
no-deprecated
|
||||||
no-dtls
|
|
||||||
no-dso
|
no-dso
|
||||||
|
no-dtls
|
||||||
no-engine
|
no-engine
|
||||||
no-shared
|
no-shared
|
||||||
no-zlib
|
no-zlib
|
||||||
BUILD_COMMAND ${MAKE_EXECUTABLE} ${JOBS_ARGUMENT}
|
BUILD_COMMAND "${MAKE_EXECUTABLE}" "${JOBS_ARGUMENT}"
|
||||||
INSTALL_COMMAND ${MAKE_EXECUTABLE} ${JOBS_ARGUMENT} install_sw
|
INSTALL_COMMAND "${MAKE_EXECUTABLE}" "${JOBS_ARGUMENT}" install_sw
|
||||||
)
|
)
|
||||||
ExternalProject_Get_Property(OpenSSL INSTALL_DIR)
|
ExternalProject_Get_Property(OpenSSL INSTALL_DIR)
|
||||||
set(OpenSSL_INSTALL_DIR "${INSTALL_DIR}")
|
set(OpenSSL_INSTALL_DIR "${INSTALL_DIR}")
|
||||||
|
|
Loading…
Reference in a new issue