Skip to content

Commit 1166bac

Browse files
committed
Updating macOS CMake; building fat binary by default
1 parent b34d283 commit 1166bac

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎proj/cmake/libcinder_configure.cmake‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set( CINDER_INC_DIR "${CINDER_PATH}/include" )
77

88
if( NOT CINDER_MSW )
99
add_definitions( -Wfatal-errors )
10+
add_definitions( -DHAVE_UNISTD_H )
1011
endif()
1112

1213
list( APPEND CMAKE_MODULE_PATH ${CINDER_CMAKE_DIR} ${CMAKE_CURRENT_LIST_DIR}/modules )

‎proj/cmake/libcinder_source_files.cmake‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ if( NOT CINDER_FREETYPE_USE_SYSTEM )
397397
${CINDER_SRC_DIR}/freetype/base/fttype1.c
398398
${CINDER_SRC_DIR}/freetype/base/ftwinfnt.c
399399
${CINDER_SRC_DIR}/freetype/raster/raster.c
400+
${CINDER_SRC_DIR}/freetype/raster/rastpic.c
400401
${CINDER_SRC_DIR}/freetype/smooth/smooth.c
401402
${CINDER_SRC_DIR}/freetype/autofit/autofit.c
402403
${CINDER_SRC_DIR}/freetype/bzip2/ftbzip2.c

‎proj/cmake/platform_macosx.cmake‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ cmake_minimum_required( VERSION 3.10 FATAL_ERROR )
22

33
set( CINDER_PLATFORM "Cocoa" )
44

5+
# Build universal binaries for macOS (arm64 + x86_64) to match Xcode default behavior
6+
if( NOT CMAKE_OSX_ARCHITECTURES )
7+
set( CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "macOS architectures" FORCE )
8+
endif()
9+
510
# append mac specific source files
611
list( APPEND SRC_SET_COCOA
712
${CINDER_SRC_DIR}/cinder/CaptureImplAvFoundation.mm

0 commit comments

Comments
 (0)