Skip to content

Commit

Permalink
Merge pull request #564 from pbdot/ec-mac-fixes
Browse files Browse the repository at this point in the history
A few Mac fixes for local development
  • Loading branch information
pbdot authored Sep 11, 2023
2 parents 0faa492 + 44010b7 commit e97e447
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 65 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ jobs:
- name: Install dependencies
run: |
brew install sdl2
cp ${{github.workspace}}/cmake/i_sdlinc_macos_ci.h ${{github.workspace}}/source_files/edge/i_sdlinc.h
cp ${{github.workspace}}/cmake/epi_sdl_macos_ci.h ${{github.workspace}}/source_files/epi/epi_sdl.h
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
Expand Down
18 changes: 15 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": []
},
},
{
"name": "(gdb) Launch",
"type": "cppdbg",
Expand All @@ -37,6 +37,18 @@
"ignoreFailures": true
}
]
}
]
},
{
"name": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/edge-classic",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb"
},
]
}
19 changes: 12 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,21 @@ if (WIN32)
set(SDL2_DIR "${CMAKE_SOURCE_DIR}/source_files/sdl2")
endif()

if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64" AND APPLE)
add_compile_definitions(APPLE_SILICON)
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64" AND APPLE)
add_compile_definitions(NOT_APPLE_SILICON)
find_package(SDL2 REQUIRED)

if (APPLE)
include_directories(${SDL2_INCLUDE_DIR})
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64" AND APPLE)
add_compile_definitions(APPLE_SILICON)
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64" AND APPLE)
add_compile_definitions(NOT_APPLE_SILICON)
endif()
endif()
if(APPLE OR ${CMAKE_SYSTEM} MATCHES "BSD")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I /usr/local/include")

if(${CMAKE_SYSTEM} MATCHES "BSD")
include_directories("/usr/local/include")
endif()

find_package(SDL2 REQUIRED)
if (NOT EDGE_GL_ES2)
find_package(OpenGL REQUIRED)
else()
Expand Down
26 changes: 0 additions & 26 deletions cmake/epi_sdl_macos_ci.h

This file was deleted.

27 changes: 0 additions & 27 deletions cmake/i_sdlinc_macos_ci.h

This file was deleted.

0 comments on commit e97e447

Please sign in to comment.