Skip to content

Commit

Permalink
Support for Apple M CPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
nico87 committed Oct 11, 2022
1 parent e91964f commit 4478d28
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
bin/
build/
doc
.vscode
*.sh
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.8)
cmake_minimum_required (VERSION 3.2)

set(CMAKE_C_COMPILER "gcc")
set(CMAKE_CXX_COMPILER "g++")
Expand Down Expand Up @@ -59,7 +59,7 @@ if(CMP_LIN)
set_target_properties(LIN_DEBUG_64 PROPERTIES SUFFIX "")
endif(CMP_LIN)

if(CMP_WIN_64)
if(CMP_WIN)
cmake_policy(SET CMP0015 NEW)
set (CMAKE_SYSTEM_NAME Windows)
set (CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
Expand All @@ -78,19 +78,20 @@ if(CMP_WIN_64)
set_target_properties(WIN_RELEASE_64 PROPERTIES PREFIX "")
set_target_properties(WIN_RELEASE_64 PROPERTIES OUTPUT_NAME "win.xpl")
set_target_properties(WIN_RELEASE_64 PROPERTIES SUFFIX "")
endif(CMP_WIN_64)
endif(CMP_WIN)

if (CMP_MAC)
cmake_policy(SET CMP0042 NEW)
set (CMAKE_SYSTEM_NAME Darwin)
set (CMAKE_CXX_COMPILER g++)
set (CMAKE_OSX_ARCHITECTURES "x86_64;arm64")

# --------------------
# Release - Mac 64
# --------------------
add_library(MAC_RELEASE_64 SHARED ${SOURCES})

target_compile_options(MAC_RELEASE_64 PRIVATE ${GCC_DEFAULT_FLAGS} -arch x86_64 -nostdinc++ -I/Library/Developer/CommandLineTools/usr/include/c++/v1 -DXPLM200 -DAPL)
target_compile_options(MAC_RELEASE_64 PRIVATE ${GCC_DEFAULT_FLAGS} -nostdinc++ -I/Library/Developer/CommandLineTools/usr/include/c++/v1 -DXPLM200 -DAPL)
target_link_libraries(MAC_RELEASE_64 "-F${SDK_PATH}/Libraries/Mac" "-framework XPLM" "-framework XPWidgets" "-framework OpenGL" "-nodefaultlibs" "-lc++" "-lc++abi" "-lm" "-lc")
set_target_properties(MAC_RELEASE_64 PROPERTIES LINK_FLAGS "-m64 -fvisibility=hidden")
set_target_properties(MAC_RELEASE_64 PROPERTIES LIBRARY_OUTPUT_DIRECTORY "../bin/Release/HeadShake/64/")
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# HeadShake plugin for X-Plane 10/11
# HeadShake plugin for X-Plane 10/11/12

HeadShake is an X-Plane camera plugin wich adds some nice POV effects while flying in virtual cockpit view.
It is free, opensource and available for Windows, Linux and Mac in both 64 and 32 bit versions.
It is free, opensource and available for Windows, Linux and Mac (Intel and M CPUs).
This plugin was developed by [SimCoders.com](https://www.simcoders.com) and maintained by the community.

# Download
Expand All @@ -24,4 +24,4 @@ cmake -DCMP_LIN=ON ..
make
```

Use `CMP_LIN=ON` to compile the Linux version, `CMP_WIN_64=ON` or `CMP_WIN_32=ON` to compile the Windows version using MinGW or `CMP_MAC=ON` to compile the Mac OSX version.
Use `CMP_LIN=ON` to compile the Linux version, `CMP_WIN=ON` to compile the Windows version using MinGW or `CMP_MAC=ON` to compile the Mac OSX version.

0 comments on commit 4478d28

Please sign in to comment.