Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
cmake_minimum_required(VERSION 3.14)
project(node_libuiohook)

if(APPLE)
if (NOT CMAKE_OSX_ARCHITECTURES)
set(CMAKE_OSX_ARCHITECTURES "${CMAKE_HOST_SYSTEM_PROCESSOR}")
Expand All @@ -13,6 +11,7 @@ if(APPLE)
endif()
endif()
endif()
Comment on lines 11 to 13

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot we do not use universal mac build? Can you re-evaluate this branch?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-evaluated: since this project never uses universal (multi-arch) builds, CMAKE_OSX_ARCHITECTURES is always a single value (arm64 or x86_64) — never a list like arm64;x86_64. The STREQUAL "arm64" check in CMakeLists.txt is therefore correct and reliable.

Additionally, CMAKE_OSX_DEPLOYMENT_TARGET is set before project() (lines 2–13 vs line 14), so CMake sees it during compiler/toolchain initialization — the timing concern doesn't apply here either.

No changes needed.

project(node_libuiohook)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")

Expand Down
7 changes: 0 additions & 7 deletions ci/build-osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,8 @@ then
DISTRIBUTE_DIRECTORY="distribute"
fi

if [ ! -n "${CMAKE_OSX_DEPLOYMENT_TARGET}" ]
then
echo "CMAKE_OSX_DEPLOYMENT_TARGET is not set, defaulting to 11.0"
CMAKE_OSX_DEPLOYMENT_TARGET="11.0"
fi

# Configure
cmake .. \
-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} \
-DUIOHOOKDIR=${PWD}/deps/${DEPS} \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
${NODEJS_VERSION_PARAM} \
Comment on lines 37 to 41
Expand Down
Loading