aboutsummaryrefslogtreecommitdiff
path: root/rpcapd
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2023-06-28 18:27:10 -0700
committerGuy Harris <gharris@sonic.net>2023-06-28 18:27:10 -0700
commitce1277b087e5d6a4b243a22b923b17ef0b08ca7d (patch)
tree06c04ecaeb7296698c7869991598667a9da68025 /rpcapd
parent9cf70b0bbe2d7c2afa02c4bdd24354a79c9f8056 (diff)
Fix universal builds.
Move the stuff to figure out for what architectures to build before we do anything with rpcapd. Have that stuff decide both what architectures to build libraries for and what architectures to build executables for. Call the executables list OSX_EXECUTABLE_ARCHITECTURES rather than OSX_PROGRAM_ARCHITECTURES, to match the terminology used in the names of the "add a target" commands. Remove the not-updated-for-ARM stuff in rpcapd's CMakeLists.txt, and just use the architecture list we picked in the main CMakeLists.txt. Remove some debugging messages.
Diffstat (limited to 'rpcapd')
-rw-r--r--rpcapd/CMakeLists.txt29
1 files changed, 2 insertions, 27 deletions
diff --git a/rpcapd/CMakeLists.txt b/rpcapd/CMakeLists.txt
index 8b30be3c..28fd3c24 100644
--- a/rpcapd/CMakeLists.txt
+++ b/rpcapd/CMakeLists.txt
@@ -1,3 +1,4 @@
+message(STATUS "Running rpcapd/CMakeLists.txt")
if(UNIX)
check_function_exists(crypt HAVE_CRYPT_IN_SYSTEM_LIBRARIES)
if(HAVE_CRYPT_IN_SYSTEM_LIBRARIES)
@@ -82,34 +83,8 @@ if(WIN32 OR ((CMAKE_USE_PTHREADS_INIT OR PTHREADS_FOUND) AND HAVE_CRYPT))
# architectures for the OS on which we're doing the build.
#
if(APPLE AND "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
- #
- # Get the major version of Darwin.
- #
- string(REGEX MATCH "^([0-9]+)" SYSTEM_VERSION_MAJOR "${CMAKE_SYSTEM_VERSION}")
-
- if(SYSTEM_VERSION_MAJOR EQUAL 9)
- #
- # Leopard. Build for 32-bit x86 and 32-bit PowerPC, with
- # 32-bit x86 first.
- #
- set(OSX_PROGRAM_ARCHITECTURES "i386;ppc")
- elseif(SYSTEM_VERSION_MAJOR EQUAL 10)
- #
- # Snow Leopard. Build for x86-64 and 32-bit x86, with
- # x86-64 first.
- #
- set(OSX_PROGRAM_ARCHITECTURES "x86_64;i386")
- else()
- #
- # Post-Snow Leopard. Build only for x86-64.
- # XXX - update if and when Apple adds ARM-based Macs.
- # (You're on your own for iOS etc.)
- #
- set(OSX_PROGRAM_ARCHITECTURES "x86_64")
- endif()
-
set_target_properties(rpcapd PROPERTIES
- OSX_ARCHITECTURES "${OSX_PROGRAM_ARCHITECTURES}")
+ OSX_ARCHITECTURES "${OSX_EXECUTABLE_ARCHITECTURES}")
endif()
if(WIN32)