Skip to content

Commit

Permalink
Merge pull request #15 from Steveice10/cherry_picks
Browse files Browse the repository at this point in the history
Cherry pick some build fixes from upstream
  • Loading branch information
Schplee committed Jul 4, 2023
2 parents dcf9a84 + 83fdd2e commit d4fc734
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,15 @@ if(HAVE_NETINET_IP_H)
add_definitions(-DHAVE_NETINET_IP_H)
endif()

# This isn't ready for universal binaries yet, since we do conditional
# compilation based on the architecture, but this makes cross compiling for a
# single architecture work on macOS at least.
#
# Don't set CMAKE_OSX_ARCHITECTURES to more than a single value for now.
if(APPLE)
set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_OSX_ARCHITECTURES}")
endif()

if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(aarch64|arm64)")
set(HOST_AARCH64 true)
elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")
Expand Down
3 changes: 2 additions & 1 deletion crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,8 @@ target_include_directories(crypto_obj
x509
../include/compat
PUBLIC
../include)
../include
${CMAKE_BINARY_DIR}/include)

if(HOST_AARCH64)
target_include_directories(crypto_obj PRIVATE bn/arch/aarch64/)
Expand Down
2 changes: 1 addition & 1 deletion include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ elseif(HOST_SPARC64)
elseif(HOST_X86_64)
file(READ arch/amd64/opensslconf.h OPENSSLCONF)
endif()
file(WRITE openssl/opensslconf.h "${OPENSSLCONF}")
file(WRITE ${CMAKE_BINARY_DIR}/include/openssl/opensslconf.h "${OPENSSLCONF}")
3 changes: 2 additions & 1 deletion ssl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ target_include_directories(ssl_obj
../crypto/bio
../include/compat
PUBLIC
../include)
../include
${CMAKE_BINARY_DIR}/include)

add_library(bs_obj OBJECT ${BS_SRC})
target_include_directories(bs_obj
Expand Down
3 changes: 2 additions & 1 deletion tls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ target_include_directories(tls_obj
.
../include/compat
PUBLIC
../include)
../include
${CMAKE_BINARY_DIR}/include)

add_library(tls $<TARGET_OBJECTS:tls_obj> $<TARGET_OBJECTS:ssl_obj>
$<TARGET_OBJECTS:crypto_obj> empty.c)
Expand Down

0 comments on commit d4fc734

Please sign in to comment.