mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-07-02 00:26:02 +02:00
better patches
This commit is contained in:
parent
9393f431cc
commit
09611deb7d
3 changed files with 13 additions and 120 deletions
|
|
@ -15,16 +15,6 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index 5420ecc..9ffd5a0 100644
|
index 5420ecc..9ffd5a0 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -19,9 +19,7 @@ include(FetchContent)
|
|
||||||
include(ProcessorCount)
|
|
||||||
include(cmake/ConfigureOpenSSL.cmake)
|
|
||||||
include(cmake/DetectTargetPlatform.cmake)
|
|
||||||
-include(cmake/FetchOpenSSL.cmake)
|
|
||||||
include(cmake/FindVcvarsall.cmake)
|
|
||||||
-include(cmake/GetCPM.cmake)
|
|
||||||
|
|
||||||
# Custom options
|
|
||||||
option(OPENSSL_BUILD_VERBOSE "Enable verbose output from build" OFF)
|
|
||||||
@@ -47,9 +45,6 @@ if("${OPENSSL_TARGET_PLATFORM}" STREQUAL "")
|
@@ -47,9 +45,6 @@ if("${OPENSSL_TARGET_PLATFORM}" STREQUAL "")
|
||||||
detect_target_platform(OPENSSL_TARGET_PLATFORM)
|
detect_target_platform(OPENSSL_TARGET_PLATFORM)
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -128,87 +118,3 @@ index 5420ecc..9ffd5a0 100644
|
||||||
)"
|
)"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
diff --git a/cmake/FetchOpenSSL.cmake b/cmake/FetchOpenSSL.cmake
|
|
||||||
deleted file mode 100644
|
|
||||||
index a43505d..0000000
|
|
||||||
--- a/cmake/FetchOpenSSL.cmake
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,64 +0,0 @@
|
|
||||||
-function(fetch_openssl)
|
|
||||||
- if(EXISTS "${OPENSSL_SOURCE}" AND IS_DIRECTORY "${OPENSSL_SOURCE}")
|
|
||||||
- # Fetch the local OpenSSL source
|
|
||||||
- if(NOT IS_ABSOLUTE "${OPENSSL_SOURCE}")
|
|
||||||
- string(PREPEND OPENSSL_SOURCE ${CMAKE_SOURCE_DIR}/)
|
|
||||||
- endif()
|
|
||||||
-
|
|
||||||
- string(REPLACE "\\" "/" openssl-source_SOURCE_DIR "${OPENSSL_SOURCE}")
|
|
||||||
- set(openssl-source_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/openssl-source-build)
|
|
||||||
- else()
|
|
||||||
- set(CPM_OPTIONS
|
|
||||||
- NAME openssl-source
|
|
||||||
- DOWNLOAD_ONLY ON
|
|
||||||
- )
|
|
||||||
-
|
|
||||||
- if(NOT OPENSSL_CONFIGURE_VERBOSE)
|
|
||||||
- list(APPEND CPM_OPTIONS QUIET)
|
|
||||||
- endif()
|
|
||||||
-
|
|
||||||
- if("${OPENSSL_SOURCE}" MATCHES "^http")
|
|
||||||
- # Download OpenSSL source from the internet
|
|
||||||
- list(APPEND CPM_OPTIONS URL ${OPENSSL_SOURCE})
|
|
||||||
- else()
|
|
||||||
- # Download OpenSSL source from the official website
|
|
||||||
- if("${OPENSSL_TARGET_VERSION}" STREQUAL "")
|
|
||||||
- set(OPENSSL_TARGET_VERSION ${PROJECT_VERSION})
|
|
||||||
- endif()
|
|
||||||
-
|
|
||||||
- if(OPENSSL_TARGET_VERSION VERSION_EQUAL PROJECT_VERSION)
|
|
||||||
- list(APPEND CPM_OPTIONS URL_HASH SHA256=aaf51a1fe064384f811daeaeb4ec4dce7340ec8bd893027eee676af31e83a04f)
|
|
||||||
- endif()
|
|
||||||
-
|
|
||||||
- if(OPENSSL_TARGET_VERSION MATCHES "^1\.1\.1[a-w]$")
|
|
||||||
- string(REPLACE "." "_" OPENSSL_TAGGED_VERSION ${OPENSSL_TARGET_VERSION})
|
|
||||||
- list(APPEND CPM_OPTIONS URL https://github.com/openssl/openssl/releases/download/OpenSSL_${OPENSSL_TAGGED_VERSION}/openssl-${OPENSSL_TARGET_VERSION}.tar.gz)
|
|
||||||
- else()
|
|
||||||
- list(APPEND CPM_OPTIONS URL https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_TARGET_VERSION}/openssl-${OPENSSL_TARGET_VERSION}.tar.gz)
|
|
||||||
- endif()
|
|
||||||
- endif()
|
|
||||||
-
|
|
||||||
- CPMAddPackage(${CPM_OPTIONS})
|
|
||||||
- endif()
|
|
||||||
-
|
|
||||||
- # Clean build directory if source directory has changed
|
|
||||||
- if(DEFINED CACHE{openssl-source_SOURCE_DIR_OLD} AND NOT openssl-source_SOURCE_DIR STREQUAL openssl-source_SOURCE_DIR_OLD)
|
|
||||||
- set(openssl-source_SOURCE_DIR_OLD ${openssl-source_SOURCE_DIR} CACHE INTERNAL "Previously fetched OpenSSL source")
|
|
||||||
-
|
|
||||||
- if(IS_DIRECTORY ${openssl-source_BINARY_DIR})
|
|
||||||
- file(REMOVE_RECURSE ${openssl-source_BINARY_DIR})
|
|
||||||
- file(MAKE_DIRECTORY ${openssl-source_BINARY_DIR})
|
|
||||||
- endif()
|
|
||||||
- endif()
|
|
||||||
-
|
|
||||||
- # Override the FindOpenSSL module
|
|
||||||
- FetchContent_Declare(
|
|
||||||
- OpenSSL
|
|
||||||
- SOURCE_DIR ${openssl-source_SOURCE_DIR}
|
|
||||||
- BINARY_DIR ${openssl-source_BINARY_DIR}
|
|
||||||
- OVERRIDE_FIND_PACKAGE
|
|
||||||
- )
|
|
||||||
- FetchContent_MakeAvailable(OpenSSL)
|
|
||||||
-
|
|
||||||
- return(PROPAGATE openssl_SOURCE_DIR openssl_BINARY_DIR)
|
|
||||||
-endfunction()
|
|
||||||
diff --git a/cmake/GetCPM.cmake b/cmake/GetCPM.cmake
|
|
||||||
deleted file mode 100644
|
|
||||||
index bfc50f5..0000000
|
|
||||||
--- a/cmake/GetCPM.cmake
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,5 +0,0 @@
|
|
||||||
-file(
|
|
||||||
- DOWNLOAD https://github.com/cpm-cmake/CPM.cmake/releases/latest/download/get_cpm.cmake
|
|
||||||
- ${CMAKE_CURRENT_BINARY_DIR}/get_cpm.cmake
|
|
||||||
-)
|
|
||||||
-include(${CMAKE_CURRENT_BINARY_DIR}/get_cpm.cmake)
|
|
||||||
--
|
|
||||||
2.54.0
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,23 +9,23 @@ Subject: [PATCH] use ccache
|
||||||
2 files changed, 3 insertions(+), 10 deletions(-)
|
2 files changed, 3 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index 9ffd5a0..9ff14c8 100644
|
index d6c998c..d943c59 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -28,7 +28,6 @@ option(OPENSSL_ENABLE_PARALLEL "Build and test in parallel if possible" ON)
|
@@ -20,7 +20,6 @@ include(ProcessorCount)
|
||||||
option(OPENSSL_INSTALL "Install OpenSSL components to the <prefix> directory" OFF)
|
include(cmake/CheckBuildMismatches.cmake)
|
||||||
option(OPENSSL_INSTALL_CERT "Install cert.pem to the <openssldir> directory" OFF)
|
include(cmake/ConfigureOpenSSL.cmake)
|
||||||
option(OPENSSL_TEST "Enable testing and build OpenSSL self tests" OFF)
|
include(cmake/DetectTargetPlatform.cmake)
|
||||||
-option(OPENSSL_USE_CCACHE "Use ccache if available" ON)
|
-include(cmake/FetchOpenSSL.cmake)
|
||||||
|
include(cmake/FindVcvarsall.cmake)
|
||||||
|
|
||||||
if("${OPENSSL_BUILD_TARGET}" STREQUAL "")
|
# Custom options
|
||||||
# Makefile target for build
|
|
||||||
diff --git a/cmake/ConfigureOpenSSL.cmake b/cmake/ConfigureOpenSSL.cmake
|
diff --git a/cmake/ConfigureOpenSSL.cmake b/cmake/ConfigureOpenSSL.cmake
|
||||||
index 211c18b..3d8cbed 100644
|
index be8d651..c186c16 100644
|
||||||
--- a/cmake/ConfigureOpenSSL.cmake
|
--- a/cmake/ConfigureOpenSSL.cmake
|
||||||
+++ b/cmake/ConfigureOpenSSL.cmake
|
+++ b/cmake/ConfigureOpenSSL.cmake
|
||||||
@@ -69,15 +69,9 @@ function(apply_ccache FILE)
|
@@ -77,15 +77,9 @@ function(apply_ccache FILE)
|
||||||
message(FATAL_ERROR "Couldn't find Makefile")
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
- if(OPENSSL_USE_CCACHE)
|
- if(OPENSSL_USE_CCACHE)
|
||||||
|
|
@ -42,13 +42,3 @@ index 211c18b..3d8cbed 100644
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
string(REPLACE "/Zi /Fdossl_static.pdb " "" MAKEFILE "${MAKEFILE}")
|
string(REPLACE "/Zi /Fdossl_static.pdb " "" MAKEFILE "${MAKEFILE}")
|
||||||
@@ -171,4 +165,4 @@ function(configure_openssl)
|
|
||||||
string(REPLACE "/W3" "/W0" MAKEFILE "${MAKEFILE}")
|
|
||||||
file(WRITE ${OPENSSL_MAKEFILE} "${MAKEFILE}")
|
|
||||||
endif()
|
|
||||||
-endfunction()
|
|
||||||
\ No newline at end of file
|
|
||||||
+endfunction()
|
|
||||||
--
|
|
||||||
2.54.0
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ Subject: [PATCH 2/2] use cmake compiler flags
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/cmake/ConfigureOpenSSL.cmake b/cmake/ConfigureOpenSSL.cmake
|
diff --git a/cmake/ConfigureOpenSSL.cmake b/cmake/ConfigureOpenSSL.cmake
|
||||||
index 3d8cbed..3012e05 100644
|
index c186c16..222e9c2 100644
|
||||||
--- a/cmake/ConfigureOpenSSL.cmake
|
--- a/cmake/ConfigureOpenSSL.cmake
|
||||||
+++ b/cmake/ConfigureOpenSSL.cmake
|
+++ b/cmake/ConfigureOpenSSL.cmake
|
||||||
@@ -135,7 +135,10 @@ function(configure_openssl)
|
@@ -147,7 +147,10 @@ function(configure_openssl)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
|
|
@ -23,6 +23,3 @@ index 3d8cbed..3012e05 100644
|
||||||
WORKING_DIRECTORY ${CONFIGURE_BUILD_DIR}
|
WORKING_DIRECTORY ${CONFIGURE_BUILD_DIR}
|
||||||
${VERBOSE_OPTION}
|
${VERBOSE_OPTION}
|
||||||
COMMAND_ERROR_IS_FATAL ANY
|
COMMAND_ERROR_IS_FATAL ANY
|
||||||
--
|
|
||||||
2.54.0
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue