From ddfb7f6cb0801331ed93a0be953ee42b2388747d Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sat, 11 Feb 2023 21:49:05 -0700 Subject: [PATCH] Use modern name for macOS In a few places I left references to the old name where appropriate. There are also many CMake references to "OSX" that we have to keep using since CMake does not offer alternative names for those variables and target properties. --- .github/workflows/ci.yml | 8 +- CMakeLists.txt | 40 +++---- cmake/Config.cmake | 4 +- cmake/Macros.cmake | 4 +- cmake/SFMLConfigDependencies.cmake.in | 2 +- doc/CMakeLists.txt | 2 +- examples/CMakeLists.txt | 2 +- examples/cocoa/NSString+stdstring.mm | 2 +- examples/island/CMakeLists.txt | 2 +- .../Frameworks/FLAC.framework/FLAC | 0 .../Frameworks/FLAC.framework/Resources | 0 .../Frameworks/FLAC.framework/Versions/A/FLAC | Bin .../Versions/A/Resources/Info.plist | 0 .../FLAC.framework/Versions/Current | 0 .../Frameworks/OpenAL.framework/OpenAL | 0 .../Frameworks/OpenAL.framework/Resources | 0 .../OpenAL.framework/Versions/A/OpenAL | Bin .../Versions/A/Resources/Info.plist | 0 .../OpenAL.framework/Versions/Current | 0 .../Frameworks/freetype.framework/Resources | 0 .../Versions/A/Resources/Info.plist | 0 .../freetype.framework/Versions/A/freetype | Bin .../freetype.framework/Versions/Current | 0 .../Frameworks/freetype.framework/freetype | 0 .../Frameworks/ogg.framework/Resources | 0 .../Versions/A/Resources/Info.plist | 0 .../Frameworks/ogg.framework/Versions/A/ogg | Bin .../Frameworks/ogg.framework/Versions/Current | 0 .../Frameworks/ogg.framework/ogg | 0 .../Frameworks/vorbis.framework/Resources | 0 .../Versions/A/Resources/Info.plist | 0 .../vorbis.framework/Versions/A/vorbis | Bin .../vorbis.framework/Versions/Current | 0 .../Frameworks/vorbis.framework/vorbis | 0 .../Frameworks/vorbisenc.framework/Resources | 0 .../Versions/A/Resources/Info.plist | 0 .../vorbisenc.framework/Versions/A/vorbisenc | Bin .../vorbisenc.framework/Versions/Current | 0 .../Frameworks/vorbisenc.framework/vorbisenc | 0 .../Frameworks/vorbisfile.framework/Resources | 0 .../Versions/A/Resources/Info.plist | 0 .../Versions/A/vorbisfile | Bin .../vorbisfile.framework/Versions/Current | 0 .../vorbisfile.framework/vorbisfile | 0 include/SFML/Config.hpp | 4 +- include/SFML/Window/Cursor.hpp | 46 ++++---- include/SFML/Window/WindowHandle.hpp | 8 +- src/SFML/Audio/CMakeLists.txt | 6 +- src/SFML/Audio/SoundRecorder.cpp | 2 +- src/SFML/CMakeLists.txt | 4 +- src/SFML/Graphics/CMakeLists.txt | 4 +- src/SFML/Network/Socket.cpp | 2 +- src/SFML/System/CMakeLists.txt | 2 +- src/SFML/Window/CMakeLists.txt | 104 +++++++++--------- src/SFML/Window/ClipboardImpl.hpp | 2 +- src/SFML/Window/CursorImpl.hpp | 2 +- src/SFML/Window/GlContext.cpp | 2 +- src/SFML/Window/InputImpl.hpp | 2 +- src/SFML/Window/JoystickImpl.hpp | 2 +- src/SFML/Window/SensorImpl.hpp | 2 +- src/SFML/Window/WindowImpl.cpp | 2 +- .../{OSX => macOS}/AutoreleasePoolWrapper.hpp | 0 .../{OSX => macOS}/AutoreleasePoolWrapper.mm | 2 +- .../Window/{OSX => macOS}/ClipboardImpl.hpp | 0 .../Window/{OSX => macOS}/ClipboardImpl.mm | 4 +- src/SFML/Window/{OSX => macOS}/CursorImpl.hpp | 2 +- src/SFML/Window/{OSX => macOS}/CursorImpl.mm | 6 +- .../Window/{OSX => macOS}/HIDInputManager.hpp | 0 .../Window/{OSX => macOS}/HIDInputManager.mm | 2 +- .../{OSX => macOS}/HIDJoystickManager.cpp | 4 +- .../{OSX => macOS}/HIDJoystickManager.hpp | 0 src/SFML/Window/{OSX => macOS}/InputImpl.hpp | 2 +- src/SFML/Window/{OSX => macOS}/InputImpl.mm | 8 +- .../Window/{OSX => macOS}/JoystickImpl.cpp | 6 +- .../Window/{OSX => macOS}/JoystickImpl.hpp | 2 +- src/SFML/Window/{OSX => macOS}/NSImage+raw.h | 0 src/SFML/Window/{OSX => macOS}/NSImage+raw.mm | 2 +- .../Window/{OSX => macOS}/SFApplication.h | 0 .../Window/{OSX => macOS}/SFApplication.m | 2 +- .../{OSX => macOS}/SFApplicationDelegate.h | 0 .../{OSX => macOS}/SFApplicationDelegate.m | 2 +- src/SFML/Window/{OSX => macOS}/SFContext.hpp | 2 +- src/SFML/Window/{OSX => macOS}/SFContext.mm | 6 +- .../SFKeyboardModifiersHelper.h | 0 .../SFKeyboardModifiersHelper.mm | 4 +- .../{OSX => macOS}/SFOpenGLView+keyboard.mm | 8 +- .../SFOpenGLView+keyboard_priv.h | 2 +- .../{OSX => macOS}/SFOpenGLView+mouse.mm | 6 +- .../{OSX => macOS}/SFOpenGLView+mouse_priv.h | 2 +- src/SFML/Window/{OSX => macOS}/SFOpenGLView.h | 0 .../Window/{OSX => macOS}/SFOpenGLView.mm | 8 +- .../Window/{OSX => macOS}/SFSilentResponder.h | 0 .../Window/{OSX => macOS}/SFSilentResponder.m | 2 +- .../Window/{OSX => macOS}/SFViewController.h | 2 +- .../Window/{OSX => macOS}/SFViewController.mm | 8 +- src/SFML/Window/{OSX => macOS}/SFWindow.h | 0 src/SFML/Window/{OSX => macOS}/SFWindow.m | 2 +- .../{OSX => macOS}/SFWindowController.h | 2 +- .../{OSX => macOS}/SFWindowController.mm | 14 +-- src/SFML/Window/{OSX => macOS}/Scaling.h | 2 +- src/SFML/Window/{OSX => macOS}/SensorImpl.cpp | 0 src/SFML/Window/{OSX => macOS}/SensorImpl.hpp | 2 +- .../Window/{OSX => macOS}/VideoModeImpl.cpp | 2 +- .../Window/{OSX => macOS}/WindowImplCocoa.hpp | 4 +- .../Window/{OSX => macOS}/WindowImplCocoa.mm | 18 +-- .../WindowImplDelegateProtocol.h | 0 .../{OSX => macOS}/cg_sf_conversion.hpp | 0 .../Window/{OSX => macOS}/cg_sf_conversion.mm | 4 +- .../{OSX => macOS}/cpp_objc_conversion.h | 0 .../{OSX => macOS}/cpp_objc_conversion.mm | 2 +- tools/xcode/templates/readme.txt | 4 +- 111 files changed, 205 insertions(+), 207 deletions(-) rename extlibs/{libs-osx => libs-macos}/Frameworks/FLAC.framework/FLAC (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/FLAC.framework/Resources (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/FLAC.framework/Versions/A/FLAC (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/FLAC.framework/Versions/A/Resources/Info.plist (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/FLAC.framework/Versions/Current (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/OpenAL.framework/OpenAL (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/OpenAL.framework/Resources (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/OpenAL.framework/Versions/A/OpenAL (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/OpenAL.framework/Versions/A/Resources/Info.plist (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/OpenAL.framework/Versions/Current (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/freetype.framework/Resources (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/freetype.framework/Versions/A/Resources/Info.plist (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/freetype.framework/Versions/A/freetype (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/freetype.framework/Versions/Current (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/freetype.framework/freetype (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/ogg.framework/Resources (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/ogg.framework/Versions/A/Resources/Info.plist (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/ogg.framework/Versions/A/ogg (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/ogg.framework/Versions/Current (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/ogg.framework/ogg (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbis.framework/Resources (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbis.framework/Versions/A/Resources/Info.plist (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbis.framework/Versions/A/vorbis (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbis.framework/Versions/Current (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbis.framework/vorbis (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbisenc.framework/Resources (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbisenc.framework/Versions/A/Resources/Info.plist (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbisenc.framework/Versions/A/vorbisenc (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbisenc.framework/Versions/Current (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbisenc.framework/vorbisenc (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbisfile.framework/Resources (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbisfile.framework/Versions/A/Resources/Info.plist (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbisfile.framework/Versions/A/vorbisfile (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbisfile.framework/Versions/Current (100%) rename extlibs/{libs-osx => libs-macos}/Frameworks/vorbisfile.framework/vorbisfile (100%) rename src/SFML/Window/{OSX => macOS}/AutoreleasePoolWrapper.hpp (100%) rename src/SFML/Window/{OSX => macOS}/AutoreleasePoolWrapper.mm (96%) rename src/SFML/Window/{OSX => macOS}/ClipboardImpl.hpp (100%) rename src/SFML/Window/{OSX => macOS}/ClipboardImpl.mm (95%) rename src/SFML/Window/{OSX => macOS}/CursorImpl.hpp (98%) rename src/SFML/Window/{OSX => macOS}/CursorImpl.mm (97%) rename src/SFML/Window/{OSX => macOS}/HIDInputManager.hpp (100%) rename src/SFML/Window/{OSX => macOS}/HIDInputManager.mm (99%) rename src/SFML/Window/{OSX => macOS}/HIDJoystickManager.cpp (97%) rename src/SFML/Window/{OSX => macOS}/HIDJoystickManager.hpp (100%) rename src/SFML/Window/{OSX => macOS}/InputImpl.hpp (99%) rename src/SFML/Window/{OSX => macOS}/InputImpl.mm (97%) rename src/SFML/Window/{OSX => macOS}/JoystickImpl.cpp (99%) rename src/SFML/Window/{OSX => macOS}/JoystickImpl.hpp (99%) rename src/SFML/Window/{OSX => macOS}/NSImage+raw.h (100%) rename src/SFML/Window/{OSX => macOS}/NSImage+raw.mm (98%) rename src/SFML/Window/{OSX => macOS}/SFApplication.h (100%) rename src/SFML/Window/{OSX => macOS}/SFApplication.m (99%) rename src/SFML/Window/{OSX => macOS}/SFApplicationDelegate.h (100%) rename src/SFML/Window/{OSX => macOS}/SFApplicationDelegate.m (97%) rename src/SFML/Window/{OSX => macOS}/SFContext.hpp (99%) rename src/SFML/Window/{OSX => macOS}/SFContext.mm (98%) rename src/SFML/Window/{OSX => macOS}/SFKeyboardModifiersHelper.h (100%) rename src/SFML/Window/{OSX => macOS}/SFKeyboardModifiersHelper.mm (99%) rename src/SFML/Window/{OSX => macOS}/SFOpenGLView+keyboard.mm (96%) rename src/SFML/Window/{OSX => macOS}/SFOpenGLView+keyboard_priv.h (98%) rename src/SFML/Window/{OSX => macOS}/SFOpenGLView+mouse.mm (98%) rename src/SFML/Window/{OSX => macOS}/SFOpenGLView+mouse_priv.h (98%) rename src/SFML/Window/{OSX => macOS}/SFOpenGLView.h (100%) rename src/SFML/Window/{OSX => macOS}/SFOpenGLView.mm (98%) rename src/SFML/Window/{OSX => macOS}/SFSilentResponder.h (100%) rename src/SFML/Window/{OSX => macOS}/SFSilentResponder.m (96%) rename src/SFML/Window/{OSX => macOS}/SFViewController.h (97%) rename src/SFML/Window/{OSX => macOS}/SFViewController.mm (97%) rename src/SFML/Window/{OSX => macOS}/SFWindow.h (100%) rename src/SFML/Window/{OSX => macOS}/SFWindow.m (99%) rename src/SFML/Window/{OSX => macOS}/SFWindowController.h (98%) rename src/SFML/Window/{OSX => macOS}/SFWindowController.mm (98%) rename src/SFML/Window/{OSX => macOS}/Scaling.h (98%) rename src/SFML/Window/{OSX => macOS}/SensorImpl.cpp (100%) rename src/SFML/Window/{OSX => macOS}/SensorImpl.hpp (98%) rename src/SFML/Window/{OSX => macOS}/VideoModeImpl.cpp (98%) rename src/SFML/Window/{OSX => macOS}/WindowImplCocoa.hpp (99%) rename src/SFML/Window/{OSX => macOS}/WindowImplCocoa.mm (97%) rename src/SFML/Window/{OSX => macOS}/WindowImplDelegateProtocol.h (100%) rename src/SFML/Window/{OSX => macOS}/cg_sf_conversion.hpp (100%) rename src/SFML/Window/{OSX => macOS}/cg_sf_conversion.mm (97%) rename src/SFML/Window/{OSX => macOS}/cpp_objc_conversion.h (100%) rename src/SFML/Window/{OSX => macOS}/cpp_objc_conversion.mm (97%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2973ebb4..2d7f85f74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,8 +29,8 @@ jobs: - { name: Linux GCC, os: ubuntu-22.04, flags: -DSFML_RUN_DISPLAY_TESTS=ON -GNinja } - { name: Linux Clang, os: ubuntu-22.04, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSFML_RUN_DISPLAY_TESTS=ON -GNinja , gcovr_options: '--gcov-executable="llvm-cov-$CLANG_VERSION gcov"' } - { name: Linux Intel oneAPI, os: ubuntu-22.04, flags: -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -GNinja } - - { name: MacOS, os: macos-12, flags: -GNinja } - - { name: MacOS Xcode, os: macos-12, flags: -GXcode } + - { name: macOS, os: macos-12, flags: -GNinja } + - { name: macOS Xcode, os: macos-12, flags: -GXcode } - { name: iOS, os: macos-12, flags: -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 } - { name: iOS Xcode, os: macos-12, flags: -DCMAKE_SYSTEM_NAME=iOS -GXcode -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO } config: @@ -59,7 +59,7 @@ jobs: - platform: { name: Windows VS2022, os: windows-2022 } config: { name: OpenGL ES, flags: -DSFML_USE_MESA3D=TRUE -DBUILD_SHARED_LIBS=TRUE -DSFML_OPENGL_ES=ON } type: { name: Debug, flags: -DCMAKE_BUILD_TYPE=Debug -DSFML_ENABLE_COVERAGE=TRUE } - - platform: { name: MacOS, os: macos-12 } + - platform: { name: macOS, os: macos-12 } config: { name: Frameworks, flags: -GNinja -DSFML_BUILD_FRAMEWORKS=TRUE -DBUILD_SHARED_LIBS=TRUE } - platform: { name: Android, os: ubuntu-22.04 } config: { name: x86, flags: -GNinja -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_ANDROID_NDK=$GITHUB_WORKSPACE/android-ndk-r23b -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26 } @@ -73,7 +73,7 @@ jobs: config: { name: Static DRM, flags: -GNinja -DBUILD_SHARED_LIBS=FALSE -DSFML_USE_DRM=TRUE -DSFML_RUN_DISPLAY_TESTS=FALSE } - platform: { name: Linux GCC, os: ubuntu-22.04 } config: { name: Shared DRM, flags: -GNinja -DBUILD_SHARED_LIBS=TRUE -DSFML_USE_DRM=TRUE -DSFML_RUN_DISPLAY_TESTS=FALSE } - - platform: { name: MacOS , os: macos-12 } + - platform: { name: macOS , os: macos-12 } config: { name: System Deps, flags: -GNinja -DBUILD_SHARED_LIBS=TRUE -DSFML_USE_SYSTEM_DEPS=TRUE } steps: - name: Checkout Code diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e8a55fa6..05d19c287 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,7 +58,7 @@ if(SFML_BUILD_WINDOW) endif() # macOS specific options -if(SFML_OS_MACOSX OR SFML_OS_IOS) +if(SFML_OS_MACOS OR SFML_OS_IOS) # add an option to build frameworks instead of dylibs (release only) sfml_set_option(SFML_BUILD_FRAMEWORKS FALSE BOOL "TRUE to build SFML as frameworks libraries (release only), FALSE to build according to BUILD_SHARED_LIBS") @@ -115,7 +115,7 @@ if(SFML_OS_WINDOWS OR SFML_OS_IOS) set(DEFAULT_INSTALL_MISC_DIR .) elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD) set(DEFAULT_INSTALL_MISC_DIR share/SFML) -elseif(SFML_OS_MACOSX) +elseif(SFML_OS_MACOS) set(DEFAULT_INSTALL_MISC_DIR /usr/local/share/SFML) elseif(SFML_OS_ANDROID) set(DEFAULT_INSTALL_MISC_DIR ${CMAKE_ANDROID_NDK}/sources/third_party/sfml) @@ -186,8 +186,8 @@ if(SFML_OS_WINDOWS) include(cmake/Mesa3D.cmake) endif() -# setup Mac OS X stuff -if(SFML_OS_MACOSX) +# setup macOS stuff +if(SFML_OS_MACOS) # SFML_BUILD_FRAMEWORKS needs two things: # first, it's available only for release # (because cmake currently doesn't allow specifying a custom framework name so XXX-d is not possible) @@ -249,8 +249,8 @@ if(SFML_ENABLE_PCH AND BUILD_SHARED_LIBS) message(FATAL_ERROR "Precompiled headers are currently not supported for shared library builds") endif() -if(SFML_ENABLE_PCH AND SFML_OS_MACOSX) - message(FATAL_ERROR "Precompiled headers are currently not supported in MacOS builds") +if(SFML_ENABLE_PCH AND SFML_OS_MACOS) + message(FATAL_ERROR "Precompiled headers are currently not supported in macOS builds") endif() # setup the install rules @@ -389,36 +389,36 @@ if(SFML_OS_WINDOWS) endif() endif() -elseif(SFML_OS_MACOSX) +elseif(SFML_OS_MACOS) # install extlibs dependencies only when used if(SFML_BUILD_GRAPHICS) - if(FREETYPE_LIBRARY STREQUAL "${PROJECT_SOURCE_DIR}/extlibs/libs-osx/Frameworks/freetype.framework") - install(DIRECTORY extlibs/libs-osx/Frameworks/freetype.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) + if(FREETYPE_LIBRARY STREQUAL "${PROJECT_SOURCE_DIR}/extlibs/libs-macos/Frameworks/freetype.framework") + install(DIRECTORY extlibs/libs-macos/Frameworks/freetype.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() endif() if(SFML_BUILD_AUDIO) - if(FLAC_LIBRARY STREQUAL "${PROJECT_SOURCE_DIR}/extlibs/libs-osx/Frameworks/FLAC.framework") - install(DIRECTORY extlibs/libs-osx/Frameworks/FLAC.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) + if(FLAC_LIBRARY STREQUAL "${PROJECT_SOURCE_DIR}/extlibs/libs-macos/Frameworks/FLAC.framework") + install(DIRECTORY extlibs/libs-macos/Frameworks/FLAC.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() - if(OGG_LIBRARY STREQUAL "${PROJECT_SOURCE_DIR}/extlibs/libs-osx/Frameworks/ogg.framework") - install(DIRECTORY extlibs/libs-osx/Frameworks/ogg.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) + if(OGG_LIBRARY STREQUAL "${PROJECT_SOURCE_DIR}/extlibs/libs-macos/Frameworks/ogg.framework") + install(DIRECTORY extlibs/libs-macos/Frameworks/ogg.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() - if(VORBIS_LIBRARY STREQUAL "${PROJECT_SOURCE_DIR}/extlibs/libs-osx/Frameworks/vorbis.framework") - install(DIRECTORY extlibs/libs-osx/Frameworks/vorbis.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) + if(VORBIS_LIBRARY STREQUAL "${PROJECT_SOURCE_DIR}/extlibs/libs-macos/Frameworks/vorbis.framework") + install(DIRECTORY extlibs/libs-macos/Frameworks/vorbis.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() - if(VORBISENC_LIBRARY STREQUAL "${PROJECT_SOURCE_DIR}/extlibs/libs-osx/Frameworks/vorbisenc.framework") - install(DIRECTORY extlibs/libs-osx/Frameworks/vorbisenc.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) + if(VORBISENC_LIBRARY STREQUAL "${PROJECT_SOURCE_DIR}/extlibs/libs-macos/Frameworks/vorbisenc.framework") + install(DIRECTORY extlibs/libs-macos/Frameworks/vorbisenc.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() - if(VORBISFILE_LIBRARY STREQUAL "${PROJECT_SOURCE_DIR}/extlibs/libs-osx/Frameworks/vorbisfile.framework") - install(DIRECTORY extlibs/libs-osx/Frameworks/vorbisfile.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) + if(VORBISFILE_LIBRARY STREQUAL "${PROJECT_SOURCE_DIR}/extlibs/libs-macos/Frameworks/vorbisfile.framework") + install(DIRECTORY extlibs/libs-macos/Frameworks/vorbisfile.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() - if(OPENAL_LIBRARY STREQUAL "${PROJECT_SOURCE_DIR}/extlibs/libs-osx/Frameworks/OpenAL.framework") + if(OPENAL_LIBRARY STREQUAL "${PROJECT_SOURCE_DIR}/extlibs/libs-macos/Frameworks/OpenAL.framework") install(DIRECTORY "${OPENAL_LIBRARY}" DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() endif() diff --git a/cmake/Config.cmake b/cmake/Config.cmake index ec23c7f27..cd10b98a1 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake @@ -50,8 +50,8 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "iOS") # use the OpenGL ES implementation on iOS set(OPENGL_ES 1) elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") - set(SFML_OS_MACOSX 1) - # don't use the OpenGL ES implementation on Mac OS X + set(SFML_OS_MACOS 1) + # don't use the OpenGL ES implementation on macOS set(OPENGL_ES 0) elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Android") set(SFML_OS_ANDROID 1) diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index dd193f28a..947dfacf2 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -28,7 +28,7 @@ function(sfml_set_stdlib target) endif() endif() - if(SFML_OS_MACOSX) + if(SFML_OS_MACOS) if(${CMAKE_GENERATOR} MATCHES "Xcode") sfml_set_xcode_property(${target} CLANG_CXX_LIBRARY "libc++") elseif(NOT SFML_COMPILER_CLANG) @@ -193,7 +193,7 @@ macro(sfml_add_library module) endif() # build frameworks or dylibs - if((SFML_OS_MACOSX OR SFML_OS_IOS) AND BUILD_SHARED_LIBS AND NOT THIS_STATIC) + if((SFML_OS_MACOS OR SFML_OS_IOS) AND BUILD_SHARED_LIBS AND NOT THIS_STATIC) if(SFML_BUILD_FRAMEWORKS) # adapt target to build frameworks instead of dylibs set_target_properties(${target} PROPERTIES diff --git a/cmake/SFMLConfigDependencies.cmake.in b/cmake/SFMLConfigDependencies.cmake.in index 3d5161fcf..532ffe2f1 100644 --- a/cmake/SFMLConfigDependencies.cmake.in +++ b/cmake/SFMLConfigDependencies.cmake.in @@ -16,7 +16,7 @@ if(SFML_STATIC_LIBRARIES) elseif(${CMAKE_SYSTEM_NAME} MATCHES "iOS") set(FIND_SFML_OS_IOS 1) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(FIND_SFML_OS_MACOSX 1) + set(FIND_SFML_OS_MACOS 1) endif() # start with an empty list diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 03fe81db8..baf29fda6 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,6 +1,6 @@ # find doxygen -if(SFML_OS_MACOSX) +if(SFML_OS_MACOS) # Add some path to search doxygen in more directories. set(ADDITIONAL_PATHS /Developer/Applications/Doxygen.app/Contents/Resources diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 67b4a7f32..db15f04a7 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -34,7 +34,7 @@ if(SFML_BUILD_GRAPHICS) if(NOT SFML_USE_DRM) add_subdirectory(X11) endif() - elseif(SFML_OS_MACOSX AND ${CMAKE_GENERATOR} MATCHES "Xcode") + elseif(SFML_OS_MACOS AND ${CMAKE_GENERATOR} MATCHES "Xcode") add_subdirectory(cocoa) endif() endif() diff --git a/examples/cocoa/NSString+stdstring.mm b/examples/cocoa/NSString+stdstring.mm index 92da07778..852966c28 100644 --- a/examples/cocoa/NSString+stdstring.mm +++ b/examples/cocoa/NSString+stdstring.mm @@ -64,7 +64,7 @@ - (std::wstring)tostdwstring { - // According to Wikipedia, Mac OS X is Little Endian on x86 and x86-64 + // According to Wikipedia, macOS is Little Endian on x86 and x86-64 // https://en.wikipedia.org/wiki/Endianness NSData* asData = [self dataUsingEncoding:NSUTF32LittleEndianStringEncoding]; return std::wstring(static_cast([asData bytes]), [asData length] / sizeof(wchar_t)); diff --git a/examples/island/CMakeLists.txt b/examples/island/CMakeLists.txt index 1cae7a97a..25ab69c77 100644 --- a/examples/island/CMakeLists.txt +++ b/examples/island/CMakeLists.txt @@ -11,6 +11,6 @@ sfml_add_example(island GUI_APP target_include_directories(island SYSTEM PRIVATE ${PROJECT_SOURCE_DIR}/examples/island) # link against pthread -if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_MACOSX) +if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_MACOS) target_link_libraries(island PRIVATE pthread) endif() diff --git a/extlibs/libs-osx/Frameworks/FLAC.framework/FLAC b/extlibs/libs-macos/Frameworks/FLAC.framework/FLAC similarity index 100% rename from extlibs/libs-osx/Frameworks/FLAC.framework/FLAC rename to extlibs/libs-macos/Frameworks/FLAC.framework/FLAC diff --git a/extlibs/libs-osx/Frameworks/FLAC.framework/Resources b/extlibs/libs-macos/Frameworks/FLAC.framework/Resources similarity index 100% rename from extlibs/libs-osx/Frameworks/FLAC.framework/Resources rename to extlibs/libs-macos/Frameworks/FLAC.framework/Resources diff --git a/extlibs/libs-osx/Frameworks/FLAC.framework/Versions/A/FLAC b/extlibs/libs-macos/Frameworks/FLAC.framework/Versions/A/FLAC similarity index 100% rename from extlibs/libs-osx/Frameworks/FLAC.framework/Versions/A/FLAC rename to extlibs/libs-macos/Frameworks/FLAC.framework/Versions/A/FLAC diff --git a/extlibs/libs-osx/Frameworks/FLAC.framework/Versions/A/Resources/Info.plist b/extlibs/libs-macos/Frameworks/FLAC.framework/Versions/A/Resources/Info.plist similarity index 100% rename from extlibs/libs-osx/Frameworks/FLAC.framework/Versions/A/Resources/Info.plist rename to extlibs/libs-macos/Frameworks/FLAC.framework/Versions/A/Resources/Info.plist diff --git a/extlibs/libs-osx/Frameworks/FLAC.framework/Versions/Current b/extlibs/libs-macos/Frameworks/FLAC.framework/Versions/Current similarity index 100% rename from extlibs/libs-osx/Frameworks/FLAC.framework/Versions/Current rename to extlibs/libs-macos/Frameworks/FLAC.framework/Versions/Current diff --git a/extlibs/libs-osx/Frameworks/OpenAL.framework/OpenAL b/extlibs/libs-macos/Frameworks/OpenAL.framework/OpenAL similarity index 100% rename from extlibs/libs-osx/Frameworks/OpenAL.framework/OpenAL rename to extlibs/libs-macos/Frameworks/OpenAL.framework/OpenAL diff --git a/extlibs/libs-osx/Frameworks/OpenAL.framework/Resources b/extlibs/libs-macos/Frameworks/OpenAL.framework/Resources similarity index 100% rename from extlibs/libs-osx/Frameworks/OpenAL.framework/Resources rename to extlibs/libs-macos/Frameworks/OpenAL.framework/Resources diff --git a/extlibs/libs-osx/Frameworks/OpenAL.framework/Versions/A/OpenAL b/extlibs/libs-macos/Frameworks/OpenAL.framework/Versions/A/OpenAL similarity index 100% rename from extlibs/libs-osx/Frameworks/OpenAL.framework/Versions/A/OpenAL rename to extlibs/libs-macos/Frameworks/OpenAL.framework/Versions/A/OpenAL diff --git a/extlibs/libs-osx/Frameworks/OpenAL.framework/Versions/A/Resources/Info.plist b/extlibs/libs-macos/Frameworks/OpenAL.framework/Versions/A/Resources/Info.plist similarity index 100% rename from extlibs/libs-osx/Frameworks/OpenAL.framework/Versions/A/Resources/Info.plist rename to extlibs/libs-macos/Frameworks/OpenAL.framework/Versions/A/Resources/Info.plist diff --git a/extlibs/libs-osx/Frameworks/OpenAL.framework/Versions/Current b/extlibs/libs-macos/Frameworks/OpenAL.framework/Versions/Current similarity index 100% rename from extlibs/libs-osx/Frameworks/OpenAL.framework/Versions/Current rename to extlibs/libs-macos/Frameworks/OpenAL.framework/Versions/Current diff --git a/extlibs/libs-osx/Frameworks/freetype.framework/Resources b/extlibs/libs-macos/Frameworks/freetype.framework/Resources similarity index 100% rename from extlibs/libs-osx/Frameworks/freetype.framework/Resources rename to extlibs/libs-macos/Frameworks/freetype.framework/Resources diff --git a/extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/Resources/Info.plist b/extlibs/libs-macos/Frameworks/freetype.framework/Versions/A/Resources/Info.plist similarity index 100% rename from extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/Resources/Info.plist rename to extlibs/libs-macos/Frameworks/freetype.framework/Versions/A/Resources/Info.plist diff --git a/extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/freetype b/extlibs/libs-macos/Frameworks/freetype.framework/Versions/A/freetype similarity index 100% rename from extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/freetype rename to extlibs/libs-macos/Frameworks/freetype.framework/Versions/A/freetype diff --git a/extlibs/libs-osx/Frameworks/freetype.framework/Versions/Current b/extlibs/libs-macos/Frameworks/freetype.framework/Versions/Current similarity index 100% rename from extlibs/libs-osx/Frameworks/freetype.framework/Versions/Current rename to extlibs/libs-macos/Frameworks/freetype.framework/Versions/Current diff --git a/extlibs/libs-osx/Frameworks/freetype.framework/freetype b/extlibs/libs-macos/Frameworks/freetype.framework/freetype similarity index 100% rename from extlibs/libs-osx/Frameworks/freetype.framework/freetype rename to extlibs/libs-macos/Frameworks/freetype.framework/freetype diff --git a/extlibs/libs-osx/Frameworks/ogg.framework/Resources b/extlibs/libs-macos/Frameworks/ogg.framework/Resources similarity index 100% rename from extlibs/libs-osx/Frameworks/ogg.framework/Resources rename to extlibs/libs-macos/Frameworks/ogg.framework/Resources diff --git a/extlibs/libs-osx/Frameworks/ogg.framework/Versions/A/Resources/Info.plist b/extlibs/libs-macos/Frameworks/ogg.framework/Versions/A/Resources/Info.plist similarity index 100% rename from extlibs/libs-osx/Frameworks/ogg.framework/Versions/A/Resources/Info.plist rename to extlibs/libs-macos/Frameworks/ogg.framework/Versions/A/Resources/Info.plist diff --git a/extlibs/libs-osx/Frameworks/ogg.framework/Versions/A/ogg b/extlibs/libs-macos/Frameworks/ogg.framework/Versions/A/ogg similarity index 100% rename from extlibs/libs-osx/Frameworks/ogg.framework/Versions/A/ogg rename to extlibs/libs-macos/Frameworks/ogg.framework/Versions/A/ogg diff --git a/extlibs/libs-osx/Frameworks/ogg.framework/Versions/Current b/extlibs/libs-macos/Frameworks/ogg.framework/Versions/Current similarity index 100% rename from extlibs/libs-osx/Frameworks/ogg.framework/Versions/Current rename to extlibs/libs-macos/Frameworks/ogg.framework/Versions/Current diff --git a/extlibs/libs-osx/Frameworks/ogg.framework/ogg b/extlibs/libs-macos/Frameworks/ogg.framework/ogg similarity index 100% rename from extlibs/libs-osx/Frameworks/ogg.framework/ogg rename to extlibs/libs-macos/Frameworks/ogg.framework/ogg diff --git a/extlibs/libs-osx/Frameworks/vorbis.framework/Resources b/extlibs/libs-macos/Frameworks/vorbis.framework/Resources similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbis.framework/Resources rename to extlibs/libs-macos/Frameworks/vorbis.framework/Resources diff --git a/extlibs/libs-osx/Frameworks/vorbis.framework/Versions/A/Resources/Info.plist b/extlibs/libs-macos/Frameworks/vorbis.framework/Versions/A/Resources/Info.plist similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbis.framework/Versions/A/Resources/Info.plist rename to extlibs/libs-macos/Frameworks/vorbis.framework/Versions/A/Resources/Info.plist diff --git a/extlibs/libs-osx/Frameworks/vorbis.framework/Versions/A/vorbis b/extlibs/libs-macos/Frameworks/vorbis.framework/Versions/A/vorbis similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbis.framework/Versions/A/vorbis rename to extlibs/libs-macos/Frameworks/vorbis.framework/Versions/A/vorbis diff --git a/extlibs/libs-osx/Frameworks/vorbis.framework/Versions/Current b/extlibs/libs-macos/Frameworks/vorbis.framework/Versions/Current similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbis.framework/Versions/Current rename to extlibs/libs-macos/Frameworks/vorbis.framework/Versions/Current diff --git a/extlibs/libs-osx/Frameworks/vorbis.framework/vorbis b/extlibs/libs-macos/Frameworks/vorbis.framework/vorbis similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbis.framework/vorbis rename to extlibs/libs-macos/Frameworks/vorbis.framework/vorbis diff --git a/extlibs/libs-osx/Frameworks/vorbisenc.framework/Resources b/extlibs/libs-macos/Frameworks/vorbisenc.framework/Resources similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbisenc.framework/Resources rename to extlibs/libs-macos/Frameworks/vorbisenc.framework/Resources diff --git a/extlibs/libs-osx/Frameworks/vorbisenc.framework/Versions/A/Resources/Info.plist b/extlibs/libs-macos/Frameworks/vorbisenc.framework/Versions/A/Resources/Info.plist similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbisenc.framework/Versions/A/Resources/Info.plist rename to extlibs/libs-macos/Frameworks/vorbisenc.framework/Versions/A/Resources/Info.plist diff --git a/extlibs/libs-osx/Frameworks/vorbisenc.framework/Versions/A/vorbisenc b/extlibs/libs-macos/Frameworks/vorbisenc.framework/Versions/A/vorbisenc similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbisenc.framework/Versions/A/vorbisenc rename to extlibs/libs-macos/Frameworks/vorbisenc.framework/Versions/A/vorbisenc diff --git a/extlibs/libs-osx/Frameworks/vorbisenc.framework/Versions/Current b/extlibs/libs-macos/Frameworks/vorbisenc.framework/Versions/Current similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbisenc.framework/Versions/Current rename to extlibs/libs-macos/Frameworks/vorbisenc.framework/Versions/Current diff --git a/extlibs/libs-osx/Frameworks/vorbisenc.framework/vorbisenc b/extlibs/libs-macos/Frameworks/vorbisenc.framework/vorbisenc similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbisenc.framework/vorbisenc rename to extlibs/libs-macos/Frameworks/vorbisenc.framework/vorbisenc diff --git a/extlibs/libs-osx/Frameworks/vorbisfile.framework/Resources b/extlibs/libs-macos/Frameworks/vorbisfile.framework/Resources similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbisfile.framework/Resources rename to extlibs/libs-macos/Frameworks/vorbisfile.framework/Resources diff --git a/extlibs/libs-osx/Frameworks/vorbisfile.framework/Versions/A/Resources/Info.plist b/extlibs/libs-macos/Frameworks/vorbisfile.framework/Versions/A/Resources/Info.plist similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbisfile.framework/Versions/A/Resources/Info.plist rename to extlibs/libs-macos/Frameworks/vorbisfile.framework/Versions/A/Resources/Info.plist diff --git a/extlibs/libs-osx/Frameworks/vorbisfile.framework/Versions/A/vorbisfile b/extlibs/libs-macos/Frameworks/vorbisfile.framework/Versions/A/vorbisfile similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbisfile.framework/Versions/A/vorbisfile rename to extlibs/libs-macos/Frameworks/vorbisfile.framework/Versions/A/vorbisfile diff --git a/extlibs/libs-osx/Frameworks/vorbisfile.framework/Versions/Current b/extlibs/libs-macos/Frameworks/vorbisfile.framework/Versions/Current similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbisfile.framework/Versions/Current rename to extlibs/libs-macos/Frameworks/vorbisfile.framework/Versions/Current diff --git a/extlibs/libs-osx/Frameworks/vorbisfile.framework/vorbisfile b/extlibs/libs-macos/Frameworks/vorbisfile.framework/vorbisfile similarity index 100% rename from extlibs/libs-osx/Frameworks/vorbisfile.framework/vorbisfile rename to extlibs/libs-macos/Frameworks/vorbisfile.framework/vorbisfile diff --git a/include/SFML/Config.hpp b/include/SFML/Config.hpp index 4c32e941e..3d4d94e98 100644 --- a/include/SFML/Config.hpp +++ b/include/SFML/Config.hpp @@ -58,7 +58,7 @@ #elif TARGET_OS_MAC -// MacOS +// macOS #define SFML_SYSTEM_MACOS #else @@ -139,7 +139,7 @@ #endif -#else // Linux, FreeBSD, Mac OS X +#else // Linux, FreeBSD, macOS #define SFML_API_EXPORT __attribute__((__visibility__("default"))) #define SFML_API_IMPORT __attribute__((__visibility__("default"))) diff --git a/include/SFML/Window/Cursor.hpp b/include/SFML/Window/Cursor.hpp index d2a43a47a..f0ab15e1f 100644 --- a/include/SFML/Window/Cursor.hpp +++ b/include/SFML/Window/Cursor.hpp @@ -55,29 +55,29 @@ public: /// Refer to the following table to determine which cursor /// is available on which platform. /// - /// Type | Linux | Mac OS X | Windows | - /// ------------------------------------|:-----:|:--------:|:--------:| - /// sf::Cursor::Arrow | yes | yes | yes | - /// sf::Cursor::ArrowWait | no | no | yes | - /// sf::Cursor::Wait | yes | no | yes | - /// sf::Cursor::Text | yes | yes | yes | - /// sf::Cursor::Hand | yes | yes | yes | - /// sf::Cursor::SizeHorizontal | yes | yes | yes | - /// sf::Cursor::SizeVertical | yes | yes | yes | - /// sf::Cursor::SizeTopLeftBottomRight | no | yes* | yes | - /// sf::Cursor::SizeBottomLeftTopRight | no | yes* | yes | - /// sf::Cursor::SizeLeft | yes | yes** | yes** | - /// sf::Cursor::SizeRight | yes | yes** | yes** | - /// sf::Cursor::SizeTop | yes | yes** | yes** | - /// sf::Cursor::SizeBottom | yes | yes** | yes** | - /// sf::Cursor::SizeTopLeft | yes | yes** | yes** | - /// sf::Cursor::SizeTopRight | yes | yes** | yes** | - /// sf::Cursor::SizeBottomLeft | yes | yes** | yes** | - /// sf::Cursor::SizeBottomRight | yes | yes** | yes** | - /// sf::Cursor::SizeAll | yes | no | yes | - /// sf::Cursor::Cross | yes | yes | yes | - /// sf::Cursor::Help | yes | yes* | yes | - /// sf::Cursor::NotAllowed | yes | yes | yes | + /// Type | Linux | macOS | Windows | + /// ------------------------------------|:-----:|:-----:|:--------:| + /// sf::Cursor::Arrow | yes | yes | yes | + /// sf::Cursor::ArrowWait | no | no | yes | + /// sf::Cursor::Wait | yes | no | yes | + /// sf::Cursor::Text | yes | yes | yes | + /// sf::Cursor::Hand | yes | yes | yes | + /// sf::Cursor::SizeHorizontal | yes | yes | yes | + /// sf::Cursor::SizeVertical | yes | yes | yes | + /// sf::Cursor::SizeTopLeftBottomRight | no | yes* | yes | + /// sf::Cursor::SizeBottomLeftTopRight | no | yes* | yes | + /// sf::Cursor::SizeLeft | yes | yes** | yes** | + /// sf::Cursor::SizeRight | yes | yes** | yes** | + /// sf::Cursor::SizeTop | yes | yes** | yes** | + /// sf::Cursor::SizeBottom | yes | yes** | yes** | + /// sf::Cursor::SizeTopLeft | yes | yes** | yes** | + /// sf::Cursor::SizeTopRight | yes | yes** | yes** | + /// sf::Cursor::SizeBottomLeft | yes | yes** | yes** | + /// sf::Cursor::SizeBottomRight | yes | yes** | yes** | + /// sf::Cursor::SizeAll | yes | no | yes | + /// sf::Cursor::Cross | yes | yes | yes | + /// sf::Cursor::Help | yes | yes* | yes | + /// sf::Cursor::NotAllowed | yes | yes | yes | /// /// * These cursor types are undocumented so may not /// be available on all versions, but have been tested on 10.13 diff --git a/include/SFML/Window/WindowHandle.hpp b/include/SFML/Window/WindowHandle.hpp index 6f5e7d801..041424d4e 100644 --- a/include/SFML/Window/WindowHandle.hpp +++ b/include/SFML/Window/WindowHandle.hpp @@ -49,7 +49,7 @@ using WindowHandle = unsigned long; #elif defined(SFML_SYSTEM_MACOS) -// Window handle is NSWindow or NSView (void*) on Mac OS X - Cocoa +// Window handle is NSWindow or NSView (void*) on macOS - Cocoa using WindowHandle = void*; #elif defined(SFML_SYSTEM_IOS) @@ -83,13 +83,13 @@ using WindowHandle = "platform-specific"; /// ----------------|------------------------------------------------------------ /// Windows | \p HWND /// Linux/FreeBSD | \p %Window -/// Mac OS X | either \p NSWindow* or \p NSView*, disguised as \p void* +/// macOS | either \p NSWindow* or \p NSView*, disguised as \p void* /// iOS | \p UIWindow* /// Android | \p ANativeWindow* /// -/// \par Mac OS X Specification +/// \par macOS Specification /// -/// On Mac OS X, a sf::Window can be created either from an +/// On macOS, a sf::Window can be created either from an /// existing \p NSWindow* or an \p NSView*. When the window /// is created from a window, SFML will use its content view /// as the OpenGL area. sf::Window::getSystemHandle() will diff --git a/src/SFML/Audio/CMakeLists.txt b/src/SFML/Audio/CMakeLists.txt index a6322ed6a..505807483 100644 --- a/src/SFML/Audio/CMakeLists.txt +++ b/src/SFML/Audio/CMakeLists.txt @@ -57,11 +57,11 @@ set(CODECS_SRC ) source_group("codecs" FILES ${CODECS_SRC}) -# let CMake know about our additional audio libraries paths (on Windows and OSX) +# let CMake know about our additional audio libraries paths (on Windows and macOS) if(SFML_OS_WINDOWS) list(APPEND CMAKE_INCLUDE_PATH "${PROJECT_SOURCE_DIR}/extlibs/headers/AL") -elseif(SFML_OS_MACOSX) - list(APPEND CMAKE_LIBRARY_PATH "${PROJECT_SOURCE_DIR}/extlibs/libs-osx/Frameworks") +elseif(SFML_OS_MACOS) + list(APPEND CMAKE_LIBRARY_PATH "${PROJECT_SOURCE_DIR}/extlibs/libs-macos/Frameworks") elseif(SFML_OS_ANDROID) list(APPEND CMAKE_INCLUDE_PATH "${PROJECT_SOURCE_DIR}/extlibs/headers/AL") list(APPEND CMAKE_INCLUDE_PATH "${PROJECT_SOURCE_DIR}/extlibs/android") diff --git a/src/SFML/Audio/SoundRecorder.cpp b/src/SFML/Audio/SoundRecorder.cpp index cc5d865bd..ee657350d 100644 --- a/src/SFML/Audio/SoundRecorder.cpp +++ b/src/SFML/Audio/SoundRecorder.cpp @@ -246,7 +246,7 @@ unsigned int SoundRecorder::getChannelCount() const bool SoundRecorder::isAvailable() { return (priv::AudioDevice::isExtensionSupported("ALC_EXT_CAPTURE") != AL_FALSE) || - (priv::AudioDevice::isExtensionSupported("ALC_EXT_capture") != AL_FALSE); // "bug" in Mac OS X 10.5 and 10.6 + (priv::AudioDevice::isExtensionSupported("ALC_EXT_capture") != AL_FALSE); // "bug" in macOS 10.5 and 10.6 } diff --git a/src/SFML/CMakeLists.txt b/src/SFML/CMakeLists.txt index 08d7c8e9a..ad8da4419 100644 --- a/src/SFML/CMakeLists.txt +++ b/src/SFML/CMakeLists.txt @@ -20,9 +20,9 @@ if(SFML_OS_WINDOWS) list(APPEND CMAKE_LIBRARY_PATH "${PROJECT_SOURCE_DIR}/extlibs/libs-msvc-universal/x64") endif() endif() -elseif(SFML_OS_MACOSX) +elseif(SFML_OS_MACOS) list(APPEND CMAKE_INCLUDE_PATH "${PROJECT_SOURCE_DIR}/extlibs/headers") - list(APPEND CMAKE_LIBRARY_PATH "${PROJECT_SOURCE_DIR}/extlibs/libs-osx/lib/") + list(APPEND CMAKE_LIBRARY_PATH "${PROJECT_SOURCE_DIR}/extlibs/libs-macos/lib/") elseif(SFML_OS_IOS) list(APPEND CMAKE_INCLUDE_PATH "${PROJECT_SOURCE_DIR}/extlibs/headers") list(APPEND CMAKE_LIBRARY_PATH "${PROJECT_SOURCE_DIR}/extlibs/libs-ios/") diff --git a/src/SFML/Graphics/CMakeLists.txt b/src/SFML/Graphics/CMakeLists.txt index c706e998d..984f997c7 100644 --- a/src/SFML/Graphics/CMakeLists.txt +++ b/src/SFML/Graphics/CMakeLists.txt @@ -101,9 +101,9 @@ target_include_directories(sfml-graphics SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/e # let CMake know about our additional graphics libraries paths if(SFML_OS_WINDOWS) list(APPEND CMAKE_INCLUDE_PATH "${PROJECT_SOURCE_DIR}/extlibs/headers/freetype2") -elseif(SFML_OS_MACOSX) +elseif(SFML_OS_MACOS) list(APPEND CMAKE_INCLUDE_PATH "${PROJECT_SOURCE_DIR}/extlibs/headers/freetype2") - list(APPEND CMAKE_LIBRARY_PATH "${PROJECT_SOURCE_DIR}/extlibs/libs-osx/Frameworks") + list(APPEND CMAKE_LIBRARY_PATH "${PROJECT_SOURCE_DIR}/extlibs/libs-macos/Frameworks") elseif(SFML_OS_IOS) list(APPEND CMAKE_INCLUDE_PATH "${PROJECT_SOURCE_DIR}/extlibs/headers/freetype2") elseif(SFML_OS_ANDROID) diff --git a/src/SFML/Network/Socket.cpp b/src/SFML/Network/Socket.cpp index 29de86894..db73b8cc8 100644 --- a/src/SFML/Network/Socket.cpp +++ b/src/SFML/Network/Socket.cpp @@ -115,7 +115,7 @@ void Socket::create(SocketHandle handle) << "all your TCP packets will be buffered" << std::endl; } -// On Mac OS X, disable the SIGPIPE signal on disconnection +// On macOS, disable the SIGPIPE signal on disconnection #ifdef SFML_SYSTEM_MACOS if (setsockopt(m_socket, SOL_SOCKET, SO_NOSIGPIPE, reinterpret_cast(&yes), sizeof(yes)) == -1) { diff --git a/src/SFML/System/CMakeLists.txt b/src/SFML/System/CMakeLists.txt index 0283d50fe..b390ded85 100644 --- a/src/SFML/System/CMakeLists.txt +++ b/src/SFML/System/CMakeLists.txt @@ -81,7 +81,7 @@ if(SFML_OS_ANDROID) endif() # setup dependencies -if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_MACOSX) +if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_MACOS) target_link_libraries(sfml-system PRIVATE pthread) endif() diff --git a/src/SFML/Window/CMakeLists.txt b/src/SFML/Window/CMakeLists.txt index d355d4a2b..696cd2b3f 100644 --- a/src/SFML/Window/CMakeLists.txt +++ b/src/SFML/Window/CMakeLists.txt @@ -166,58 +166,58 @@ elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD) ) endif() source_group("unix" FILES ${PLATFORM_SRC}) -elseif(SFML_OS_MACOSX) +elseif(SFML_OS_MACOS) enable_language(OBJC OBJCXX) set(PLATFORM_SRC - ${SRCROOT}/OSX/cpp_objc_conversion.h - ${SRCROOT}/OSX/cpp_objc_conversion.mm - ${SRCROOT}/OSX/cg_sf_conversion.hpp - ${SRCROOT}/OSX/cg_sf_conversion.mm - ${SRCROOT}/OSX/CursorImpl.hpp - ${SRCROOT}/OSX/CursorImpl.mm - ${SRCROOT}/OSX/ClipboardImpl.hpp - ${SRCROOT}/OSX/ClipboardImpl.mm - ${SRCROOT}/OSX/InputImpl.mm - ${SRCROOT}/OSX/InputImpl.hpp - ${SRCROOT}/OSX/HIDInputManager.hpp - ${SRCROOT}/OSX/HIDInputManager.mm - ${SRCROOT}/OSX/HIDJoystickManager.hpp - ${SRCROOT}/OSX/HIDJoystickManager.cpp - ${SRCROOT}/OSX/JoystickImpl.cpp - ${SRCROOT}/OSX/JoystickImpl.hpp - ${SRCROOT}/OSX/NSImage+raw.h - ${SRCROOT}/OSX/NSImage+raw.mm - ${SRCROOT}/OSX/Scaling.h - ${SRCROOT}/OSX/SensorImpl.cpp - ${SRCROOT}/OSX/SensorImpl.hpp - ${SRCROOT}/OSX/SFApplication.h - ${SRCROOT}/OSX/SFApplication.m - ${SRCROOT}/OSX/SFApplicationDelegate.h - ${SRCROOT}/OSX/SFApplicationDelegate.m - ${SRCROOT}/OSX/SFContext.hpp - ${SRCROOT}/OSX/SFContext.mm - ${SRCROOT}/OSX/SFKeyboardModifiersHelper.h - ${SRCROOT}/OSX/SFKeyboardModifiersHelper.mm - ${SRCROOT}/OSX/SFOpenGLView.h - ${SRCROOT}/OSX/SFOpenGLView.mm - ${SRCROOT}/OSX/SFOpenGLView+keyboard.mm - ${SRCROOT}/OSX/SFOpenGLView+keyboard_priv.h - ${SRCROOT}/OSX/SFOpenGLView+mouse.mm - ${SRCROOT}/OSX/SFOpenGLView+mouse_priv.h - ${SRCROOT}/OSX/SFSilentResponder.h - ${SRCROOT}/OSX/SFSilentResponder.m - ${SRCROOT}/OSX/SFWindow.h - ${SRCROOT}/OSX/SFWindow.m - ${SRCROOT}/OSX/SFWindowController.h - ${SRCROOT}/OSX/SFWindowController.mm - ${SRCROOT}/OSX/SFViewController.h - ${SRCROOT}/OSX/SFViewController.mm - ${SRCROOT}/OSX/VideoModeImpl.cpp - ${SRCROOT}/OSX/WindowImplCocoa.hpp - ${SRCROOT}/OSX/WindowImplCocoa.mm - ${SRCROOT}/OSX/WindowImplDelegateProtocol.h - ${SRCROOT}/OSX/AutoreleasePoolWrapper.hpp - ${SRCROOT}/OSX/AutoreleasePoolWrapper.mm + ${SRCROOT}/macOS/cpp_objc_conversion.h + ${SRCROOT}/macOS/cpp_objc_conversion.mm + ${SRCROOT}/macOS/cg_sf_conversion.hpp + ${SRCROOT}/macOS/cg_sf_conversion.mm + ${SRCROOT}/macOS/CursorImpl.hpp + ${SRCROOT}/macOS/CursorImpl.mm + ${SRCROOT}/macOS/ClipboardImpl.hpp + ${SRCROOT}/macOS/ClipboardImpl.mm + ${SRCROOT}/macOS/InputImpl.mm + ${SRCROOT}/macOS/InputImpl.hpp + ${SRCROOT}/macOS/HIDInputManager.hpp + ${SRCROOT}/macOS/HIDInputManager.mm + ${SRCROOT}/macOS/HIDJoystickManager.hpp + ${SRCROOT}/macOS/HIDJoystickManager.cpp + ${SRCROOT}/macOS/JoystickImpl.cpp + ${SRCROOT}/macOS/JoystickImpl.hpp + ${SRCROOT}/macOS/NSImage+raw.h + ${SRCROOT}/macOS/NSImage+raw.mm + ${SRCROOT}/macOS/Scaling.h + ${SRCROOT}/macOS/SensorImpl.cpp + ${SRCROOT}/macOS/SensorImpl.hpp + ${SRCROOT}/macOS/SFApplication.h + ${SRCROOT}/macOS/SFApplication.m + ${SRCROOT}/macOS/SFApplicationDelegate.h + ${SRCROOT}/macOS/SFApplicationDelegate.m + ${SRCROOT}/macOS/SFContext.hpp + ${SRCROOT}/macOS/SFContext.mm + ${SRCROOT}/macOS/SFKeyboardModifiersHelper.h + ${SRCROOT}/macOS/SFKeyboardModifiersHelper.mm + ${SRCROOT}/macOS/SFOpenGLView.h + ${SRCROOT}/macOS/SFOpenGLView.mm + ${SRCROOT}/macOS/SFOpenGLView+keyboard.mm + ${SRCROOT}/macOS/SFOpenGLView+keyboard_priv.h + ${SRCROOT}/macOS/SFOpenGLView+mouse.mm + ${SRCROOT}/macOS/SFOpenGLView+mouse_priv.h + ${SRCROOT}/macOS/SFSilentResponder.h + ${SRCROOT}/macOS/SFSilentResponder.m + ${SRCROOT}/macOS/SFWindow.h + ${SRCROOT}/macOS/SFWindow.m + ${SRCROOT}/macOS/SFWindowController.h + ${SRCROOT}/macOS/SFWindowController.mm + ${SRCROOT}/macOS/SFViewController.h + ${SRCROOT}/macOS/SFViewController.mm + ${SRCROOT}/macOS/VideoModeImpl.cpp + ${SRCROOT}/macOS/WindowImplCocoa.hpp + ${SRCROOT}/macOS/WindowImplCocoa.mm + ${SRCROOT}/macOS/WindowImplDelegateProtocol.h + ${SRCROOT}/macOS/AutoreleasePoolWrapper.hpp + ${SRCROOT}/macOS/AutoreleasePoolWrapper.mm ) source_group("mac" FILES ${PLATFORM_SRC}) elseif(SFML_OS_IOS) @@ -294,7 +294,7 @@ target_include_directories(sfml-window SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/ext # When static linking on macOS, we need to add this flag for objective C to work # https://developer.apple.com/library/archive/qa/qa1490/_index.html -if ((NOT BUILD_SHARED_LIBS) AND SFML_OS_MACOSX) +if ((NOT BUILD_SHARED_LIBS) AND SFML_OS_MACOS) target_link_libraries(sfml-window PRIVATE -ObjC) endif() @@ -335,7 +335,7 @@ elseif(SFML_OS_WINDOWS) target_link_libraries(sfml-window PRIVATE winmm gdi32) elseif(SFML_OS_FREEBSD) target_link_libraries(sfml-window PRIVATE usbhid) -elseif(SFML_OS_MACOSX) +elseif(SFML_OS_MACOS) target_link_libraries(sfml-window PRIVATE "-framework Foundation" "-framework AppKit" "-framework IOKit" "-framework Carbon") elseif(SFML_OS_IOS) target_link_libraries(sfml-window PUBLIC "-framework Foundation" "-framework UIKit" "-framework CoreGraphics" "-framework QuartzCore" "-framework CoreMotion") diff --git a/src/SFML/Window/ClipboardImpl.hpp b/src/SFML/Window/ClipboardImpl.hpp index 9a2f68cc4..ebbca5601 100644 --- a/src/SFML/Window/ClipboardImpl.hpp +++ b/src/SFML/Window/ClipboardImpl.hpp @@ -39,7 +39,7 @@ #include #endif #elif defined(SFML_SYSTEM_MACOS) -#include +#include #elif defined(SFML_SYSTEM_IOS) #include #elif defined(SFML_SYSTEM_ANDROID) diff --git a/src/SFML/Window/CursorImpl.hpp b/src/SFML/Window/CursorImpl.hpp index c0b8b75c2..36f1c978e 100644 --- a/src/SFML/Window/CursorImpl.hpp +++ b/src/SFML/Window/CursorImpl.hpp @@ -39,7 +39,7 @@ #include #endif #elif defined(SFML_SYSTEM_MACOS) -#include +#include #elif defined(SFML_SYSTEM_IOS) #include #elif defined(SFML_SYSTEM_ANDROID) diff --git a/src/SFML/Window/GlContext.cpp b/src/SFML/Window/GlContext.cpp index 8677b3a57..0821fd88f 100644 --- a/src/SFML/Window/GlContext.cpp +++ b/src/SFML/Window/GlContext.cpp @@ -86,7 +86,7 @@ using ContextType = sf::priv::GlxContext; #elif defined(SFML_SYSTEM_MACOS) -#include +#include using ContextType = sf::priv::SFContext; #elif defined(SFML_SYSTEM_IOS) diff --git a/src/SFML/Window/InputImpl.hpp b/src/SFML/Window/InputImpl.hpp index 5cc1696bc..7edc652dc 100644 --- a/src/SFML/Window/InputImpl.hpp +++ b/src/SFML/Window/InputImpl.hpp @@ -39,7 +39,7 @@ #include #endif #elif defined(SFML_SYSTEM_MACOS) -#include +#include #elif defined(SFML_SYSTEM_IOS) #include #elif defined(SFML_SYSTEM_ANDROID) diff --git a/src/SFML/Window/JoystickImpl.hpp b/src/SFML/Window/JoystickImpl.hpp index ae6631119..ecb16e6fe 100644 --- a/src/SFML/Window/JoystickImpl.hpp +++ b/src/SFML/Window/JoystickImpl.hpp @@ -81,7 +81,7 @@ struct JoystickState #elif defined(SFML_SYSTEM_MACOS) -#include +#include #elif defined(SFML_SYSTEM_IOS) diff --git a/src/SFML/Window/SensorImpl.hpp b/src/SFML/Window/SensorImpl.hpp index 90f6e0073..2d619a0a8 100644 --- a/src/SFML/Window/SensorImpl.hpp +++ b/src/SFML/Window/SensorImpl.hpp @@ -42,7 +42,7 @@ #elif defined(SFML_SYSTEM_MACOS) -#include +#include #elif defined(SFML_SYSTEM_IOS) diff --git a/src/SFML/Window/WindowImpl.cpp b/src/SFML/Window/WindowImpl.cpp index 800063f12..6f2046e30 100644 --- a/src/SFML/Window/WindowImpl.cpp +++ b/src/SFML/Window/WindowImpl.cpp @@ -69,7 +69,7 @@ using VulkanImplType = sf::priv::VulkanImplX11; #elif defined(SFML_SYSTEM_MACOS) -#include +#include using WindowImplType = sf::priv::WindowImplCocoa; #define SFML_VULKAN_IMPLEMENTATION_NOT_AVAILABLE diff --git a/src/SFML/Window/OSX/AutoreleasePoolWrapper.hpp b/src/SFML/Window/macOS/AutoreleasePoolWrapper.hpp similarity index 100% rename from src/SFML/Window/OSX/AutoreleasePoolWrapper.hpp rename to src/SFML/Window/macOS/AutoreleasePoolWrapper.hpp diff --git a/src/SFML/Window/OSX/AutoreleasePoolWrapper.mm b/src/SFML/Window/macOS/AutoreleasePoolWrapper.mm similarity index 96% rename from src/SFML/Window/OSX/AutoreleasePoolWrapper.mm rename to src/SFML/Window/macOS/AutoreleasePoolWrapper.mm index 9b3318497..07fee5a39 100644 --- a/src/SFML/Window/OSX/AutoreleasePoolWrapper.mm +++ b/src/SFML/Window/macOS/AutoreleasePoolWrapper.mm @@ -27,7 +27,7 @@ // Headers //////////////////////////////////////////////////////////// -#include +#include #import diff --git a/src/SFML/Window/OSX/ClipboardImpl.hpp b/src/SFML/Window/macOS/ClipboardImpl.hpp similarity index 100% rename from src/SFML/Window/OSX/ClipboardImpl.hpp rename to src/SFML/Window/macOS/ClipboardImpl.hpp diff --git a/src/SFML/Window/OSX/ClipboardImpl.mm b/src/SFML/Window/macOS/ClipboardImpl.mm similarity index 95% rename from src/SFML/Window/OSX/ClipboardImpl.mm rename to src/SFML/Window/macOS/ClipboardImpl.mm index 390476403..4419e25c2 100644 --- a/src/SFML/Window/OSX/ClipboardImpl.mm +++ b/src/SFML/Window/macOS/ClipboardImpl.mm @@ -25,8 +25,8 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#include -#include +#include +#include #include diff --git a/src/SFML/Window/OSX/CursorImpl.hpp b/src/SFML/Window/macOS/CursorImpl.hpp similarity index 98% rename from src/SFML/Window/OSX/CursorImpl.hpp rename to src/SFML/Window/macOS/CursorImpl.hpp index 3610af6d3..45012607d 100644 --- a/src/SFML/Window/OSX/CursorImpl.hpp +++ b/src/SFML/Window/macOS/CursorImpl.hpp @@ -49,7 +49,7 @@ using NSCursorRef = void*; namespace sf::priv { //////////////////////////////////////////////////////////// -/// \brief Mac OS X implementation of Cursor +/// \brief macOS implementation of Cursor /// //////////////////////////////////////////////////////////// class CursorImpl diff --git a/src/SFML/Window/OSX/CursorImpl.mm b/src/SFML/Window/macOS/CursorImpl.mm similarity index 97% rename from src/SFML/Window/OSX/CursorImpl.mm rename to src/SFML/Window/macOS/CursorImpl.mm index e21c9a9a6..250bf0eb1 100644 --- a/src/SFML/Window/OSX/CursorImpl.mm +++ b/src/SFML/Window/macOS/CursorImpl.mm @@ -26,9 +26,9 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#include -#include -#import +#include +#include +#import #import diff --git a/src/SFML/Window/OSX/HIDInputManager.hpp b/src/SFML/Window/macOS/HIDInputManager.hpp similarity index 100% rename from src/SFML/Window/OSX/HIDInputManager.hpp rename to src/SFML/Window/macOS/HIDInputManager.hpp diff --git a/src/SFML/Window/OSX/HIDInputManager.mm b/src/SFML/Window/macOS/HIDInputManager.mm similarity index 99% rename from src/SFML/Window/OSX/HIDInputManager.mm rename to src/SFML/Window/macOS/HIDInputManager.mm index 3a5e9052f..9b379e354 100644 --- a/src/SFML/Window/OSX/HIDInputManager.mm +++ b/src/SFML/Window/macOS/HIDInputManager.mm @@ -26,7 +26,7 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#include +#include #include diff --git a/src/SFML/Window/OSX/HIDJoystickManager.cpp b/src/SFML/Window/macOS/HIDJoystickManager.cpp similarity index 97% rename from src/SFML/Window/OSX/HIDJoystickManager.cpp rename to src/SFML/Window/macOS/HIDJoystickManager.cpp index 38782add4..2135464dc 100644 --- a/src/SFML/Window/OSX/HIDJoystickManager.cpp +++ b/src/SFML/Window/macOS/HIDJoystickManager.cpp @@ -26,8 +26,8 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#include -#include +#include +#include //////////////////////////////////////////////////////////// // Private data diff --git a/src/SFML/Window/OSX/HIDJoystickManager.hpp b/src/SFML/Window/macOS/HIDJoystickManager.hpp similarity index 100% rename from src/SFML/Window/OSX/HIDJoystickManager.hpp rename to src/SFML/Window/macOS/HIDJoystickManager.hpp diff --git a/src/SFML/Window/OSX/InputImpl.hpp b/src/SFML/Window/macOS/InputImpl.hpp similarity index 99% rename from src/SFML/Window/OSX/InputImpl.hpp rename to src/SFML/Window/macOS/InputImpl.hpp index ab0583783..e9218e812 100644 --- a/src/SFML/Window/OSX/InputImpl.hpp +++ b/src/SFML/Window/macOS/InputImpl.hpp @@ -35,7 +35,7 @@ namespace sf::priv { //////////////////////////////////////////////////////////// -/// \brief Mac OS X implementation of inputs (keyboard + mouse) +/// \brief macOS implementation of inputs (keyboard + mouse) /// //////////////////////////////////////////////////////////// class InputImpl diff --git a/src/SFML/Window/OSX/InputImpl.mm b/src/SFML/Window/macOS/InputImpl.mm similarity index 97% rename from src/SFML/Window/OSX/InputImpl.mm rename to src/SFML/Window/macOS/InputImpl.mm index 41ae814da..6890ad037 100644 --- a/src/SFML/Window/OSX/InputImpl.mm +++ b/src/SFML/Window/macOS/InputImpl.mm @@ -26,12 +26,12 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#include -#include -#include -#import #include #include +#include +#include +#include +#import #include diff --git a/src/SFML/Window/OSX/JoystickImpl.cpp b/src/SFML/Window/macOS/JoystickImpl.cpp similarity index 99% rename from src/SFML/Window/OSX/JoystickImpl.cpp rename to src/SFML/Window/macOS/JoystickImpl.cpp index d9821202b..8155096ba 100644 --- a/src/SFML/Window/OSX/JoystickImpl.cpp +++ b/src/SFML/Window/macOS/JoystickImpl.cpp @@ -27,9 +27,9 @@ // Headers //////////////////////////////////////////////////////////// #include -#include -#include -#include +#include +#include +#include #include diff --git a/src/SFML/Window/OSX/JoystickImpl.hpp b/src/SFML/Window/macOS/JoystickImpl.hpp similarity index 99% rename from src/SFML/Window/OSX/JoystickImpl.hpp rename to src/SFML/Window/macOS/JoystickImpl.hpp index 0067b991a..21035f81c 100644 --- a/src/SFML/Window/OSX/JoystickImpl.hpp +++ b/src/SFML/Window/macOS/JoystickImpl.hpp @@ -40,7 +40,7 @@ namespace sf::priv { //////////////////////////////////////////////////////////// -/// \brief Mac OS X implementation of joysticks +/// \brief macOS implementation of joysticks /// //////////////////////////////////////////////////////////// class JoystickImpl diff --git a/src/SFML/Window/OSX/NSImage+raw.h b/src/SFML/Window/macOS/NSImage+raw.h similarity index 100% rename from src/SFML/Window/OSX/NSImage+raw.h rename to src/SFML/Window/macOS/NSImage+raw.h diff --git a/src/SFML/Window/OSX/NSImage+raw.mm b/src/SFML/Window/macOS/NSImage+raw.mm similarity index 98% rename from src/SFML/Window/OSX/NSImage+raw.mm rename to src/SFML/Window/macOS/NSImage+raw.mm index 12cf07299..cf934b826 100644 --- a/src/SFML/Window/OSX/NSImage+raw.mm +++ b/src/SFML/Window/macOS/NSImage+raw.mm @@ -26,7 +26,7 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import +#import @implementation NSImage (raw) diff --git a/src/SFML/Window/OSX/SFApplication.h b/src/SFML/Window/macOS/SFApplication.h similarity index 100% rename from src/SFML/Window/OSX/SFApplication.h rename to src/SFML/Window/macOS/SFApplication.h diff --git a/src/SFML/Window/OSX/SFApplication.m b/src/SFML/Window/macOS/SFApplication.m similarity index 99% rename from src/SFML/Window/OSX/SFApplication.m rename to src/SFML/Window/macOS/SFApplication.m index 07cbea3c0..83f57925d 100644 --- a/src/SFML/Window/OSX/SFApplication.m +++ b/src/SFML/Window/macOS/SFApplication.m @@ -26,7 +26,7 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import +#import #pragma GCC diagnostic ignored "-Wdeprecated-declarations" diff --git a/src/SFML/Window/OSX/SFApplicationDelegate.h b/src/SFML/Window/macOS/SFApplicationDelegate.h similarity index 100% rename from src/SFML/Window/OSX/SFApplicationDelegate.h rename to src/SFML/Window/macOS/SFApplicationDelegate.h diff --git a/src/SFML/Window/OSX/SFApplicationDelegate.m b/src/SFML/Window/macOS/SFApplicationDelegate.m similarity index 97% rename from src/SFML/Window/OSX/SFApplicationDelegate.m rename to src/SFML/Window/macOS/SFApplicationDelegate.m index 0459d99b0..1710ec778 100644 --- a/src/SFML/Window/OSX/SFApplicationDelegate.m +++ b/src/SFML/Window/macOS/SFApplicationDelegate.m @@ -26,7 +26,7 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import +#import #pragma GCC diagnostic ignored "-Wdeprecated-declarations" diff --git a/src/SFML/Window/OSX/SFContext.hpp b/src/SFML/Window/macOS/SFContext.hpp similarity index 99% rename from src/SFML/Window/OSX/SFContext.hpp rename to src/SFML/Window/macOS/SFContext.hpp index 07caaa5f1..9a7e31557 100644 --- a/src/SFML/Window/OSX/SFContext.hpp +++ b/src/SFML/Window/macOS/SFContext.hpp @@ -56,7 +56,7 @@ using NSWindowRef = void*; namespace sf::priv { //////////////////////////////////////////////////////////// -/// \brief OSX (Cocoa) implementation of OpenGL contexts +/// \brief macOS (Cocoa) implementation of OpenGL contexts /// //////////////////////////////////////////////////////////// class SFContext : public GlContext diff --git a/src/SFML/Window/OSX/SFContext.mm b/src/SFML/Window/macOS/SFContext.mm similarity index 98% rename from src/SFML/Window/OSX/SFContext.mm rename to src/SFML/Window/macOS/SFContext.mm index 2b56b6de6..ef891129a 100644 --- a/src/SFML/Window/OSX/SFContext.mm +++ b/src/SFML/Window/macOS/SFContext.mm @@ -26,9 +26,9 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#include -#include -#include +#include +#include +#include #include diff --git a/src/SFML/Window/OSX/SFKeyboardModifiersHelper.h b/src/SFML/Window/macOS/SFKeyboardModifiersHelper.h similarity index 100% rename from src/SFML/Window/OSX/SFKeyboardModifiersHelper.h rename to src/SFML/Window/macOS/SFKeyboardModifiersHelper.h diff --git a/src/SFML/Window/OSX/SFKeyboardModifiersHelper.mm b/src/SFML/Window/macOS/SFKeyboardModifiersHelper.mm similarity index 99% rename from src/SFML/Window/OSX/SFKeyboardModifiersHelper.mm rename to src/SFML/Window/macOS/SFKeyboardModifiersHelper.mm index bd1aa7f7a..f28159060 100644 --- a/src/SFML/Window/OSX/SFKeyboardModifiersHelper.mm +++ b/src/SFML/Window/macOS/SFKeyboardModifiersHelper.mm @@ -26,8 +26,8 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import -#include +#import +#include #pragma GCC diagnostic ignored "-Wdeprecated-declarations" diff --git a/src/SFML/Window/OSX/SFOpenGLView+keyboard.mm b/src/SFML/Window/macOS/SFOpenGLView+keyboard.mm similarity index 96% rename from src/SFML/Window/OSX/SFOpenGLView+keyboard.mm rename to src/SFML/Window/macOS/SFOpenGLView+keyboard.mm index e2428fa78..244abc892 100644 --- a/src/SFML/Window/OSX/SFOpenGLView+keyboard.mm +++ b/src/SFML/Window/macOS/SFOpenGLView+keyboard.mm @@ -26,10 +26,10 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#include // For localizedKeys and nonLocalizedKeys -#import -#import -#include +#include // For localizedKeys and nonLocalizedKeys +#import +#import +#include #pragma GCC diagnostic ignored "-Wdeprecated-declarations" diff --git a/src/SFML/Window/OSX/SFOpenGLView+keyboard_priv.h b/src/SFML/Window/macOS/SFOpenGLView+keyboard_priv.h similarity index 98% rename from src/SFML/Window/OSX/SFOpenGLView+keyboard_priv.h rename to src/SFML/Window/macOS/SFOpenGLView+keyboard_priv.h index 1c58f6c90..2bf7894a8 100644 --- a/src/SFML/Window/OSX/SFOpenGLView+keyboard_priv.h +++ b/src/SFML/Window/macOS/SFOpenGLView+keyboard_priv.h @@ -27,7 +27,7 @@ // Headers //////////////////////////////////////////////////////////// #include -#import +#import #import diff --git a/src/SFML/Window/OSX/SFOpenGLView+mouse.mm b/src/SFML/Window/macOS/SFOpenGLView+mouse.mm similarity index 98% rename from src/SFML/Window/OSX/SFOpenGLView+mouse.mm rename to src/SFML/Window/macOS/SFOpenGLView+mouse.mm index 6d2f98178..e193f2f9d 100644 --- a/src/SFML/Window/OSX/SFOpenGLView+mouse.mm +++ b/src/SFML/Window/macOS/SFOpenGLView+mouse.mm @@ -26,9 +26,9 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import -#import -#include +#import +#import +#include #include diff --git a/src/SFML/Window/OSX/SFOpenGLView+mouse_priv.h b/src/SFML/Window/macOS/SFOpenGLView+mouse_priv.h similarity index 98% rename from src/SFML/Window/OSX/SFOpenGLView+mouse_priv.h rename to src/SFML/Window/macOS/SFOpenGLView+mouse_priv.h index d56c7a330..b24f7345a 100644 --- a/src/SFML/Window/OSX/SFOpenGLView+mouse_priv.h +++ b/src/SFML/Window/macOS/SFOpenGLView+mouse_priv.h @@ -27,7 +27,7 @@ // Headers //////////////////////////////////////////////////////////// #include -#import +#import #import diff --git a/src/SFML/Window/OSX/SFOpenGLView.h b/src/SFML/Window/macOS/SFOpenGLView.h similarity index 100% rename from src/SFML/Window/OSX/SFOpenGLView.h rename to src/SFML/Window/macOS/SFOpenGLView.h diff --git a/src/SFML/Window/OSX/SFOpenGLView.mm b/src/SFML/Window/macOS/SFOpenGLView.mm similarity index 98% rename from src/SFML/Window/OSX/SFOpenGLView.mm rename to src/SFML/Window/macOS/SFOpenGLView.mm index 3ed94cda5..43e9bc573 100644 --- a/src/SFML/Window/OSX/SFOpenGLView.mm +++ b/src/SFML/Window/macOS/SFOpenGLView.mm @@ -26,10 +26,10 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import -#import -#import -#include +#import +#import +#import +#include #include diff --git a/src/SFML/Window/OSX/SFSilentResponder.h b/src/SFML/Window/macOS/SFSilentResponder.h similarity index 100% rename from src/SFML/Window/OSX/SFSilentResponder.h rename to src/SFML/Window/macOS/SFSilentResponder.h diff --git a/src/SFML/Window/OSX/SFSilentResponder.m b/src/SFML/Window/macOS/SFSilentResponder.m similarity index 96% rename from src/SFML/Window/OSX/SFSilentResponder.m rename to src/SFML/Window/macOS/SFSilentResponder.m index 0001933cd..86789bb16 100644 --- a/src/SFML/Window/OSX/SFSilentResponder.m +++ b/src/SFML/Window/macOS/SFSilentResponder.m @@ -26,7 +26,7 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import +#import @implementation SFSilentResponder diff --git a/src/SFML/Window/OSX/SFViewController.h b/src/SFML/Window/macOS/SFViewController.h similarity index 97% rename from src/SFML/Window/OSX/SFViewController.h rename to src/SFML/Window/macOS/SFViewController.h index c4eb641df..0a6322f1a 100644 --- a/src/SFML/Window/OSX/SFViewController.h +++ b/src/SFML/Window/macOS/SFViewController.h @@ -26,7 +26,7 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import +#import //////////////////////////////////////////////////////////// /// Predefine some classes diff --git a/src/SFML/Window/OSX/SFViewController.mm b/src/SFML/Window/macOS/SFViewController.mm similarity index 97% rename from src/SFML/Window/OSX/SFViewController.mm rename to src/SFML/Window/macOS/SFViewController.mm index 631ae9dd1..1194996cb 100644 --- a/src/SFML/Window/OSX/SFViewController.mm +++ b/src/SFML/Window/macOS/SFViewController.mm @@ -26,10 +26,10 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import -#import -#import -#include +#import +#import +#import +#include #include diff --git a/src/SFML/Window/OSX/SFWindow.h b/src/SFML/Window/macOS/SFWindow.h similarity index 100% rename from src/SFML/Window/OSX/SFWindow.h rename to src/SFML/Window/macOS/SFWindow.h diff --git a/src/SFML/Window/OSX/SFWindow.m b/src/SFML/Window/macOS/SFWindow.m similarity index 99% rename from src/SFML/Window/OSX/SFWindow.m rename to src/SFML/Window/macOS/SFWindow.m index 5a863d0ee..02eb56e40 100644 --- a/src/SFML/Window/OSX/SFWindow.m +++ b/src/SFML/Window/macOS/SFWindow.m @@ -26,7 +26,7 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import +#import @implementation SFWindow diff --git a/src/SFML/Window/OSX/SFWindowController.h b/src/SFML/Window/macOS/SFWindowController.h similarity index 98% rename from src/SFML/Window/OSX/SFWindowController.h rename to src/SFML/Window/macOS/SFWindowController.h index 26251c1ec..1cecea94e 100644 --- a/src/SFML/Window/OSX/SFWindowController.h +++ b/src/SFML/Window/macOS/SFWindowController.h @@ -26,8 +26,8 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import #include +#import //////////////////////////////////////////////////////////// /// Predefine some classes diff --git a/src/SFML/Window/OSX/SFWindowController.mm b/src/SFML/Window/macOS/SFWindowController.mm similarity index 98% rename from src/SFML/Window/OSX/SFWindowController.mm rename to src/SFML/Window/macOS/SFWindowController.mm index 9e2236498..ffb5e4184 100644 --- a/src/SFML/Window/OSX/SFWindowController.mm +++ b/src/SFML/Window/macOS/SFWindowController.mm @@ -26,16 +26,16 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import -#import -#import -#import -#import -#import -#include #include #include #include +#import +#import +#import +#import +#import +#import +#include #include diff --git a/src/SFML/Window/OSX/Scaling.h b/src/SFML/Window/macOS/Scaling.h similarity index 98% rename from src/SFML/Window/OSX/Scaling.h rename to src/SFML/Window/macOS/Scaling.h index 4a7404eab..36fff0c41 100644 --- a/src/SFML/Window/OSX/Scaling.h +++ b/src/SFML/Window/macOS/Scaling.h @@ -26,7 +26,7 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import +#import #import diff --git a/src/SFML/Window/OSX/SensorImpl.cpp b/src/SFML/Window/macOS/SensorImpl.cpp similarity index 100% rename from src/SFML/Window/OSX/SensorImpl.cpp rename to src/SFML/Window/macOS/SensorImpl.cpp diff --git a/src/SFML/Window/OSX/SensorImpl.hpp b/src/SFML/Window/macOS/SensorImpl.hpp similarity index 98% rename from src/SFML/Window/OSX/SensorImpl.hpp rename to src/SFML/Window/macOS/SensorImpl.hpp index 75ece801b..65d7bf259 100644 --- a/src/SFML/Window/OSX/SensorImpl.hpp +++ b/src/SFML/Window/macOS/SensorImpl.hpp @@ -28,7 +28,7 @@ namespace sf::priv { //////////////////////////////////////////////////////////// -/// \brief Mac OS X implementation of sensors +/// \brief macOS implementation of sensors /// //////////////////////////////////////////////////////////// class SensorImpl diff --git a/src/SFML/Window/OSX/VideoModeImpl.cpp b/src/SFML/Window/macOS/VideoModeImpl.cpp similarity index 98% rename from src/SFML/Window/OSX/VideoModeImpl.cpp rename to src/SFML/Window/macOS/VideoModeImpl.cpp index 2dae1f1f1..6670add9b 100644 --- a/src/SFML/Window/OSX/VideoModeImpl.cpp +++ b/src/SFML/Window/macOS/VideoModeImpl.cpp @@ -26,8 +26,8 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#include #include +#include #include diff --git a/src/SFML/Window/OSX/WindowImplCocoa.hpp b/src/SFML/Window/macOS/WindowImplCocoa.hpp similarity index 99% rename from src/SFML/Window/OSX/WindowImplCocoa.hpp rename to src/SFML/Window/macOS/WindowImplCocoa.hpp index a3fd59ede..f46086be5 100644 --- a/src/SFML/Window/OSX/WindowImplCocoa.hpp +++ b/src/SFML/Window/macOS/WindowImplCocoa.hpp @@ -39,7 +39,7 @@ //////////////////////////////////////////////////////////// #ifdef __OBJC__ -#import +#import using WindowImplDelegateRef = id; @class NSOpenGLContext; @@ -61,7 +61,7 @@ class String; namespace priv { //////////////////////////////////////////////////////////// -/// \brief Mac OS X (Cocoa) implementation of WindowImpl +/// \brief macOS (Cocoa) implementation of WindowImpl /// //////////////////////////////////////////////////////////// class WindowImplCocoa : public WindowImpl diff --git a/src/SFML/Window/OSX/WindowImplCocoa.mm b/src/SFML/Window/macOS/WindowImplCocoa.mm similarity index 97% rename from src/SFML/Window/OSX/WindowImplCocoa.mm rename to src/SFML/Window/macOS/WindowImplCocoa.mm index c53aef945..c23df56b4 100644 --- a/src/SFML/Window/OSX/WindowImplCocoa.mm +++ b/src/SFML/Window/macOS/WindowImplCocoa.mm @@ -26,15 +26,15 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#include -#import -#import -#import -#import -#import -#import -#include -#import +#include +#import +#import +#import +#import +#import +#import +#include +#import #include #include diff --git a/src/SFML/Window/OSX/WindowImplDelegateProtocol.h b/src/SFML/Window/macOS/WindowImplDelegateProtocol.h similarity index 100% rename from src/SFML/Window/OSX/WindowImplDelegateProtocol.h rename to src/SFML/Window/macOS/WindowImplDelegateProtocol.h diff --git a/src/SFML/Window/OSX/cg_sf_conversion.hpp b/src/SFML/Window/macOS/cg_sf_conversion.hpp similarity index 100% rename from src/SFML/Window/OSX/cg_sf_conversion.hpp rename to src/SFML/Window/macOS/cg_sf_conversion.hpp diff --git a/src/SFML/Window/OSX/cg_sf_conversion.mm b/src/SFML/Window/macOS/cg_sf_conversion.mm similarity index 97% rename from src/SFML/Window/OSX/cg_sf_conversion.mm rename to src/SFML/Window/macOS/cg_sf_conversion.mm index 143583c9d..7eef58492 100644 --- a/src/SFML/Window/OSX/cg_sf_conversion.mm +++ b/src/SFML/Window/macOS/cg_sf_conversion.mm @@ -26,8 +26,8 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import -#include +#import +#include #include diff --git a/src/SFML/Window/OSX/cpp_objc_conversion.h b/src/SFML/Window/macOS/cpp_objc_conversion.h similarity index 100% rename from src/SFML/Window/OSX/cpp_objc_conversion.h rename to src/SFML/Window/macOS/cpp_objc_conversion.h diff --git a/src/SFML/Window/OSX/cpp_objc_conversion.mm b/src/SFML/Window/macOS/cpp_objc_conversion.mm similarity index 97% rename from src/SFML/Window/OSX/cpp_objc_conversion.mm rename to src/SFML/Window/macOS/cpp_objc_conversion.mm index dfd4e6139..a705fd870 100644 --- a/src/SFML/Window/OSX/cpp_objc_conversion.mm +++ b/src/SFML/Window/macOS/cpp_objc_conversion.mm @@ -26,7 +26,7 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import +#import #include diff --git a/tools/xcode/templates/readme.txt b/tools/xcode/templates/readme.txt index 225ea7abd..cf524f07d 100644 --- a/tools/xcode/templates/readme.txt +++ b/tools/xcode/templates/readme.txt @@ -129,7 +129,7 @@ FAQ Short answer: Don't do that! - We strongly recommend you to use either dylibs or frameworks on Mac OS X. Please refer to Apple + We strongly recommend you to use either dylibs or frameworks on macOS. Please refer to Apple documentation for information about static vs shared libraries debate. If you really need/want to use static libraries proceed as follow. First, set your project to @@ -146,5 +146,3 @@ FAQ project build settings to match the settings used to compile SFML; more specifically the Compiler for C/C++/Objective-C, the C++ language Dialect and the C++ Standard Library. - -