diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 3af2b9d9..00000000 --- a/.editorconfig +++ /dev/null @@ -1,18 +0,0 @@ -# Configuration file for EditorConfig -# More information is available under http://EditorConfig.org - -# Ignore any other files further up in the file system -root = true - -# Configuration for all files -[*] -# Enforce Unix style line endings (\n only) -end_of_line = lf -# Always end files with a blank line -insert_final_newline = true -# Force space characters for indentation -indent_style = space -# Always indent by 4 characters -indent_size = 4 -# Remove whitespace characters at the end of line -trim_trailing_whitespace = true diff --git a/.gitattributes b/.gitattributes index 2f88beae..0db64f4c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,13 +1,12 @@ * text=auto eol=lf -extlibs/**/* -text -eol linguist-vendored -cmake/toolchains/android.toolchain.cmake -text -eol +extlibs/**/* -text -eol +src/SFML/Graphics/stb_image/**/* -text -eol *.png -text -eol *.jpg -text -eol *.wav -text -eol *.ogg -text -eol -*.flac -text -eol *.tff -text -eol *.icns -text -eol -*.rtf -text -eol +*.rtf -text -eol \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 0fbd9e45..00000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,54 +0,0 @@ -Thanks for raising your issue here! 🙂 - -Before you submit the issue however, we'd like you to consider the follow points. - -* We like to use the issue tracker for confirmed issues. -* If you're stuck with SFML, please use [the forum](https://en.sfml-dev.org/forums/index.php#c3) to get help. - ----- - -## Subject of the issue - -Describe your issue here. - -## Your environment - -* Your OS / distro / window manager used -* Your version of SFML (2.5.0, git master, etc) -* Your compiler and compiler version used -* Special compiler flags used - -## Steps to reproduce - -Tell us how to reproduce this issue. Please provide a [minimal, complete and verifiable example](https://stackoverflow.com/help/mcve), you can use the follow template as a start: - -```cpp -#include - -int main() -{ - sf::RenderWindow window(sf::VideoMode(1280, 720), "Minimal, complete and verifiable example"); - window.setFramerateLimit(60); - - while (window.isOpen()) - { - sf::Event event; - while (window.pollEvent(event)) - { - if (event.type == sf::Event::Closed) - window.close(); - } - - window.clear(); - window.display(); - } -} -``` - -## Expected behavior - -Tell us what should happen - -## Actual behavior - -Tell us what happens instead diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 92a926d5..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,51 +0,0 @@ -Thanks a lot for making a contribution to SFML! 🙂 - -Before you create the pull request, we ask you to check the follow boxes. (For small changes not everything needs to ticked, but the more the better!) - -* [ ] Has this change been discussed on [the forum](https://en.sfml-dev.org/forums/index.php#c3) or in an issue before? -* [ ] Does the code follow the SFML [Code Style Guide](https://www.sfml-dev.org/style.php)? -* [ ] Have you provided some example/test code for your changes? -* [ ] If you have additional steps which need to be performed list them as tasks! - ----- - -## Description - -Please describe your pull request. - -This PR is related to the issue # - -## Tasks - -* [ ] Tested on Linux -* [ ] Tested on Windows -* [ ] Tested on macOS -* [ ] Tested on iOS -* [ ] Tested on Android - -## How to test this PR? - -Describe how to best test these changes. Please provide a [minimal, complete and verifiable example](https://stackoverflow.com/help/mcve) if possible, you can use the follow template as a start: - -```cpp -#include - -int main() -{ - sf::RenderWindow window(sf::VideoMode(1280, 720), "Minimal, complete and verifiable example"); - window.setFramerateLimit(60); - - while (window.isOpen()) - { - sf::Event event; - while (window.pollEvent(event)) - { - if (event.type == sf::Event::Closed) - window.close(); - } - - window.clear(); - window.display(); - } -} -``` \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index cd0ee3d0..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: CI - -on: [push, pull_request] - -jobs: - build: - name: ${{ matrix.platform.name }} ${{ matrix.config.name }} - runs-on: ${{ matrix.platform.os }} - - strategy: - matrix: - platform: - - { name: Windows VS2017, os: windows-2016 } - - { name: Windows VS2019, os: windows-latest } - - { name: Linux GCC, os: ubuntu-latest } - - { name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } - - { name: MacOS XCode, os: macos-latest } - config: - - { name: Shared, flags: -DBUILD_SHARED_LIBS=TRUE } - - { name: Static, flags: -DBUILD_SHARED_LIBS=FALSE } - - include: - - platform: { name: MacOS XCode, os: macos-latest } - config: { name: Frameworks, flags: -DSFML_BUILD_FRAMEWORKS=TRUE } - - platform: { name: MacOS XCode, os: macos-latest } - config: { name: iOS, flags: -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/cmake/toolchains/iOS.toolchain.cmake -DIOS_PLATFORM=SIMULATOR } - - platform: { name: Android, os: ubuntu-latest } - config: { name: x86, flags: -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_ANDROID_NDK=$GITHUB_WORKSPACE/android-ndk-r18b -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26 } - - platform: { name: Android, os: ubuntu-latest } - config: { name: armeabi-v7a, flags: -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_ANDROID_NDK=$GITHUB_WORKSPACE/android-ndk-r18b -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26 } - steps: - - name: Checkout Code - uses: actions/checkout@v2 - - - name: Install Linux Dependencies - if: runner.os == 'Linux' - run: sudo apt-get install libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev - - - - name: Install Android Components - if: matrix.platform.name == 'Android' - run: | - echo "y" | /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "cmake;3.10.2.4988404" --sdk_root=ANDROID_SDK_ROOT - sudo ln -sf /usr/local/lib/android/sdk/cmake/3.10.2.4988404/bin/cmake /usr/bin/cmake - wget -nv https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip -P $GITHUB_WORKSPACE - unzip -qq -d $GITHUB_WORKSPACE android-ndk-r18b-linux-x86_64.zip - - - - name: Configure CMake - shell: bash - run: cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install -DSFML_BUILD_EXAMPLES=TRUE -DCMAKE_VERBOSE_MAKEFILE=ON -DSFML_BUILD_TEST_SUITE=TRUE ${{matrix.platform.flags}} ${{matrix.config.flags}} - - - name: Build - shell: bash - run: cmake --build $GITHUB_WORKSPACE/build --config Release --target install diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 953ae090..00000000 --- a/.travis.yml +++ /dev/null @@ -1,134 +0,0 @@ -language: cpp - -addons: - apt_packages: - - cmake - - libxrandr-dev - - libxcursor-dev - - libudev-dev - - libopenal-dev - - libflac-dev - - libvorbis-dev - - g++ - - clang - - libgl1-mesa-dev - -before_script: -- mkdir build && cd build -- cmake .. $CMAKE_FLAGS -DCMAKE_INSTALL_PREFIX=../install -DSFML_BUILD_EXAMPLES=TRUE -DCMAKE_VERBOSE_MAKEFILE=ON - -script: -- cmake --build . --target install - -matrix: - include: - - - name: "Linux gcc Dynamic" - os: linux - dist: xenial - compiler: gcc - env: - - CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=TRUE" - - - name: "Linux gcc Static" - os: linux - dist: xenial - compiler: gcc - env: - - CMAKE_FLAGS="-DBUILD_SHARED_LIBS=FALSE -DSFML_BUILD_TEST_SUITE=TRUE" - - - name: "Linux clang Dynamic" - os: linux - dist: xenial - compiler: clang - env: - - CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=TRUE" - - - name: "Linux clang Static" - os: linux - dist: xenial - compiler: clang - env: - - CMAKE_FLAGS="-DBUILD_SHARED_LIBS=FALSE -DSFML_BUILD_TEST_SUITE=TRUE" - - - name: "macOS Xcode 10 Dynamic" - os: osx - osx_image: xcode10 - env: - - CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=TRUE" - - - name: "macOS Xcode 10 Frameworks" - os: osx - osx_image: xcode10 - env: - - CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=TRUE -DSFML_BUILD_FRAMEWORKS=TRUE" - - - name: "macOS Xcode 10 Static" - os: osx - osx_image: xcode10 - env: - - CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=TRUE -DBUILD_SHARED_LIBS=FALSE" - - - name: "iOS Xcode 10" - os: osx - osx_image: xcode10 - env: - - CMAKE_FLAGS="-GXcode -DSFML_BUILD_TEST_SUITE=TRUE -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/iOS.toolchain.cmake -DIOS_PLATFORM=SIMULATOR" - - - name: "Visual Studio 15 2017 Dynamic" - os: windows - env: - - CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=FALSE" - - - name: "Visual Studio 15 2017 Static" - os: windows - env: - - CMAKE_FLAGS="-DBUILD_SHARED_LIBS=FALSE -DSFML_BUILD_TEST_SUITE=TRUE" - - - name: "Visual Studio 16 2019 Dynamic" - os: windows - env: - - CMAKE_FLAGS="-DSFML_BUILD_TEST_SUITE=FALSE" - - MSBUILD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin" - - VS160COMNTOOLS="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools" - - PATH=$MSBUILD_PATH:$PATH - install: - - choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64" - - choco install visualstudio2019-workload-nativedesktop - - - name: "Visual Studio 16 2019 Static" - os: windows - env: - - CMAKE_FLAGS="-DBUILD_SHARED_LIBS=FALSE -DSFML_BUILD_TEST_SUITE=TRUE" - - MSBUILD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin" - - VS160COMNTOOLS="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools" - - PATH=$MSBUILD_PATH:$PATH - install: - - choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64" - - choco install visualstudio2019-workload-nativedesktop - - - name: "Android armeabi-v7a" - language: android - android: &androidComponents - components: - - tools - - platform-tools - - build-tools-26.0.1 - env: - - CMAKE_FLAGS="-DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_ANDROID_NDK=$TRAVIS_BUILD_DIR/android-ndk-r18b -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26" - - install: &androidInstall - - echo y | sdkmanager "cmake;3.10.2.4988404" - - sudo ln -sf /usr/local/android-sdk/cmake/3.10.2.4988404/bin/cmake /usr/bin/cmake - - wget https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip - - unzip -qq android-ndk-r18b-linux-x86_64.zip - - - name: "Android x86" - language: android - android: *androidComponents - env: - - CMAKE_FLAGS="-DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_ANDROID_NDK=$TRAVIS_BUILD_DIR/android-ndk-r18b -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26" - install: *androidInstall - -notifications: - email: false diff --git a/CMakeLists.txt b/CMakeLists.txt index 63ab622e..b7a99ee0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,4 @@ -# CMake's built-in Android support requires 3.7.0 -if(CMAKE_SYSTEM_NAME MATCHES "Android") - cmake_minimum_required(VERSION 3.7.2) -else() - cmake_minimum_required(VERSION 3.0.2) -endif() +cmake_minimum_required(VERSION 2.8) # define a macro that helps defining an option macro(sfml_set_option var default type docstring) @@ -13,49 +8,23 @@ macro(sfml_set_option var default type docstring) set(${var} ${${var}} CACHE ${type} ${docstring} FORCE) endmacro() -# these options have to be set before CMake detects/configures the toolchain - -# determine whether to create a debug or release build +# set a default build type if none was provided +# this has to be done before the project() instruction! sfml_set_option(CMAKE_BUILD_TYPE Release STRING "Choose the type of build (Debug or Release)") -# Suppress Cygwin legacy warning -set(CMAKE_LEGACY_CYGWIN_WIN32 0) - -# Suppress Mac OS X RPATH warnings and adopt new related behaviors -cmake_policy(SET CMP0042 NEW) -if (NOT CMAKE_VERSION VERSION_LESS 3.9) - cmake_policy(SET CMP0068 NEW) -endif() - -# add some default value for some additional macOS variable -# note that those variables are ignored on other systems -if(NOT CMAKE_OSX_ARCHITECTURES) - set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "macOS architecture to build; 64-bit is expected" FORCE) -endif() -if(NOT CMAKE_OSX_SYSROOT) - # query the path to the default SDK, will fail on non-macOS, but it's okay. - execute_process(COMMAND xcodebuild -sdk macosx -version Path - COMMAND head -n 1 - COMMAND tr -d '\n' - OUTPUT_VARIABLE CMAKE_OSX_SYSROOT - ERROR_QUIET) -endif() - # project name project(SFML) # include the configuration file include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake) -# we use the paths from the cmake GNUInstallDirs module as defaults -# you can override these if you like -# https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html -include(GNUInstallDirs) - # setup version numbers set(VERSION_MAJOR 2) -set(VERSION_MINOR 5) -set(VERSION_PATCH 1) +set(VERSION_MINOR 2) +set(VERSION_PATCH 0) + +# add the SFML header path +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) # add an option for choosing the build type (shared or static) if(NOT (SFML_OS_IOS OR SFML_OS_ANDROID)) @@ -69,146 +38,60 @@ else() endif() # add an option for building the examples -if(NOT SFML_OS_ANDROID) +if(NOT (SFML_OS_IOS OR SFML_OS_ANDROID)) sfml_set_option(SFML_BUILD_EXAMPLES FALSE BOOL "TRUE to build the SFML examples, FALSE to ignore them") else() set(SFML_BUILD_EXAMPLES FALSE) endif() -# add options to select which modules to build -sfml_set_option(SFML_BUILD_WINDOW TRUE BOOL "TRUE to build SFML's Window module. This setting is ignored, if the graphics module is built.") -sfml_set_option(SFML_BUILD_GRAPHICS TRUE BOOL "TRUE to build SFML's Graphics module.") -sfml_set_option(SFML_BUILD_AUDIO TRUE BOOL "TRUE to build SFML's Audio module.") -sfml_set_option(SFML_BUILD_NETWORK TRUE BOOL "TRUE to build SFML's Network module.") - # add an option for building the API documentation sfml_set_option(SFML_BUILD_DOC FALSE BOOL "TRUE to generate the API documentation, FALSE to ignore it") # add an option for choosing the OpenGL implementation -if(SFML_BUILD_WINDOW) - sfml_set_option(SFML_OPENGL_ES ${OPENGL_ES} BOOL "TRUE to use an OpenGL ES implementation, FALSE to use a desktop OpenGL implementation") -endif() +sfml_set_option(SFML_OPENGL_ES ${OPENGL_ES} BOOL "TRUE to use an OpenGL ES implementation, FALSE to use a desktop OpenGL implementation") -# add an option for building the test suite -sfml_set_option(SFML_BUILD_TEST_SUITE FALSE BOOL "TRUE to build the SFML test suite, FALSE to ignore it") - -# macOS specific options +# Mac OS X specific options if(SFML_OS_MACOSX) # 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") + # add an option to let the user specify a custom directory for frameworks installation (SFML, sndfile, ...) + sfml_set_option(CMAKE_INSTALL_FRAMEWORK_PREFIX "/Library/Frameworks" STRING "Frameworks installation directory") + # add an option to automatically install Xcode templates sfml_set_option(SFML_INSTALL_XCODE_TEMPLATES FALSE BOOL "TRUE to automatically install the Xcode templates, FALSE to do nothing about it. The templates are compatible with Xcode 4 and 5.") endif() -# iOS specific options -if(SFML_OS_IOS) - # At the moment the minimal deployement target version is 10.2 only because the externals for iOS were built with that requirement. - sfml_set_option(SFML_IOS_DEPLOYMENT_TARGET "10.2" STRING "The minimal iOS version that will be able to run the built binaries. Cannot be lower than 10.2.") - - sfml_set_option(SFML_CODE_SIGN_IDENTITY "iPhone Developer" STRING "The code signing identity to use when building for a real device") -endif() - # Android options if(SFML_OS_ANDROID) - # make sure there's the android library available - if (CMAKE_ANDROID_API LESS 14) - message(FATAL_ERROR "Android API level (${CMAKE_ANDROID_API}) must be equal or greater than 14.") - endif() + # force usage of the STL port + set(ANDROID_USE_STLPORT TRUE) - # CMake doesn't support defining the STL to be used with Nsight Tegra, so warn the user - if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android") - message(WARNING "CMake might not properly support setting the STL. Make sure to adjust all generated library projects!") + # make sure there's the android library available + if (${ANDROID_NATIVE_API_LEVEL} LESS 9) + message(FATAL_ERROR "API level must be equal or greater than 9") endif() # install everything in $NDK/sources/ because this path is appended by the NDK (convenient) - set(CMAKE_INSTALL_PREFIX ${CMAKE_ANDROID_NDK}/sources/third_party/sfml) + set(CMAKE_INSTALL_PREFIX ${ANDROID_NDK}/sources/sfml) - # we install libs in a subdirectory named after the ABI - set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${CMAKE_ANDROID_ARCH_ABI}") - # pass shared STL configuration (if any) - if (CMAKE_ANDROID_STL_TYPE MATCHES "_shared") - add_definitions("-DSTL_LIBRARY=${CMAKE_ANDROID_STL_TYPE}") - # if(NOT CMAKE_ANDROID_STL_TYPE MATCHES "c\\+\\+_shared") - # message("Android: Using ${CMAKE_ANDROID_STL_TYPE} as STL. Set CMAKE_ANDROID_STL_TYPE to c++_shared, if there are any issues.") - # endif() - else() - # message(WARNING "Android: You're using a static STL (${CMAKE_ANDROID_STL_TYPE}). Set CMAKE_ANDROID_STL_TYPE to c++_shared, if there are any issues.") - endif() + # we install libs in a subdirectory named after the ABI (lib/mips/*.so) + set(LIB_SUFFIX "/${ANDROID_ABI}") - # let the user switch ABIs - set(ANDROID_ABI "armeabi-v7a" CACHE STRING "Look at the NDK docs for currently supported ABIs") - - # this is a workaround to compile sfml-activity without the stl library as a dependency + # this is a workaround to compile sfml-activity without stlport_shared as dependency # we save the original compilation command line to restore it later in Macro.cmake - set(CMAKE_CXX_CREATE_SHARED_LIBRARY_WITH_STL ${CMAKE_CXX_CREATE_SHARED_LIBRARY}) - set(CMAKE_CXX_CREATE_SHARED_LIBRARY_WITHOUT_STL " -o ") + set(CMAKE_CXX_CREATE_SHARED_LIBRARY_WITH_STLPORT ${CMAKE_CXX_CREATE_SHARED_LIBRARY}) + set(CMAKE_CXX_CREATE_SHARED_LIBRARY_WITHOUT_STLPORT " -o ") endif() -# Install directories -# For miscellaneous files -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) - set(DEFAULT_INSTALL_MISC_DIR share/SFML) -elseif(SFML_OS_MACOSX) - 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) +# define SFML_STATIC if the build type is not set to 'shared' +if(NOT BUILD_SHARED_LIBS) + add_definitions(-DSFML_STATIC) endif() -# force building sfml-window, if sfml-graphics module is built -if(SFML_BUILD_GRAPHICS AND NOT SFML_BUILD_WINDOW) - message(WARNING "You're trying to build SFML's Graphics module without the Window module. Forcing building of the Window module as a dependency.") - set(SFML_BUILD_WINDOW TRUE) -endif() - -# allow not using bundled dependencies with a switch -# (except for stb_image) -# yes this is horrible, but GLOB_RECURSE sucks -sfml_set_option(SFML_USE_SYSTEM_DEPS FALSE BOOL "TRUE to use system dependencies, FALSE to use the bundled ones.") -if(SFML_USE_SYSTEM_DEPS) - if(SFML_INSTALL_XCODE_TEMPLATES) - message(FATAL_ERROR "XCode templates installation cannot be used with the SFML_USE_SYSTEM_DEPS option (the bundled frameworks are required.)") - endif() - - file(GLOB_RECURSE DEP_LIBS "${CMAKE_SOURCE_DIR}/extlibs/libs*/*") - file(GLOB_RECURSE DEP_BINS "${CMAKE_SOURCE_DIR}/extlibs/bin*/*") - file(GLOB_RECURSE DEP_HEADERS "${CMAKE_SOURCE_DIR}/extlibs/headers/*") - - foreach(DEP_FILE ${DEP_LIBS} ${DEP_BINS} ${DEP_HEADERS}) - get_filename_component(DEP_DIR ${DEP_FILE} PATH) - - if(NOT DEP_DIR MATCHES "/stb_image(/|$)") - set(CMAKE_IGNORE_PATH ${CMAKE_IGNORE_PATH} ${DEP_DIR}) - endif() - - get_filename_component(DEP_PARENT_DIR ${DEP_DIR} PATH) - while(NOT DEP_PARENT_DIR STREQUAL "${CMAKE_SOURCE_DIR}/extlibs") - if(NOT DEP_DIR MATCHES "/stb_image(/|$)") - set(CMAKE_IGNORE_PATH ${CMAKE_IGNORE_PATH} ${DEP_PARENT_DIR}) - endif() - - get_filename_component(DEP_PARENT_DIR ${DEP_PARENT_DIR} PATH) - endwhile() - endforeach() - - list(REMOVE_DUPLICATES CMAKE_IGNORE_PATH) -endif() - -# Visual C++: remove warnings regarding SL security and algorithms on pointers +# remove SL security warnings with Visual C++ if(SFML_COMPILER_MSVC) - # add an option to choose whether PDB debug symbols should be generated (defaults to true when possible) - if(CMAKE_VERSION VERSION_LESS 3.1) - sfml_set_option(SFML_GENERATE_PDB FALSE BOOL "True to generate PDB debug symbols, FALSE otherwise. Requires CMake 3.1.") - if(SFML_GENERATE_PDB) - message(FATAL_ERROR "Generation of PDB files (SFML_GENERATE_PDB) requires at least CMake 3.1.0") - endif() - else() - sfml_set_option(SFML_GENERATE_PDB TRUE BOOL "True to generate PDB debug symbols, FALSE otherwise. Requires CMake 3.1.") - endif() - - add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) endif() # define SFML_OPENGL_ES if needed @@ -258,13 +141,39 @@ if(SFML_OS_MACOSX) endif() endif() - # only the default architecture (i.e. 64-bit) is supported - if(NOT CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64") - message(FATAL_ERROR "Only 64-bit architecture is supported") - endif() - # configure Xcode templates - set(XCODE_TEMPLATES_ARCH "\$(NATIVE_ARCH_ACTUAL)") + if(CMAKE_OSX_ARCHITECTURES) + # maybe multiple arches are present in CMAKE_OSX_ARCHITECTURES + # we simply need to replace ';' by ' ' (space) and store the result in XCODE_TEMPLATES_ARCH + string(REPLACE ";" " " XCODE_TEMPLATES_ARCH "${CMAKE_OSX_ARCHITECTURES}") + else() + # no arch was provided to cmake, so we use the default one + set(XCODE_TEMPLATES_ARCH "\$(NATIVE_ARCH_ACTUAL)") + endif() +endif() + +if(SFML_OS_LINUX OR SFML_OS_FREEBSD) + set(PKGCONFIG_DIR lib${LIB_SUFFIX}/pkgconfig) + if(SFML_OS_FREEBSD) + set(PKGCONFIG_DIR libdata/pkgconfig) + endif() + if(BUILD_SHARED_LIBS) + sfml_set_option(SFML_INSTALL_PKGCONFIG_FILES FALSE BOOL "TRUE to automatically install pkg-config files so other projects can find SFML") + if(SFML_INSTALL_PKGCONFIG_FILES) + foreach(sfml_module IN ITEMS all system window graphics audio network) + CONFIGURE_FILE( + "tools/pkg-config/sfml-${sfml_module}.pc.in" + "tools/pkg-config/sfml-${sfml_module}.pc" + @ONLY) + INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/tools/pkg-config/sfml-${sfml_module}.pc" + DESTINATION "${CMAKE_INSTALL_PREFIX}/${PKGCONFIG_DIR}") + endforeach() + endif() + else() + if(SFML_INSTALL_PKGCONFIG_FILES) + message(WARNING "No pkg-config files are provided for the static SFML libraries (SFML_INSTALL_PKGCONFIG_FILES will be ignored).") + endif() + endif() endif() # enable project folders @@ -279,36 +188,6 @@ endif() if(SFML_BUILD_DOC) add_subdirectory(doc) endif() -if(SFML_BUILD_TEST_SUITE) - if (SFML_OS_IOS) - message( WARNING "Unit testing not supported on iOS") - else() - enable_testing() - add_subdirectory(test) - endif() -endif() - -# on Linux and BSD-like OS, install pkg-config files by default -set(SFML_INSTALL_PKGCONFIG_DEFAULT FALSE) - -if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD) - set(SFML_INSTALL_PKGCONFIG_DEFAULT TRUE) -endif() - -sfml_set_option(SFML_INSTALL_PKGCONFIG_FILES ${SFML_INSTALL_PKGCONFIG_DEFAULT} BOOL "TRUE to automatically install pkg-config files so other projects can find SFML") - -if(SFML_INSTALL_PKGCONFIG_FILES) - sfml_set_option(SFML_PKGCONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${SFML_PKGCONFIG_DIR}" PATH "Install directory for SFML's pkg-config .pc files") - - foreach(sfml_module IN ITEMS all system window graphics audio network) - CONFIGURE_FILE( - "tools/pkg-config/sfml-${sfml_module}.pc.in" - "tools/pkg-config/sfml-${sfml_module}.pc" - @ONLY) - INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/tools/pkg-config/sfml-${sfml_module}.pc" - DESTINATION "${SFML_PKGCONFIG_INSTALL_PREFIX}") - endforeach() -endif() # setup the install rules if(NOT SFML_BUILD_FRAMEWORKS) @@ -316,13 +195,6 @@ if(NOT SFML_BUILD_FRAMEWORKS) DESTINATION . COMPONENT devel FILES_MATCHING PATTERN "*.hpp" PATTERN "*.inl") - - if(SFML_GENERATE_PDB) - install(DIRECTORY ${PROJECT_BINARY_DIR}/lib - DESTINATION . - COMPONENT devel - FILES_MATCHING PATTERN "*.pdb") - endif() else() # find only "root" headers file(GLOB SFML_HEADERS RELATIVE ${PROJECT_SOURCE_DIR} "include/SFML/*") @@ -341,9 +213,6 @@ else() # create SFML.framework add_library(SFML ${SFML_SOURCES}) - # set the target flags to use the appropriate C++ standard library - sfml_set_stdlib(SFML) - # edit target properties set_target_properties(SFML PROPERTIES FRAMEWORK TRUE @@ -353,174 +222,84 @@ else() MACOSX_FRAMEWORK_BUNDLE_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} PUBLIC_HEADER "${SFML_HEADERS}") - # add the non-optional SFML headers - add_custom_command(TARGET SFML POST_BUILD COMMAND cp -r - ${PROJECT_SOURCE_DIR}/include/SFML/Config.hpp - ${PROJECT_SOURCE_DIR}/include/SFML/OpenGL.hpp - ${PROJECT_SOURCE_DIR}/include/SFML/GpuPreference.hpp - ${PROJECT_SOURCE_DIR}/include/SFML/System.hpp - ${PROJECT_SOURCE_DIR}/include/SFML/Main.hpp - ${PROJECT_SOURCE_DIR}/include/SFML/System - $/Headers) + # add the remaining headers + add_custom_command(TARGET SFML + POST_BUILD + COMMAND cp -r ${PROJECT_SOURCE_DIR}/include/SFML/* $/Headers) - # add window module headers if enabled - if(SFML_BUILD_WINDOW) - add_custom_command(TARGET SFML POST_BUILD COMMAND cp -r - ${PROJECT_SOURCE_DIR}/include/SFML/Window.hpp - ${PROJECT_SOURCE_DIR}/include/SFML/Window - $/Headers) - endif() - - # add network module headers if enabled - if(SFML_BUILD_NETWORK) - add_custom_command(TARGET SFML POST_BUILD COMMAND cp -r - ${PROJECT_SOURCE_DIR}/include/SFML/Network.hpp - ${PROJECT_SOURCE_DIR}/include/SFML/Network - $/Headers) - endif() - - # add graphics module headers if enabled - if(SFML_BUILD_GRAPHICS) - add_custom_command(TARGET SFML POST_BUILD COMMAND cp -r - ${PROJECT_SOURCE_DIR}/include/SFML/Graphics.hpp - ${PROJECT_SOURCE_DIR}/include/SFML/Graphics - $/Headers) - endif() - - # add audio module headers if enabled - if(SFML_BUILD_AUDIO) - add_custom_command(TARGET SFML POST_BUILD COMMAND cp -r - ${PROJECT_SOURCE_DIR}/include/SFML/Audio.hpp - ${PROJECT_SOURCE_DIR}/include/SFML/Audio - $/Headers) - endif() - - # adapt install directory to allow distributing dylibs/frameworks in user's frameworks/application bundle - # NOTE: it's not required to link against SFML.framework - set_target_properties(SFML PROPERTIES INSTALL_NAME_DIR "@rpath") - if(NOT CMAKE_SKIP_BUILD_RPATH) - if (CMAKE_VERSION VERSION_LESS 3.9) - set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) - else() - set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_NAME_DIR TRUE) - endif() - endif() + # adapt install directory to allow distributing dylibs/frameworks in user’s frameworks/application bundle + # NOTE: it's not required to link agains SFML.framework + set_target_properties(SFML PROPERTIES + BUILD_WITH_INSTALL_RPATH 1 + INSTALL_NAME_DIR "@rpath") # install rule install(TARGETS SFML - FRAMEWORK DESTINATION "." + FRAMEWORK DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX} COMPONENT devel) endif() -install(FILES license.md DESTINATION ${CMAKE_INSTALL_DOCDIR}) -install(FILES readme.md DESTINATION ${CMAKE_INSTALL_DOCDIR}) +install(FILES license.txt DESTINATION ${INSTALL_MISC_DIR}) +install(FILES readme.txt DESTINATION ${INSTALL_MISC_DIR}) +if(NOT SFML_OS_ANDROID) + install(FILES cmake/Modules/FindSFML.cmake DESTINATION ${INSTALL_MISC_DIR}/cmake/Modules) +endif() # install 3rd-party libraries and tools if(SFML_OS_WINDOWS) - if(NOT SFML_USE_SYSTEM_DEPS) - # install the binaries of SFML dependencies - if(ARCH_32BITS) - install(DIRECTORY extlibs/bin/x86/ DESTINATION ${CMAKE_INSTALL_BINDIR}) - if(SFML_COMPILER_MSVC AND SFML_MSVC_VERSION LESS 14) - install(DIRECTORY extlibs/libs-msvc/x86/ DESTINATION ${CMAKE_INSTALL_LIBDIR}) - elseif(SFML_COMPILER_MSVC) - install(DIRECTORY extlibs/libs-msvc-universal/x86/ DESTINATION ${CMAKE_INSTALL_LIBDIR}) - else() - install(DIRECTORY extlibs/libs-mingw/x86/ DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - elseif(ARCH_64BITS) - install(DIRECTORY extlibs/bin/x64/ DESTINATION ${CMAKE_INSTALL_BINDIR}) - if(SFML_COMPILER_MSVC AND SFML_MSVC_VERSION LESS 14) - install(DIRECTORY extlibs/libs-msvc/x64/ DESTINATION ${CMAKE_INSTALL_LIBDIR}) - elseif(SFML_COMPILER_MSVC) - install(DIRECTORY extlibs/libs-msvc-universal/x64/ DESTINATION ${CMAKE_INSTALL_LIBDIR}) - else() - install(DIRECTORY extlibs/libs-mingw/x64/ DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() + # install the binaries of SFML dependencies + if(ARCH_32BITS) + install(DIRECTORY extlibs/bin/x86/ DESTINATION bin) + if(SFML_COMPILER_MSVC) + install(DIRECTORY extlibs/libs-msvc/x86/ DESTINATION lib) + else() + install(DIRECTORY extlibs/libs-mingw/x86/ DESTINATION lib) + endif() + elseif(ARCH_64BITS) + install(DIRECTORY extlibs/bin/x64/ DESTINATION bin) + if(SFML_COMPILER_MSVC) + install(DIRECTORY extlibs/libs-msvc/x64/ DESTINATION lib) + else() + install(DIRECTORY extlibs/libs-mingw/x64/ DESTINATION lib) endif() endif() elseif(SFML_OS_MACOSX) - # install extlibs dependencies only when used - if(SFML_BUILD_GRAPHICS) - if(FREETYPE_LIBRARY STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/freetype.framework") - install(DIRECTORY extlibs/libs-osx/Frameworks/freetype.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - endif() - if(SFML_BUILD_AUDIO) - if(FLAC_LIBRARY STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/FLAC.framework") - install(DIRECTORY extlibs/libs-osx/Frameworks/FLAC.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - - if(OGG_LIBRARY STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/ogg.framework") - install(DIRECTORY extlibs/libs-osx/Frameworks/ogg.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - - if(VORBIS_LIBRARY STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/vorbis.framework") - install(DIRECTORY extlibs/libs-osx/Frameworks/vorbis.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - - if(VORBISENC_LIBRARY STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/vorbisenc.framework") - install(DIRECTORY extlibs/libs-osx/Frameworks/vorbisenc.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - - if(VORBISFILE_LIBRARY STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/vorbisfile.framework") - install(DIRECTORY extlibs/libs-osx/Frameworks/vorbisfile.framework DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - - if(OPENAL_LIBRARY STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/OpenAL.framework") - install(DIRECTORY "${OPENAL_LIBRARY}" DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - endif() + # install the non-standard frameworks SFML depends on + install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX}) + install(DIRECTORY extlibs/libs-osx/Frameworks/freetype.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX}) # install the Xcode templates if requested if(SFML_INSTALL_XCODE_TEMPLATES) - # configure the templates plist files - foreach(TEMPLATE "SFML Compiler" "SFML App") - configure_file( - "tools/xcode/templates/SFML/${TEMPLATE}.xctemplate/TemplateInfo.plist.in" - "${CMAKE_CURRENT_BINARY_DIR}/tools/xcode/templates/SFML/${TEMPLATE}.xctemplate/TemplateInfo.plist" - @ONLY) - endforeach() + configure_file( + "tools/xcode/templates/SFML/SFML Compiler.xctemplate/TemplateInfo.plist.in" + "${CMAKE_CURRENT_BINARY_DIR}/tools/xcode/templates/SFML/SFML Compiler.xctemplate/TemplateInfo.plist" + @ONLY) install(DIRECTORY "tools/xcode/templates/SFML" "${CMAKE_CURRENT_BINARY_DIR}/tools/xcode/templates/SFML" DESTINATION /Library/Developer/Xcode/Templates - PATTERN "*.in" EXCLUDE - PATTERN ".DS_Store" EXCLUDE) + PATTERN "*.in" EXCLUDE) endif() elseif(SFML_OS_IOS) # fix CMake install rules broken for iOS (see http://public.kitware.com/Bug/view.php?id=12506) - install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/\$ENV{CONFIGURATION}/" DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - if(NOT SFML_USE_SYSTEM_DEPS) - # since the iOS libraries are built as static, we must install the SFML dependencies - # too so that the end user can easily link them to its final application - if(SFML_BUILD_GRAPHICS) - install(FILES extlibs/libs-ios/libfreetype.a DESTINATION lib) - endif() - - if(SFML_BUILD_AUDIO) - install(FILES extlibs/libs-ios/libflac.a - extlibs/libs-ios/libvorbis.a - extlibs/libs-ios/libogg.a - DESTINATION lib) - endif() + if(SFML_OS_IOS) + install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/\$ENV{CONFIGURATION}/" DESTINATION lib${LIB_SUFFIX}) endif() + # since the iOS libraries are built as static, we must install the SFML dependencies + # too so that the end user can easily link them to its final application + install(FILES extlibs/libs-ios/libfreetype.a extlibs/libs-ios/libjpeg.a DESTINATION lib) + elseif(SFML_OS_ANDROID) - if(NOT SFML_USE_SYSTEM_DEPS) - # install extlibs - install(DIRECTORY extlibs/libs-android/${CMAKE_ANDROID_ARCH_ABI} DESTINATION extlibs/lib) - install(FILES extlibs/Android.mk DESTINATION extlibs) - endif() + # install extlibs + install(DIRECTORY extlibs/libs-android/${ANDROID_ABI} DESTINATION extlibs/lib) + install(FILES extlibs/Android.mk DESTINATION extlibs) # install Android.mk so the NDK knows how to set up SFML install(FILES src/SFML/Android.mk DESTINATION .) endif() - -sfml_export_targets() diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index ce2b66c1..00000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,7 +0,0 @@ -# Contribution Guidelines - -You would like to see a feature implemented or a bug fixed in SFML? Great! Contributions to SFML are highly appreciated, be it in the form of general ideas, concrete suggestions or code patches. - -[A few guiding rules have been set up on the SFML website](https://www.sfml-dev.org/contribute.php) that you should be aware of before opening an Issue or Pull Request. They will help you focus on the important stuff and prevent you from losing (y)our time with requests that are out of SFML's scope, known issues, and so on. - -Those rules cover the general scope defined for this project, a coding style, and a precise procedure to report bugs or suggest new features. diff --git a/changelog.md b/changelog.md deleted file mode 100644 index 6174a84f..00000000 --- a/changelog.md +++ /dev/null @@ -1,702 +0,0 @@ -# Changelog - -## SFML 2.5.1 - -Also available on the website: https://www.sfml-dev.org/changelog.php#sfml-2.5.1 - -### General - - * Various CMake fixes (#1414, #1416, #1436, #1439, #1467, #1470) - * Fixed the installation of pkg-config files (#1466) - * Fixed two conversion warnings (#1454) - * [Android] Fixes all symbols in sfml-main are hidden (#1457, #1460) - * [Android] Fixed some `#define` flag problem (#1458) - * [Android] Fix deadlock in main cleanup (#1265) - * [iOS] Modernized toolchain file (#1411) - * [iOS] Check that `` is used (#1412) - * [macOS] Add `-ObjC` flag to fix static linking on macOS (#1485) - -### Window - -**Bugfixes** - - * [iOS] Use default supported rotations when none are specified (#1417) - * [iOS] Fixed autocomplete window overlaps keyboard (#1473, #1482) - * [Linux] Fixed dual monitor issue (#1226, #1238) - * [Linux] Fixed issue where fullscreen window didn't go over task bars on top and left on in Ubuntu (#1224) - * [Linux] Fixed the Unix clipboard implementation causing an abort due to internal data races in Xlib (#1437) - * [macOS] Added additional system cursors (#1401, #1413, #1425) - * [Windows] Fixed swapped colors for custom cursors (#1464, #1465, #1491) - -### Graphics - -**Bugfixes** - - * Fixed a bug in which a `sf::RenderTexture` would not be re-activated after being re-created (#1438) - * Fixed `sf::RenderTextureImplFBO`'s destructor incorrectly triggering deletion of other `sf::RenderTextureImplFBO`'s active FBOs (#1440) - * Fix `sf::RenderWindow::setActive` incorrectly trying to unbind an FBO during deactivation (#1442) - * Fixed `sf::RenderTexture::display()` dereferencing a NULL pointer when being called before `sf::RenderTexture::create()` (#1446) - * Fixed bug in `sf::Text` when applying an outline color/thickness (#1176) - * Squash duplicated `sf::Font` glyphs to single chars (#1461) - * Fixed two issues with glyph sub-pixel positioning (#1452) - * Reduced context locking & unlocking while creating textures (#1459) - * Fixed the error message when the wrong bitmap font size is selected (#1456, #1474, #1492) - -### Audio - -**Bugfixes** - - * Fixed performance issue with reading WAV files (#1450) - -## SFML 2.5.0 - -Also available on the website: https://www.sfml-dev.org/changelog.php#sfml-2.5.0 - -### General - - * Replaced FindSFML.cmake with SFMLConfig.cmake (#1335) - * Markdown'd and updated readme, changelog, contributing and license files (#1196, #1368, #1317) - * Improve packaging support (#1173) - * Added Tagfile generation and search (#1327) - * Added CMake variables to select the modules to be built (#798, #800) - * Do not install extlibs if `SFML_USE_SYSTEM_DEPS` is true (#1236, #1237) - * Fixed various type conversion/comparison warnings (#1325) - * [Android] Increased minimum API version to 14 (#1362) - * [Android] Removed custom toolchain and added support for the newest NDK version and Gradle (#1350, #1393) - * [iOS] Updated the binary libs from exlibs/libs-ios (#1207, #1209) - * [iOS] Use a CMake toolchain file for iOS build (#1268, #1269) - * [iOS] Install extlibs if needed (#1348) - * [iOS] Drop 32 bit support (#1374) - * [iOS] Force correct iOS architecture for cmake (#1373, #1377) - * [iOS] Added iOS example (#1378) - * [macOS] Fixed launch of cocoa examples (#1334) - * [macOS] Improved application signing process (#1020, #1036, #1194) - * [macOS] Improved CMake script (#1215, #1371) - * [macOS] Use `-stdlib=libc++` (#1361) - * [OpenBSD] Added support for OpenBSD (#1330) - -### System - -**Bugfixes** - - * Added protected destructor to `sf::NonCopyable` to prevent possible resource leaks (#1125, #1161) - * Fixed crash when `sf::Clock` is constructed in a global scope (#1258) - -### Window - -**Features** - - * Implemented Cursor API (#269, #784, #827) - * Implemented Clipboard API (#715, #1204, #1221) - * Renamed a few key codes (#1395) - * Added joystick example (#1363) - * [Windows] Added support for interfacing with joysticks via DirectInput when it is available (#1251, #1326) - * [Windows] Fix discrete GPU preference symbols being exported from the wrong place (#1192, #1406) - -**Bugfixes** - - * [Android] Return correct key code for delete/backspace (#1309, #1362) - * [iOS] Don't need to find vorbisfile or vorbisenc (#1347) - * [Linux] Fixed `sf::Window::getPosition()` returning incorrect position because of differences in window managers (#1228, #1266) - * [Linux] Fix X11 key repeat handling not filtering out events from other windows (#1223, #1230, #1291) - * [Linux] Restore fullscreen of a non-visible window (#1339) - * [macOS] Fixed window menu not working (#1091, #1180, #1193) - * [macOS] Fixed crash with application messing hardware detection e.g. TeamViewer (#1323) - * [macOS] Added support for (some) Hat/POV axis (#1248) - * [Windows] Prevent uninitialized read by zeroing memory (#1264) - * [Windows] Fixed modifier keys handling (#1357) - -### Graphics - -**Features** - - * Implemented additional line spacing and letter spacing in `sf::Text` (#928, #1366) - * Added `sf::VertexBuffer` class (#1308) - * Added GPU local texture copying support, allowing performance optimizations and texture swapping (#1119, #1319, #1320) - * Optimize performance by skipping `glTexCoordPointer()` call if not needed (#1015) - * Generate shape outline vertices only if necessary (#925, #1356) - * Removed dependency to libjpeg, stb_image_write now supports writing JPEG files (#1278, #1279) - * Enable comparing `sf::Transform` and optimize resetting OpenGL back to the identity matrix (#1298) - * Added missing `setActive()` virtual method to `sf::RenderTarget` (#1157) - * Updated stb_image to v2.16 and stb_image_write to v1.07 (#1270) - * Added `sf::RenderTexture` stencil and multisampling support (#1274, #1285) - * Added example demonstrating `sf::VertexBuffer`, `sf::Shader` and `sf::Thread` usage (#1352) - * Optimized `sf::RenderTexture` performance (#1379) - -**Bugfixes** - - * Properly free memory in `sf::Font::cleanup()` (#1119) - * Fixed memory leak in `sf::Font` (#1216) - * Fix OpenGL texture coordinate pointer not being updated correctly under certain conditions (#1297) - * Fix for broken text when the font is reloaded (#1345) - * Fix memory leak in `sf::Text` (#1233, #1360) - * Fixed strict aliasing punning warning when generating the key of a glyph in Font.cpp (#1187, #1396) - * Fixed OpenGL version string being parsed incorrectly on some platforms (#1249, #1390) - * [macOS] Worked around render target bug (#1132, #1342) - * [Windows] Replaced time-based joystick poll with a hardware event handler (#1179, #1195, #1198, #1199, #1421) - -### Audio - -**Features** - - * Added loop point support to `sf::Music` (#177, #629) - * Added support for the extensible PCM wave file format (#1296) - * [iOS] Enable audio module (#1338) - -**Bugfixes** - - * Fixed inconsistent seek behavior in `sf::SoundStream` (#1118) - * Fixed stack overflow in `sf::SoundStream::fillAndPushBuffer()` (#1154) - * Fixed seeking quirks in the FLAC reader (#966, #1162) - * Allow polymorphism with `sf::SoundSource` (#1185) - * Fixed WAV file writer writing wrong header values (#1280, #1281) - * Small bugfix to argument of `alcCaptureOpenDevice()` (#1304, #1305) - * [iOS] Find OpenAL correctly (#1263, #1376) - * [Windows] Updated OpenAL Soft to 1.18.1 fixing crashes (#1247, #1260) - -### Network - -**Features** - - * Add append/overwrite parameter to Ftp::upload (#1072, #1399) - -**Bugfixes** - - * Fixed wrong condition for building network support (#1253) - * Changed TCP listen backlog from 0 to SOMAXCONN (#1369, #1407) - * Fixed socket reuse not conforming to documentation (#1346, #1408) - -## SFML 2.4.2 - -Also available on the website: https://www.sfml-dev.org/changelog.php#sfml-2.4.2 - -### System - -**Bugfixes** - - * [Windows] Removed thread affinity changes in sf::Clock (#1107) - -### Window - -**Bugfixes** - - * Fixed bug where TransientContextLock would hang (#1165, #1172) - * [Linux] Fixed GLX extensions being loaded too late (#1183) - * [Linux] Fix wrong types passed to XChangeProperty (#1168, #1171) - * [Windows] Make context disabling via wglMakeCurrent more tolerant of broken drivers (#1186) - -### Graphics - -**Bugfixes** - - * Optimized sf::Image::create and made it more exception safe (#1166) - -## SFML 2.4.1 - -Also available on the website: https://www.sfml-dev.org/changelog.php#sfml-2.4.1 - -### General - - * [kFreeBSD] Define SFML_OS_FREEBSD when compiling for kFreeBSD (#1129) - * [Windows] Added some simple messaging when trying to build under Cygwin (#1153) - -### Window - -**Bugfixes** - - * Fixed stack overflow on GlContext creation with multiple threads (#989, #1002) - * Adjusted mouse cursor grab documentation (#1133) - * [iOS] Fixed orientation change not rescaling window size properly (#1049, #1050) - * [Linux] Fixed fullscreen issue (#921, #1138) - * [Linux] Switched from XCB back to Xlib for windowing (#1138) - * [Linux] Fixed window icon not showing up on some distros (#1087, #1088) - * [Linux] Fixed an issue where GNOME flags window unresponsive (#1089, #1138) - * [Linux] Fixed leak of XVisualInfo objects during GlxContext creation (#1135) - * [Linux] Fixed possible hang when setting visibility if external window sources (#1136) - * [macOS] Fixed inconsistency between doc and impl on macOS for the grab feature (#1133, #1148, #1150) - * [Windows] Fixed context memory leaks (#1143, #1002) - -### Graphics - -**Bugfixes** - - * Adjusted uniform error message (#1131) - * Clarify documentation on Rect::contains function bounds (#1151) - -### Network - -**Bugfixes** - - * Fixed a typo in comment for void unbind() (#1121) - -## SFML 2.4.0 - -Also available on the website: https://www.sfml-dev.org/changelog.php#sfml-2.4.0 - -### General - - * Added deprecation macro (#969) - * Fixed issues reported by Coverity Scan static analysis (#1064) - * Fixed some initialization issues reported by Cppcheck (#1008) - * Changed comment chars in FindSFML.cmake to # (#1090) - * Fixed some typos (#1098, #993, #1099, #956, #963, #979) - * Updated/fixed string comparisons in Config.cmake (#1102) - * Added the missing -s postfix for the RelWithDebInfo config (#1014) - * [Android] Fixed current Android compilation issues (#1116, #1111, #1079) - * [macOS] Update Xcode template material (#976, #968) - * [Windows] Added support for VS 2015 (#972) - * [Windows] Create and install PDB debug symbols alongside binaries (#1037) - -### Deprecated API - - * sf::RenderWindow::capture(): Use a sf::Texture and its sf::Texture::update(const Window&) function and copy its contents into an sf::Image instead. - * sf::Shader::setParameter(): Use setUniform() instead. - * sf::Text::getColor(): There is now fill and outline colors instead of a single global color. Use getFillColor() or getOutlineColor() instead. - * sf::Text::setColor(): There is now fill and outline colors instead of a single global color. Use setFillColor() or setOutlineColor() instead. - * sf::LinesStrip: Use LineStrip instead. - * sf::TrianglesFan: Use TriangleFan instead. - * sf::TrianglesStrip: Use TriangleStrip instead. - -### System - -**Features** - - * [Android] Added sf::getNativeActivity() (#1005, #680) - -**Bugfixes** - - * Added missing include in String.hpp (#1069, #1068) - * Fixed encoding of UTF-16 (#997) - * [Android] Fixed crash when trying to load a non-existing font file (#1058) - -### Window - -**Features** - - * Added ability to grab cursor (#614, #394, #1107) - * Added Multi-GPU preference (#869, #867) - * Added support for sRGB capable framebuffers (#981, #175) - * [Linux, Windows] Improved OpenGL context creation (#884) - * [Linux, Windows] Added support for pbuffers on Windows and Unix (#885, #434) - -**Bugfixes** - - * Updated platform-specific handle documentation (#961) - * [Android] Accept touch events from "multiple" devices (#954, #953) - * [Android] Copy the selected EGL context's settings to SFML (#1039) - * [Linux] Fixed modifiers causing sf::Keyboard::Unknown being returned (#1022, #1012) - * [macOS] Improved memory management on macOS (#962, #790) - * [macOS] Fixed crash when resizing a window to a zero-height/width size (#986, #984) - * [macOS] Use the mouse button constant instead of 0 to avoid a compiler error on macOS (#1035) - * [macOS] macOS improvement: warnings + bugfix + refactoring, the lot! (#1042) - -### Graphics - -**Features** - - * Added support for outlined text (#840) - * Add support for geometry shaders (#886, #428) - * Feature/blend mode reverse subtract (#945, #944) - * Implemented support for mipmap generation (#973, #498, #123) - * Added new API to set shader uniforms (#983, #538) - * Rewrite RenderWindow::capture (#1001) - -**Bugfixes** - - * Exporting some Glsl utility functions due to linking issues (#1044, #1046) - * Fixed missing initialisation of Font::m_stroker (#1059) - * Changed primitive types to be grammatically correct (#1095, #939) - -### Audio - -**Features** - - * Implemented stereo audio recording (#1010) - -**Bugfixes** - - * Added an assignment operator to SoundSource (#864) - * [macOS] Updates OpenAL-soft for macOS to version 1.17.2 (#1057, #900, #1000) - * Fixed a bug where vorbis can't handle large buffers (#1067) - * Added support for 24-bit .wav files (#958, #955) - * Fixed threading issue in sf::SoundRecorder (#1011) - * Made WAV file reader no longer assume that data chunk goes till end of file to prevent reading trailing metadata as samples (#1018) - * Fixed seeking in multi channel FLAC files (#1041, #1040) - -### Network - -**Features** - - * Added optional argument on which address to bind (socket). (#850, #678) - -**Bugfixes** - - * Fixed FTP directory listing blocking forever (#1086, #1025) - -## SFML 2.3.2 - -Also available on the website: https://www.sfml-dev.org/changelog.php#sfml-2.3.2 - -### General - - * Fixed an issue where FindSFML.cmake couldn't find older versions of SFML (#903) - * Robust alCheck and glCheck macros (#917) - * Fixed FindSFML.cmake to use the uppercase FLAC name (#923) - * Added a CONTRIBUTING file so GitHub shows a message when creating a new issue (#932) - -### Window - -**Bugfixes** - - * [Linux] Fixed an issue where the keypad's key weren't being detected (#910) - * [Linux] Revert to Xlib event handling (#934) - * [Linux] Fixed `XK_*` inconsistency in InpuImpl.cpp (#947) - * [Linux] Fix `_NET_WM_PING` messages not being replied to properly (#947) - -### Graphics - -**Bugfixes** - - * Fixed clear bug on RenderTextures (#915) - * Fixed image file extension detection (#929, #930, #931) - * Secure function against random data return (#935, #942) - -## SFML 2.3.1 - -Also available on the website: https://www.sfml-dev.org/changelog.php#sfml-2.3.1 - -### Window - -**Bugfixes** - - * [Android] Make sure a window still exists before trying to access its dimensions (#854) - * [Android] Added Android API level checks (#856) - * [Android] Updated the JNI/event handling code (#906) - * [Linux] Resized events are only spawned when the window size actually changes (#878, #893) - * [Linux] Whitelisted X SHAPE events (#879, #883) - * [Linux] Remap Unix keyboard when user changes layout (#895, #897) - * [Linux] Fix undefined behavior in ewmhSupported() (#892, #901) - -### Graphics - -**Bugfixes** - - * Added support for GL_EXT_texture_edge_clamp for systems that don't expose GL_SGIS_texture_edge_clamp (#880, #882) - -### Audio - -**Bugfixes** - - * [Android] Fixed audio files not loading (and possibly crashing) (#855, #887) - -## SFML 2.3 - -Also available on the website: https://www.sfml-dev.org/changelog.php#sfml-2.3 - -### General - - * Examples only link against sfml-main in release mode (#610, #766) - * Replaced unsigned int with std::size_t for array indices and sizes (#739) - * Fixed some issues with the Doxygen documentation (#750) - * Added support for EditorConfig (#751) - * Hide success message for CMake in quiet mode (#753) - * Improved documentation for statuses with sf::Ftp (#763) - * Moved stb_image into the extlibs directory (#795) - * Changed the SOVERSION to major.minor (#812) - * Fixed warnings about switch-statements (#863) - * Added missing includes in the general headers (#851) - * [Android] Updated toolchain file and dependencies (#791) - * [Linux] Fixed missing pthread dependency (#794) - * [macOS] Relaxed CMake installation rules regarding framework dependencies (#767) - -### Deprecated API - - * sf::Event::MouseWheelEvent: This event is deprecated and potentially inaccurate. Use MouseWheelScrollEvent instead. - -### Window - -**Features** - - * Added new events for handling high-precision scrolling (#95, #810, #837) - * Switched from Xlib to XCB (#200, #319, #694, #780, #813, #825) - * Added support for OpenGL 3 core context creation (#654, #779) - -**Bugfixes** - - * Fixed glXSwapIntervalSGI being broken for some driver implementations (#727, #779) - * Fixed simultaneous context operations causing crashes on some AMD hardware (#778, #779) - * Fixed joystick identification (#809, #811) - * [iOS] Fixed various issues including stencil bits, device orientation and retina support (#748) - * [iOS] Fixed inconsistency between sf::Touch::getPosition and touch events (#875) - * [Linux] Fixed Alt+F4 not getting triggered in window mode (#274) - * [Linux] Fixed Unix joystick stuff (#838) - * [macOS] Fixed typo in JoystickImpl.cpp to prevent a crash (#762, #765) - * [macOS] Fixed an issue in InputImpl::getSFOpenGLViewFromSFMLWindow (#782, #792) - -### Graphics - -**Features** - - * Replaced GLEW with loader generated by glLoadGen (#779) - * Added a new constructor to sf::Color that takes an sf::Uint32 (#722) - * Updated stb_image to v2.02 (#777) - * Updated FreeType to v2.5.5 (#799, #804) - * Added checks for software OpenGL (#870) - -**Bugfixes** - - * Fixed GL_ARB_compatibility not being detected (#859) - * Fixed pixel format selection (#862) - * Bumped back the OpenGL version requirement to 1.1 (#858) - -### Audio - -**Features** - - * Dropped libsndfile and started using Vorbis, FLAC and OGG directly (#604, #757) - * Added a FLAC file to the sound example (#815) - -**Bugfixes** - - * Fixed access violation error in the destructor of sf::AudioDevice (#30, #602) - * [macOS] Fixed threading issue with sf::SoundStream and OpenAL (#541, #831) - -### Network - -**Bugfixes** - - * Fixed sf::TcpSocket not handling partial sends properly (#749, #796) - -## SFML 2.2 - -Also available on the website: https://www.sfml-dev.org/changelog.php#sfml-2.2 - -### General - - * Support for iOS and Android platform (#410, #440) - * Various documentation corrections (#438, #496, #497, #714) - * Fixed support for compilers on Debian FreeBSD (#380, #578) - * Added support for Visual Studio 2013 and proper support for the TDM builds (#482) - * Fixed CMake problems related to FindSFML and cached variables (#637, #684) - * Switched and enforced LF line endings (#708, #712) - * Updated OpenAL to version 1.15.1 (d077210) - * Made compiler and OS variable names much clearer in CMake files (9b0ed30) - * Re-enabled RPATH feature (e157e7a) - * Slight adjustments to the examples (#737) - * [FreeBSD] Various configuration fixes (#577, #578) - * [Linux] Updated FindSFML.cmake to add UDev to SFML's dependencies (#728, #729, #734, #736) - * [macOS] Fixed incorrect symlink in freetype.framework (#519) - * [macOS] CMake module for correct dependencies (#548) - * [macOS] Fixed SFML target for Xcode (#595, #596) - * [macOS] Updated implementation, mainly reverting to non-ARC (#601) - * [macOS] Fixed memory leaks and dead store (#615) - * [macOS] Improved event handling and performance (#617) - * [macOS] Reduced memory usage (#672, #698) - * [macOS] macOS 10.10 support (#691, #699) - * [macOS] Improve flexibility of dependencies' locations (#713) - * [Windows] Removed the hack that copied external libraries into SFML static libraries (dbf01a7) - -### System - -**Features** - - * Added substring and replace functions to sf::String (#21, #355) - * Added toUtfX to sf::String (#501) - * Added fromUtfX functions to set the internal data to a string by converting from another string in a fixed encoding (#196) - * Added modulo operator for sf::Time (#429, #430) - * Added division operator for sf::Time (#453) - -**Bugfixes** - - * Ensured a high resolution for sf::sleep (#439, #475) - * [Windows] Fixed stack unalignment by two internal functions (#412) - -### Window - -**Features** - - * Added window methods to request and to check focus (#518, #525, #613, #723, #735) - * Provide name, manufacturer ID and product ID via sf::Joystick (#152, #528) - * [FreeBSD] Joystick support (#477) - * [macOS] Improved integration with menus and dock actions (#11) - * [macOS] Support for OpenGL 3.2 (#84) - * [macOS] Improved fullscreen support (#343) - * [macOS] Added support for retina displays (#353, #388) - * [Windows] Removed support for Windows 9x (#469) - * [Windows] Fixed typo in Windows keyboard implementation (#516) - -**Bugfixes** - - * sf::Window::create() now also resets framerate limit (#371) - * Fixed OpenGL context leak (#635, #705) - * Fixed various joystick problems (memory leak, accelerometer detected, code refactoring) (#660, #686, #742, #743) - * Optimized sf::Window::waitEvent a bit, no sleep if events are available at first try (ff555d6) - * [Linux] Output error message when XOpenDisplay() fails (#508, #616) - * [Linux] Resize window with setSize when sf::Style::Resize is set (#466) - * [Linux] Fixed broken key repeat on window recreation (#564, #567) - * [macOS] Fixed KeyReleased not being fired in fullscreen mode (#465) - * [macOS] Fixed an issue where disconnecting the keyboard would cause a crash (#467) - * [macOS] Fixed unexpected resizing behavior (#468) - * [macOS] Improved resizing windows (#474) - * [macOS] Fixed memory leak with sf::Window::create() (#484) - * [macOS] Fixed menu shortcuts in fullscreen on macOS (#527) - * [macOS] Improved cursor hiding (#703) - * [macOS] Fixed right click not detected with trackpads (#716, #730) - * [Windows] Fixed joystick POV values (ef1d29b) - * [Windows] Fixed Unicode inconsistency (#635) - * [Windows] Fixed Alt+F4 and mouse clicks issues (#437, #457) - * [Windows] Send MouseButtonReleased event when the mouse is outside of the window (#455, #457) - * [Windows] Fixed sf::Joystick wrong registry usage (#701, #702, #706) - -### Graphics - -**Features** - - * Provide more information about the loaded font in sf::Font (#164) - * Implemented a more flexible blending system (#298) - * Added strikethrough text style (#243, #362, #682) - * Slight optimization for sf::Text::setString (#413) - * Added subtraction operator for sf::Color (#114, #145) - * Optimized sf::Image::flipVertically/flipHorizontally (#555) - * Changed sf::Font measurements from int to float to allow better underline drawing (#693) - -**Bugfixes** - - * Improved text quality for small and pixelated fonts (#228) - * Yet another fix for Intel GPUs with sf::RenderTexture (#418) - * Removed VTab since it causes issues and doesn't have a use nowadays (#442, #445, #460, #588) - * Fixed broken BDF and PCF font formats (#448) - * Fixed compilation issue with newer versions of GCC for sf::Rect (#458) - * Fixed resetGLStates() not explicitly setting the default polygon mode (#480) - * Fixed division-by-zero in sf::RectangleShape (#499) - * Fixed potential memory leak in sf::Font (#509) - * Updated glext and removed glxext (#511, #583) - * Make sure texture unit 0 is active when resetting sf::RenderTarget states (#523, #591) - * Fixed texture rect computation in fonts (#669) - * Improved rendering of underlined text (#593) - * Avoided repeated output of error messages (#566) - * Fixed text rendered with vertical offset on ascent and font size mismatch (#576) - * Fixed rounding problem for viewports (#598) - * Fixed sf::Shader::isAvailable() possibly breaking context management (#211, #603, #608, #603) - * Fixed sf::Texture::getMaximumSize() possibly breaking context management (#666) - * Fixed various sf::Text rendering issues (#692, #699) - * The texture matrix is now reset in sf::Texture::bind(NULL) (7c4b058) - * [Windows] Fixed DPI scaling causing strange window behavior (#679, #681, #688) - -### Audio - -**Features** - - * Added support for selecting the audio capture device (#220, #470) - * Make sf::SoundRecorder processing frequency configurable (#333) - * Added up vector to sf::Listener (#545) - -**Bugfixes** - - * Prevented sf::SoundStream::setPlayingOffset() from restarting playing even when paused (#203, #592) - * Fixed sf::SoundBuffer contents not being able to be updated when still attached to sounds (#354, 367, #390, #589) - * Catch audio format error and prevent division by zero (#529) - * Fixed sf::SoundBuffer returning wrong duration for sounds containing more than ~4.3 million samples (2ff58ed) - * Optimized sf::Listener with a cache (d97e524) - -### Network - -**Features** - - * Added support for PUT and DELETE in sf::Http (#257, #312, #607) - * Added support for chunked HTTP transfers (#296, #337) - * Added support for 64-bit integers in sf::Packet (#710) - * Made sf::Ftp::sendCommand() public (2c5cab5) - -**Bugfixes** - - * Checked socket descriptor limit (#153, #628, #683) - * Fixed sf::TcpSocket::connect()'s switching from blocking to non-blocking mode on immediate connection success (#221) - * Fixed FTP download and upload file sizes being limited by available RAM (#565, #590) - * Fixed C++11 compiler warnings for sf::Uint8 (#731, #732) - -## SFML 2.1 - -Also available on the website: https://www.sfml-dev.org/changelog.php#sfml-2.1 - -### General - - * Updated the Window and OpenGL examples (got rid of GLU and immediate mode) - -### Window - -**Features** - - * Now using inotify on Linux to avoid constantly polling joystick connections (#96) - * Add keypad return, equal and period keys support for macOS - * Improved mouse events on macOS regarding fullscreen mode - * Improved mouse events on macOS (#213, #277) - * Improved reactivity of setMousePosition on macOS (#290) - * Added support for right control key on macOS - * Improved TextEntered for macOS (#377) - * Improved the performances of Window::getSize() (the size is now cached) - * Added the WM_CLASS property to SFML windows on Linux - * Fake resize events are no longer sent when the window is moved, on Linux - * Pressing ALT or F10 on Windows no longer steals the focus - -**Bugfixes** - - * Fixed MouseMove event sometimes not generated when holding left button on Windows (#225) - * Fixed ContextSettings ignored when creating a 3.x/4.x OpenGL context on Linux (#258) - * Fixed ContextSettings ignored on Linux when creating a window (#35) - * Fixed windows bigger than the desktop not appearing on Windows (#215) - * Fixed KeyRelease events sometimes not reported on Linux (#404) - * Fixed mouse moved event on macOS when dragging the cursor (#277) - * Fixed KeyRelease event with CMD key pressed (#381) - * Fixed taskbar bugs on Windows (#328, #69) - * Fixed Window::getPosition() on Linux (#346) - * Unicode characters outside the BMP (> 0xFFFF) are now correctly handled on Windows (#366) - -### Graphics - -**Features** - - * Checking errors in RenderTarget::pushGLStates() to avoid generating false error messages when user leaves unchecked OpenGL errors (#340) - * Optimized Shader::setParameter functions, by using a cache internally (#316, #358) - -**Bugfixes** - - * Fixed bounding rect of sf::Text ignoring whitespaces (#216) - * Solved graphics resources not updated or corrupted when loaded in a thread (#411) - * Fixed white pixel showing on first character of sf::Text (#414) - * sf::Rect::contains and sf::Rect::intersects now handle rectangles with negative dimensions correctly (#219) - * Fixed Shape::setTextureRect not working when called before setTexture - -### Audio - -**Features** - - * loadFromStream functions now explicitly reset the stream (seek(0)) before starting to read (#349) - -**Bugfixes** - - * Added a workaround for a bug in the macOS implementation of OpenAL (unsupported channel count no properly detected) (#201) - * Fixed SoundBuffer::loadFromStream reading past the end of the stream (#214) - -### Network - -**Features** - - * Replaced the deprecated gethostbyname with getaddrinfo (#47) - * Minor improvements to sf::Packet operators (now using strlen and wcslen instead of explicit loops) (#118) - -**Bugfixes** - - * Fixed non-blocking connection with a sf::TcpSocket on Windows - * Fixed TCP packet data corruption in non-blocking mode (#402, #119) - * On Unix systems, a socket disconnection no longer stops the program with signal SIGPIPE (#72) - -## SFML 2.0 - -Also available on the website: https://www.sfml-dev.org/changelog.php#sfml-2.0 - -No changelog available. *Everything changed.* - -## Older Releases - -See the website for changelogs of older releases: https://www.sfml-dev.org/changelog.php diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 00000000..dc73ee20 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,172 @@ +SFML 2.2 +======== + +Also available on the website: http://www.sfml-dev.org/changelog.php#sfml-2.2 + +General +======= + +* Support for iOS and Android platform (#410, #440) +* Various documentation corrections (#438, #496, #497, #714) +* Fixed support for compilers on Debian FreeBSD (#380, #578) +* Added support for Visual Studio 2013 and proper support for the TDM builds (#482) +* Fixed CMake problems related to FindSFML and cached variables (#637, #684) +* Switched and enforced LF line endings (#708, #712) +* Updated OpenAL to version 1.15.1 (d077210) +* Made compiler and OS variable names much clearer in CMake files (9b0ed30) +* Re-enabled RPATH feature (e157e7a) +* Slight adjustments to the examples (#737) +* [FreeBSD] Various configuration fixes (#577, #578) +* [Linux] Updated FindSFML.cmake to add UDev to SFML's dependencies (#728, #729, #734, #736) +* [OS X] Fixed incorrect symlink in freetype.framework (#519) +* [OS X] CMake module for correct dependencies (#548) +* [OS X] Fixed SFML target for Xcode (#595, #596) +* [OS X] Updated implementation, mainly reverting to non-ARC (#601) +* [OS X] Fixed memory leaks and dead store (#615) +* [OS X] Improved event handling and performance (#617) +* [OS X] Reduced memory usage (#672, #698) +* [OS X] OS X 10.10 support (#691, #699) +* [OS X] Improve flexibility of dependencies' locations (#713) +* [Windows] Removed the hack that copied external libraries into SFML static libraries (dbf01a7) + + +System +====== + +Features +-------- +* Added substring and replace functions to sf::String (#21, #355) +* Added toUtfX to sf::String (#501) +* Added fromUtfX functions to set the internal data to a string by converting from another string in a fixed encoding (#196) +* Added modulo operator for sf::Time (#429, #430) +* Added division operator for sf::Time (#453) + +Bugfixes +-------- +* Ensured a high resolution for sf::sleep (#439, #475) +* [Windows] Fixed stack unalignment by two internal functions (#412) + + +Window +====== + +Features +-------- +* Added window methods to request and to check focus (#518, #525, #613, #723, #735) +* Provide name, manufacturer ID and product ID via sf::Joystick (#152, #528) +* [FreeBDS] Joystick support (#477) +* [OS X] Improved integration with menus and dock actions (#11) +* [OS X] Support for OpenGL 3.2 (#84) +* [OS X] Improved fullscreen support (#343) +* [OS X] Added support for retina displays (#353, #388) +* [Windows] Removed support for Windows 9x (#469) +* [Windows] Fixed typo in Windows keyboard implementation (#516) + +Bugfixes +-------- +* sf::Window::create() now also resets framerate limit (#371) +* Fixed OpenGL context leak (#635, #705) +* Fixed various joystick problems (memory leak, accelerometer detected, code refactoring) (#660, #686, #742, #743) +* Optimized sf::Window::waitEvent a bit, no sleep if events are available at first try (ff555d6) +* [Linux] Output error message when XOpenDisplay() fails (#508, #616) +* [Linux] Resize window with setSize when sf::Style::Resize is set (#466) +* [Linux] Fixed broken key repeat on window recreation (#564, #567) +* [OS X] Fixed KeyReleased not being fired in fullscreen mode (#465) +* [OS X] Fixed an issue where disconnecting the keyboard would cause a crash (#467) +* [OS X] Fixed unexpected resizing behavior (#468) +* [OS X] Improved resizing windows (#474) +* [OS X] Fixed memory leak with sf::Window::create() (#484) +* [OS X] Fixed menu shortcuts in fullscreen on OS X (#527) +* [OS X] Improved cursor hiding (#703) +* [OS X] Fixed right click not detected with trackpads (#716, #730) +* [Windows] Fixed joystick POV values (ef1d29b) +* [Windows] Fixed Unicode inconsistency (#635) +* [Windows] Fixed Alt+F4 and mouse clicks issues (#437, #457) +* [Windows] Send MouseButtonReleased event when the mouse is outside of the window (#455, #457) +* [Windows] Fixed sf::Joystick wrong registry usage (#701, #702, #706) + + +Graphics +======== + +Features +-------- +* Provide more information about the loaded font in sf::Font (#164) +* Implemented a more flexible blending system (#298) +* Added strikethrough text style (#243, #362, #682) +* Slight optimization for sf::Text::setString (#413) +* Added subtraction operator for sf::Color (#114, #145) +* Optimized sf::Image::flipVertically/flipHorizontally (#555) +* Changed sf::Font measurements from int to float to allow better underline drawing (#693) + +Bugfixes +-------- +* Improved text quality for small and pixelated fonts (#228) +* Yet another fix for Intel GPUs with sf::RenderTexture (#418) +* Removed VTab since it causes issues and doesn't have a use nowadays (#442, #445, #460, #588) +* Fixed broken BDF and PCF font formats (#448) +* Fixed compilation issue with newer versions of GCC for sf::Rect (#458) +* Fixed resetGLStates() not explicitly setting the default polygon mode (#480) +* Fixed division-by-zero in sf::RectangleShape (#499) +* Fixed potential memory leak in sf::Font (#509) +* Updated glext and removed glxext (#511, #583) +* Make sure texture unit 0 is active when resetting sf::RenderTarget states (#523, #591) +* Fixed texture rect computation in fonts (#669) +* Improved rendering of underlined text (#593) +* Avoided repeated output of error messages (#566) +* Fixed text rendered with vertical offset on ascent and font size mismatch (#576) +* Fixed rounding problem for viewports (#598) +* Fixed sf::Shader::isAvailable() possibly breaking context management (#211, #603, #608, #603) +* Fixed sf::Texture::getMaximumSize() possibly breaking context management (#666) +* Fixed various sf::Text rendering issues (#692, #699) +* The texture matrix is now reset in sf::Texture::bind(NULL) (7c4b058) +* [Windows] Fixed DPI scaling causing strange window behavior (#679, #681, #688) + + +Audio +===== + +Features +-------- +* Added support for selecting the audio capture device (#220, #470) +* Make sf::SoundRecorder processing frequency configurable (#333) +* Added up vector to sf::Listener (#545) + +Bugfixes +-------- +* Prevented sf::SoundStream::setPlayingOffset() from restarting playing even when paused (#203, #592) +* Fixed sf::SoundBuffer contents not being able to be updated when still attached to sounds (#354, 367, #390, #589) +* Catch audio format error and prevent division by zero (#529) +* Fixed sf::SoundBuffer returning wrong duration for sounds containing more than ~4.3 million samples (2ff58ed) +* Optimized sf::Listener with a cache (d97e524) + +Network +======= + +Features +-------- +* Added support for PUT and DELETE in sf::Http (#257, #312, #607) +* Added support for chunked HTTP transfers (#296, #337) +* Added support for 64-bit integers in sf::Packet (#710) +* Made sf::Ftp::sendCommand() public (2c5cab5) + +Bugfixes +-------- +* Checked socket descriptor limit (#153, #628, #683) +* Fixed sf::TcpSocket::connect()'s switching from blocking to non-blocking mode on immediate connection success (#221) +* Fixed FTP download and upload file sizes being limited by available RAM (#565, #590) +* Fixed C++11 compiler warnings for sf::Uint8 (#731, #732) + + + +SFML 2.1 +======== + +Please refer to the release announcement: http://en.sfml-dev.org/forums/index.php?topic=76.msg86454#msg86454 + + + +SFML 2.0 +======== + +Please refer to the release announcement: http://en.sfml-dev.org/forums/index.php?topic=76.msg78424#msg78424 diff --git a/cmake/Config.cmake b/cmake/Config.cmake index ec382089..bb726ba3 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake @@ -1,5 +1,5 @@ # detect the OS -if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(SFML_OS_WINDOWS 1) # don't use the OpenGL ES implementation on Windows @@ -8,15 +8,15 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") # detect the architecture (note: this test won't work for cross-compilation) include(CheckTypeSize) check_type_size(void* SIZEOF_VOID_PTR) - if(${SIZEOF_VOID_PTR} STREQUAL "4") + if("${SIZEOF_VOID_PTR}" STREQUAL "4") set(ARCH_32BITS 1) - elseif(${SIZEOF_VOID_PTR} STREQUAL "8") + elseif("${SIZEOF_VOID_PTR}" STREQUAL "8") set(ARCH_64BITS 1) else() message(FATAL_ERROR "Unsupported architecture") return() endif() -elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(SFML_OS_UNIX 1) if(ANDROID) set(SFML_OS_ANDROID 1) @@ -27,18 +27,22 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") # don't use the OpenGL ES implementation on Linux set(OPENGL_ES 0) endif() -elseif(CMAKE_SYSTEM_NAME MATCHES "^k?FreeBSD$") +elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") set(SFML_OS_FREEBSD 1) # don't use the OpenGL ES implementation on FreeBSD set(OPENGL_ES 0) -elseif(CMAKE_SYSTEM_NAME MATCHES "^OpenBSD$") - set(SFML_OS_OPENBSD 1) - # don't use the OpenGL ES implementation on OpenBSD - set(OPENGL_ES 0) -elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") +elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(IOS) set(SFML_OS_IOS 1) + # set the target framework and platforms + set(CMAKE_OSX_SYSROOT "iphoneos") + set(CMAKE_OSX_ARCHITECTURES "armv6;armv7;i386") + set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator") + + # help the compiler detection script below + set(CMAKE_COMPILER_IS_GNUCXX 1) + # use the OpenGL ES implementation on iOS set(OPENGL_ES 1) else() @@ -55,32 +59,20 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") return() endif() endif() -elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Android") - set(SFML_OS_ANDROID 1) +elseif(${CMAKE_SYSTEM_NAME} MATCHES "Android") + set(SFML_OS_ANDROID 1) # use the OpenGL ES implementation on Android set(OPENGL_ES 1) -# comparing CMAKE_SYSTEM_NAME with "CYGWIN" generates a false warning depending on the CMake version -# let's avoid it so the actual error is more visible -elseif(${CYGWIN}) - message(FATAL_ERROR "Unfortunately SFML doesn't support Cygwin's 'hybrid' status between both Windows and Linux derivatives.\nIf you insist on using the GCC, please use a standalone build of MinGW without the Cygwin environment instead.") else() - message(FATAL_ERROR "Unsupported operating system or environment") + message(FATAL_ERROR "Unsupported operating system") return() endif() -# set pkgconfig install directory -# this could be e.g. macports on mac or msys2 on windows etc. -set(SFML_PKGCONFIG_DIR "/${CMAKE_INSTALL_LIBDIR}/pkgconfig") - -if(SFML_OS_FREEBSD OR SFML_OS_OPENBSD) - set(SFML_PKGCONFIG_DIR "/libdata/pkgconfig") -endif() - # detect the compiler and its version # Note: on some platforms (OS X), CMAKE_COMPILER_IS_GNUCXX is true # even when CLANG is used, therefore the Clang test is done first -if(CMAKE_CXX_COMPILER MATCHES "clang[+][+]" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") +if(CMAKE_CXX_COMPILER MATCHES ".*clang[+][+]" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # CMAKE_CXX_COMPILER_ID is an internal CMake variable subject to change, # but there is no other way to detect CLang at the moment set(SFML_COMPILER_CLANG 1) @@ -94,7 +86,7 @@ elseif(CMAKE_COMPILER_IS_GNUCXX) string(REGEX MATCHALL ".*(tdm[64]*-[1-9]).*" SFML_COMPILER_GCC_TDM "${GCC_COMPILER_VERSION}") execute_process(COMMAND "${CMAKE_CXX_COMPILER}" "-dumpmachine" OUTPUT_VARIABLE GCC_MACHINE) string(STRIP "${GCC_MACHINE}" GCC_MACHINE) - if(GCC_MACHINE MATCHES ".*w64.*") + if(${GCC_MACHINE} MATCHES ".*w64.*") set(SFML_COMPILER_GCC_W64 1) endif() elseif(MSVC) @@ -109,10 +101,17 @@ elseif(MSVC) set(SFML_MSVC_VERSION 11) elseif(MSVC_VERSION EQUAL 1800) set(SFML_MSVC_VERSION 12) - elseif(MSVC_VERSION EQUAL 1900) - set(SFML_MSVC_VERSION 14) endif() else() message(FATAL_ERROR "Unsupported compiler") return() endif() + +# define the install directory for miscellaneous files +if(SFML_OS_WINDOWS OR SFML_OS_IOS) + set(INSTALL_MISC_DIR .) +elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_MACOSX) + set(INSTALL_MISC_DIR share/SFML) +elseif(SFML_OS_ANDROID) + set(INSTALL_MISC_DIR ${ANDROID_NDK}/sources/sfml) +endif() diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 36fc5bab..49ad2c3b 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -1,67 +1,17 @@ include(CMakeParseArguments) -# This little macro lets you set any Xcode specific property -macro (sfml_set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE) - set_property (TARGET ${TARGET} PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE}) -endmacro () - -# set the appropriate standard library on each platform for the given target -# example: sfml_set_stdlib(sfml-system) -function(sfml_set_stdlib target) - # for gcc >= 4.0 on Windows, apply the SFML_USE_STATIC_STD_LIBS option if it is enabled - if(SFML_OS_WINDOWS AND SFML_COMPILER_GCC AND NOT SFML_GCC_VERSION VERSION_LESS "4") - if(SFML_USE_STATIC_STD_LIBS AND NOT SFML_COMPILER_GCC_TDM) - target_link_libraries(${target} PRIVATE "-static-libgcc" "-static-libstdc++") - elseif(NOT SFML_USE_STATIC_STD_LIBS AND SFML_COMPILER_GCC_TDM) - target_link_libraries(${target} PRIVATE "-shared-libgcc" "-shared-libstdc++") - endif() - endif() - - if (SFML_OS_MACOSX) - if (${CMAKE_GENERATOR} MATCHES "Xcode") - sfml_set_xcode_property(${target} CLANG_CXX_LIBRARY "libc++") - else() - target_compile_options(${target} PRIVATE "-stdlib=libc++") - target_link_libraries(${target} PRIVATE "-stdlib=libc++") - endif() - endif() -endfunction() - -function(sfml_set_common_ios_properties target) - # enable automatic reference counting on iOS - sfml_set_xcode_property(${target} CLANG_ENABLE_OBJC_ARC YES) - sfml_set_xcode_property(${target} IPHONEOS_DEPLOYMENT_TARGET "${SFML_IOS_DEPLOYMENT_TARGET}") - sfml_set_xcode_property(${target} CODE_SIGN_IDENTITY "${SFML_CODE_SIGN_IDENTITY}") - - get_target_property(target_type ${target} TYPE) - if (target_type STREQUAL "EXECUTABLE") - set_target_properties(${target} PROPERTIES - MACOSX_BUNDLE TRUE # Bare executables are not usable on iOS, only bundle applications - MACOSX_BUNDLE_GUI_IDENTIFIER "org.sfml-dev.${target}" # If missing, trying to launch an example in simulator will make Xcode < 9.3 crash - MACOSX_BUNDLE_BUNDLE_NAME "${target}" - MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" - ) - endif() -endfunction() - # add a new target which is a SFML library -# example: sfml_add_library(sfml-graphics -# SOURCES sprite.cpp image.cpp ... -# [STATIC]) # Always create a static library and ignore BUILD_SHARED_LIBS +# ex: sfml_add_library(sfml-graphics +# SOURCES sprite.cpp image.cpp ... +# DEPENDS sfml-window sfml-system +# EXTERNAL_LIBS opengl freetype ...) macro(sfml_add_library target) # parse the arguments - cmake_parse_arguments(THIS "STATIC" "" "SOURCES" ${ARGN}) - if (NOT "${THIS_UNPARSED_ARGUMENTS}" STREQUAL "") - message(FATAL_ERROR "Extra unparsed arguments when calling sfml_add_library: ${THIS_UNPARSED_ARGUMENTS}") - endif() + cmake_parse_arguments(THIS "" "" "SOURCES;DEPENDS;EXTERNAL_LIBS" ${ARGN}) # create the target - if (THIS_STATIC) - add_library(${target} STATIC ${THIS_SOURCES}) - else() - add_library(${target} ${THIS_SOURCES}) - endif() + add_library(${target} ${THIS_SOURCES}) # define the export symbol of the module string(REPLACE "-" "_" NAME_UPPER "${target}") @@ -69,7 +19,7 @@ macro(sfml_add_library target) set_target_properties(${target} PROPERTIES DEFINE_SYMBOL ${NAME_UPPER}_EXPORTS) # adjust the output file prefix/suffix to match our conventions - if(BUILD_SHARED_LIBS AND NOT THIS_STATIC) + if(BUILD_SHARED_LIBS) if(SFML_OS_WINDOWS) # include the major version number in Windows shared library names (but not import library names) set_target_properties(${target} PROPERTIES DEBUG_POSTFIX -d) @@ -87,41 +37,24 @@ macro(sfml_add_library target) set_target_properties(${target} PROPERTIES DEBUG_POSTFIX -s-d) set_target_properties(${target} PROPERTIES RELEASE_POSTFIX -s) set_target_properties(${target} PROPERTIES MINSIZEREL_POSTFIX -s) - set_target_properties(${target} PROPERTIES RELWITHDEBINFO_POSTFIX -s) endif() # set the version and soversion of the target (for compatible systems -- mostly Linuxes) # except for Android which strips soversion suffixes if(NOT SFML_OS_ANDROID) - set_target_properties(${target} PROPERTIES SOVERSION ${VERSION_MAJOR}.${VERSION_MINOR}) + set_target_properties(${target} PROPERTIES SOVERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) set_target_properties(${target} PROPERTIES VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) endif() # set the target's folder (for IDEs that support it, e.g. Visual Studio) set_target_properties(${target} PROPERTIES FOLDER "SFML") - # set the target flags to use the appropriate C++ standard library - sfml_set_stdlib(${target}) - - # For Visual Studio on Windows, export debug symbols (PDB files) to lib directory - if(SFML_GENERATE_PDB) - # PDB files are only generated in Debug and RelWithDebInfo configurations, find out which one - if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") - set(SFML_PDB_POSTFIX "-d") - else() - set(SFML_PDB_POSTFIX "") - endif() - - if(BUILD_SHARED_LIBS AND NOT THIS_STATIC) - # DLLs export debug symbols in the linker PDB (the compiler PDB is an intermediate file) - set_target_properties(${target} PROPERTIES - PDB_NAME "${target}${SFML_PDB_POSTFIX}" - PDB_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib") - else() - # Static libraries have no linker PDBs, thus the compiler PDBs are relevant - set_target_properties(${target} PROPERTIES - COMPILE_PDB_NAME "${target}-s${SFML_PDB_POSTFIX}" - COMPILE_PDB_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib") + # for gcc >= 4.0 on Windows, apply the SFML_USE_STATIC_STD_LIBS option if it is enabled + if(SFML_OS_WINDOWS AND SFML_COMPILER_GCC AND NOT SFML_GCC_VERSION VERSION_LESS "4") + if(SFML_USE_STATIC_STD_LIBS AND NOT SFML_COMPILER_GCC_TDM) + set_target_properties(${target} PROPERTIES LINK_FLAGS "-static-libgcc -static-libstdc++") + elseif(NOT SFML_USE_STATIC_STD_LIBS AND SFML_COMPILER_GCC_TDM) + set_target_properties(${target} PROPERTIES LINK_FLAGS "-shared-libgcc -shared-libstdc++") endif() endif() @@ -131,8 +64,13 @@ macro(sfml_add_library target) set_target_properties(${target} PROPERTIES COMPILE_FLAGS -fvisibility=hidden) endif() + # link the target to its SFML dependencies + if(THIS_DEPENDS) + target_link_libraries(${target} ${THIS_DEPENDS}) + endif() + # build frameworks or dylibs - if(SFML_OS_MACOSX AND BUILD_SHARED_LIBS AND NOT THIS_STATIC) + if(SFML_OS_MACOSX AND BUILD_SHARED_LIBS) if(SFML_BUILD_FRAMEWORKS) # adapt target to build frameworks instead of dylibs set_target_properties(${target} PROPERTIES @@ -143,22 +81,15 @@ macro(sfml_add_library target) MACOSX_FRAMEWORK_BUNDLE_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) endif() - # adapt install directory to allow distributing dylibs/frameworks in user's frameworks/application bundle - # but only if cmake rpath options aren't set - if(NOT CMAKE_SKIP_RPATH AND NOT CMAKE_SKIP_INSTALL_RPATH AND NOT CMAKE_INSTALL_RPATH AND NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH AND NOT CMAKE_INSTALL_NAME_DIR) - set_target_properties(${target} PROPERTIES INSTALL_NAME_DIR "@rpath") - if(NOT CMAKE_SKIP_BUILD_RPATH) - if (CMAKE_VERSION VERSION_LESS 3.9) - set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) - else() - set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_NAME_DIR TRUE) - endif() - endif() - endif() + # adapt install directory to allow distributing dylibs/frameworks in user’s frameworks/application bundle + set_target_properties(${target} PROPERTIES + BUILD_WITH_INSTALL_RPATH 1 + INSTALL_NAME_DIR "@rpath") endif() + # enable automatic reference counting on iOS if (SFML_OS_IOS) - sfml_set_common_ios_properties(${target}) + set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES) endif() # sfml-activity library is our bootstrap activity and must not depend on stlport_shared @@ -167,77 +98,43 @@ macro(sfml_add_library target) if (${target} MATCHES "sfml-activity") set_target_properties(${target} PROPERTIES COMPILE_FLAGS -fpermissive) set_target_properties(${target} PROPERTIES LINK_FLAGS "-landroid -llog") - set(CMAKE_CXX_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY_WITHOUT_STL}) + set(CMAKE_CXX_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY_WITHOUT_STLPORT}) else() - set(CMAKE_CXX_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY_WITH_STL}) + set(CMAKE_CXX_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY_WITH_STLPORT}) endif() endif() + # link the target to its external dependencies + if(THIS_EXTERNAL_LIBS) + target_link_libraries(${target} ${THIS_EXTERNAL_LIBS}) + endif() + # add the install rule - install(TARGETS ${target} EXPORT SFMLConfigExport - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT bin - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel - FRAMEWORK DESTINATION "." COMPONENT bin) - - # add /include as public include directory - target_include_directories(${target} - PUBLIC $ - PRIVATE ${PROJECT_SOURCE_DIR}/src) - - if (SFML_BUILD_FRAMEWORKS) - target_include_directories(${target} INTERFACE $) - else() - target_include_directories(${target} INTERFACE $) - endif() - - # define SFML_STATIC if the build type is not set to 'shared' - if(NOT BUILD_SHARED_LIBS) - target_compile_definitions(${target} PUBLIC "SFML_STATIC") - endif() - + install(TARGETS ${target} + RUNTIME DESTINATION bin COMPONENT bin + LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT bin + ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT devel + FRAMEWORK DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX} COMPONENT bin) endmacro() # add a new target which is a SFML example -# example: sfml_add_example(ftp -# SOURCES ftp.cpp ... -# BUNDLE_RESOURCES MainMenu.nib ... # Files to be added in target but not installed next to the executable -# DEPENDS sfml-network -# RESOURCES_DIR resources) # A directory to install next to the executable and sources +# ex: sfml_add_example(ftp +# SOURCES ftp.cpp ... +# DEPENDS sfml-network sfml-system) macro(sfml_add_example target) # parse the arguments - cmake_parse_arguments(THIS "GUI_APP" "RESOURCES_DIR" "SOURCES;BUNDLE_RESOURCES;DEPENDS" ${ARGN}) + cmake_parse_arguments(THIS "GUI_APP" "" "SOURCES;DEPENDS" ${ARGN}) # set a source group for the source files source_group("" FILES ${THIS_SOURCES}) - # check whether resources must be added in target - set(target_input ${THIS_SOURCES}) - if(THIS_BUNDLE_RESOURCES) - set(target_input ${target_input} ${THIS_BUNDLE_RESOURCES}) - endif() - # create the target - if(THIS_GUI_APP AND SFML_OS_WINDOWS AND NOT DEFINED CMAKE_CONFIGURATION_TYPES AND ${CMAKE_BUILD_TYPE} STREQUAL "Release") - add_executable(${target} WIN32 ${target_input}) - target_link_libraries(${target} PRIVATE sfml-main) - elseif(THIS_GUI_APP AND SFML_OS_IOS) - - # For iOS apps we need the launch screen storyboard, - # and a custom info.plist to use it - SET(LAUNCH_SCREEN "${CMAKE_SOURCE_DIR}/examples/assets/LaunchScreen.storyboard") - SET(LOGO "${CMAKE_SOURCE_DIR}/examples/assets/logo.png") - SET(INFO_PLIST "${CMAKE_SOURCE_DIR}/examples/assets/info.plist") - SET(ICONS "${CMAKE_SOURCE_DIR}/examples/assets/icon.icns") - add_executable(${target} MACOSX_BUNDLE ${target_input} ${LAUNCH_SCREEN} ${LOGO} ${ICONS}) - set(RESOURCES ${LAUNCH_SCREEN} ${LOGO} ${ICONS}) - set_target_properties(${target} PROPERTIES RESOURCE "${RESOURCES}" - MACOSX_BUNDLE_INFO_PLIST ${INFO_PLIST} - MACOSX_BUNDLE_ICON_FILE icon.icns) - target_link_libraries(${target} PRIVATE sfml-main) + if(THIS_GUI_APP AND SFML_OS_WINDOWS) + add_executable(${target} WIN32 ${THIS_SOURCES}) + target_link_libraries(${target} sfml-main) else() - add_executable(${target} ${target_input}) + add_executable(${target} ${THIS_SOURCES}) endif() # set the debug suffix @@ -246,182 +143,36 @@ macro(sfml_add_example target) # set the target's folder (for IDEs that support it, e.g. Visual Studio) set_target_properties(${target} PROPERTIES FOLDER "Examples") - # set the target flags to use the appropriate C++ standard library - sfml_set_stdlib(${target}) - - # set the Visual Studio startup path for debugging - set_target_properties(${target} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + # for gcc >= 4.0 on Windows, apply the SFML_USE_STATIC_STD_LIBS option if it is enabled + if(SFML_OS_WINDOWS AND SFML_COMPILER_GCC AND NOT SFML_GCC_VERSION VERSION_LESS "4") + if(SFML_USE_STATIC_STD_LIBS AND NOT SFML_COMPILER_GCC_TDM) + set_target_properties(${target} PROPERTIES LINK_FLAGS "-static-libgcc -static-libstdc++") + elseif(NOT SFML_USE_STATIC_STD_LIBS AND SFML_COMPILER_GCC_TDM) + set_target_properties(${target} PROPERTIES LINK_FLAGS "-shared-libgcc -shared-libstdc++") + endif() + endif() # link the target to its SFML dependencies if(THIS_DEPENDS) - target_link_libraries(${target} PRIVATE ${THIS_DEPENDS}) + target_link_libraries(${target} ${THIS_DEPENDS}) endif() - if (SFML_OS_IOS) - sfml_set_common_ios_properties(${target}) + # add the install rule + install(TARGETS ${target} + RUNTIME DESTINATION ${INSTALL_MISC_DIR}/examples/${target} COMPONENT examples + BUNDLE DESTINATION ${INSTALL_MISC_DIR}/examples/${target} COMPONENT examples) + + # install the example's source code + install(FILES ${THIS_SOURCES} + DESTINATION ${INSTALL_MISC_DIR}/examples/${target} + COMPONENT examples) + + # install the example's resources as well + set(EXAMPLE_RESOURCES "${CMAKE_SOURCE_DIR}/examples/${target}/resources") + if(EXISTS ${EXAMPLE_RESOURCES}) + install(DIRECTORY ${EXAMPLE_RESOURCES} + DESTINATION ${INSTALL_MISC_DIR}/examples/${target} + COMPONENT examples) endif() endmacro() - -# add a new target which is a SFML test -# example: sfml_add_test(sfml-test -# ftp.cpp ... -# sfml-network) -function(sfml_add_test target SOURCES DEPENDS) - - # set a source group for the source files - source_group("" FILES ${SOURCES}) - - # create the target - add_executable(${target} ${SOURCES}) - - # set the target's folder (for IDEs that support it, e.g. Visual Studio) - set_target_properties(${target} PROPERTIES FOLDER "Tests") - - # link the target to its SFML dependencies - if(DEPENDS) - target_link_libraries(${target} PRIVATE ${DEPENDS}) - endif() - - # Add the test - add_test(${target} ${target}) - - # If building shared libs on windows we must copy the dependencies into the folder - if (WIN32 AND BUILD_SHARED_LIBS) - foreach (DEPENDENCY ${DEPENDS}) - add_custom_command(TARGET ${target} PRE_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - $ - $) - endforeach() - endif() -endfunction() - -# Create an interface library for an external dependency. This virtual target can provide -# link specifications and include directories to be used by dependees. -# The created INTERFACE library is tagged for export to be part of the generated SFMLConfig -# Usage: sfml_add_external(target_name -# [INCLUDE "extlibs/include"] -# [LINK "extlibs/libfoo/libfoo.a"]) -function(sfml_add_external) - list(GET ARGN 0 target) - list(REMOVE_AT ARGN 0) - - if (TARGET ${target}) - message(FATAL_ERROR "Target '${target}' is already defined") - endif() - - cmake_parse_arguments(THIS "" "" "INCLUDE;LINK" ${ARGN}) - if (THIS_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "Unknown arguments when calling sfml_import_library: ${THIS_UNPARSED_ARGUMENTS}") - endif() - - add_library(${target} INTERFACE) - - if (THIS_INCLUDE) - foreach(include_dir IN LISTS THIS_INCLUDE) - if (NOT include_dir) - message(FATAL_ERROR "No path given for include dir ${THIS_INCLUDE}") - endif() - target_include_directories(${target} INTERFACE "$") - endforeach() - endif() - - if (THIS_LINK) - foreach(link_item IN LISTS THIS_LINK) - if (NOT link_item) - message(FATAL_ERROR "Missing item in ${THIS_LINK}") - endif() - target_link_libraries(${target} INTERFACE "$") - endforeach() - endif() - - install(TARGETS ${target} EXPORT SFMLConfigExport) -endfunction() - -# Find the requested package and make an INTERFACE library from it -# The created INTERFACE library is tagged for export to be part of the generated SFMLConfig -# Usage: sfml_find_package(wanted_target_name -# [INCLUDE "OPENGL_INCLUDE_DIR"] -# [LINK "OPENGL_gl_LIBRARY"]) -function(sfml_find_package) - list(GET ARGN 0 target) - list(REMOVE_AT ARGN 0) - - if (TARGET ${target}) - message(FATAL_ERROR "Target '${target}' is already defined") - endif() - - cmake_parse_arguments(THIS "" "" "INCLUDE;LINK" ${ARGN}) - if (THIS_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "Unknown arguments when calling sfml_import_library: ${THIS_UNPARSED_ARGUMENTS}") - endif() - - set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules/") - if (SFML_OS_IOS) - find_host_package(${target} REQUIRED) - else() - find_package(${target} REQUIRED) - endif() - - # Make sure to interpret the items in INCLUDE and LINK parameters. sfml_add_external() - # does not interpret given items in order to also accept parameters that must not be interpreted - set(LINK_LIST "") - if (THIS_LINK) - foreach(link_item IN LISTS THIS_LINK) - list(APPEND LINK_LIST "${${link_item}}") - endforeach() - endif() - - set(INCLUDE_LIST "") - if (THIS_INCLUDE) - foreach(include_dir IN LISTS THIS_INCLUDE) - list(APPEND INCLUDE_LIST "${${include_dir}}") - endforeach() - endif() - - sfml_add_external(${target} INCLUDE ${INCLUDE_LIST} LINK ${LINK_LIST}) -endfunction() - -# Generate a SFMLConfig.cmake file (and associated files) from the targets registered against -# the EXPORT name "SFMLConfigExport" (EXPORT parameter of install(TARGETS)) -function(sfml_export_targets) - # CMAKE_CURRENT_LIST_DIR or CMAKE_CURRENT_SOURCE_DIR not usable for files that are to be included like this one - set(CURRENT_DIR "${PROJECT_SOURCE_DIR}/cmake") - - include(CMakePackageConfigHelpers) - write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/SFMLConfigVersion.cmake" - VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} - COMPATIBILITY SameMajorVersion) - - if (BUILD_SHARED_LIBS) - set(config_name "Shared") - else() - set(config_name "Static") - endif() - set(targets_config_filename "SFML${config_name}Targets.cmake") - - export(EXPORT SFMLConfigExport - FILE "${CMAKE_CURRENT_BINARY_DIR}/${targets_config_filename}") - - if (SFML_BUILD_FRAMEWORKS) - set(config_package_location "SFML.framework/Resources/CMake") - else() - set(config_package_location ${CMAKE_INSTALL_LIBDIR}/cmake/SFML) - endif() - configure_package_config_file("${CURRENT_DIR}/SFMLConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/SFMLConfig.cmake" - INSTALL_DESTINATION "${config_package_location}") - configure_package_config_file("${CURRENT_DIR}/SFMLConfigDependencies.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/SFMLConfigDependencies.cmake" - INSTALL_DESTINATION "${config_package_location}") - - - install(EXPORT SFMLConfigExport - FILE ${targets_config_filename} - DESTINATION ${config_package_location}) - - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/SFMLConfig.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/SFMLConfigDependencies.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/SFMLConfigVersion.cmake" - DESTINATION ${config_package_location} - COMPONENT devel) -endfunction() diff --git a/cmake/Modules/FindEGL.cmake b/cmake/Modules/FindEGL.cmake index cde632ae..be9eda07 100644 --- a/cmake/Modules/FindEGL.cmake +++ b/cmake/Modules/FindEGL.cmake @@ -9,6 +9,6 @@ find_path(EGL_INCLUDE_DIR EGL/egl.h) find_library(EGL_LIBRARY NAMES EGL) - + include(FindPackageHandleStandardArgs) find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR) diff --git a/cmake/Modules/FindFLAC.cmake b/cmake/Modules/FindFLAC.cmake deleted file mode 100644 index e820cf9d..00000000 --- a/cmake/Modules/FindFLAC.cmake +++ /dev/null @@ -1,18 +0,0 @@ -# -# Try to find FLAC libraries and include paths. -# Once done this will define -# -# FLAC_FOUND -# FLAC_INCLUDE_DIR -# FLAC_LIBRARY -# - -find_path(FLAC_INCLUDE_DIR FLAC/all.h) -find_path(FLAC_INCLUDE_DIR FLAC/stream_decoder.h) - -find_library(FLAC_LIBRARY NAMES FLAC) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(FLAC DEFAULT_MSG FLAC_LIBRARY FLAC_INCLUDE_DIR) - -mark_as_advanced(FLAC_INCLUDE_DIR FLAC_LIBRARY) diff --git a/cmake/Modules/FindFreetype.cmake b/cmake/Modules/FindFreetype.cmake deleted file mode 100644 index 6e3f3f70..00000000 --- a/cmake/Modules/FindFreetype.cmake +++ /dev/null @@ -1,158 +0,0 @@ -#.rst: -# FindFreetype -# ------------ -# -# Locate FreeType library -# -# This module defines -# -# :: -# -# FREETYPE_LIBRARIES, the library to link against -# FREETYPE_FOUND, if false, do not try to link to FREETYPE -# FREETYPE_INCLUDE_DIRS, where to find headers. -# FREETYPE_VERSION_STRING, the version of freetype found (since CMake 2.8.8) -# This is the concatenation of the paths: -# FREETYPE_INCLUDE_DIR_ft2build -# FREETYPE_INCLUDE_DIR_freetype2 -# -# -# -# $FREETYPE_DIR is an environment variable that would correspond to the -# ./configure --prefix=$FREETYPE_DIR used in building FREETYPE. - -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# Created by Eric Wing. -# Modifications by Alexander Neundorf. -# This file has been renamed to "FindFreetype.cmake" instead of the correct -# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex. - -# Ugh, FreeType seems to use some #include trickery which -# makes this harder than it should be. It looks like they -# put ft2build.h in a common/easier-to-find location which -# then contains a #include to a more specific header in a -# more specific location (#include ). -# Then from there, they need to set a bunch of #define's -# so you can do something like: -# #include FT_FREETYPE_H -# Unfortunately, using CMake's mechanisms like include_directories() -# wants explicit full paths and this trickery doesn't work too well. -# I'm going to attempt to cut out the middleman and hope -# everything still works. -find_path( - FREETYPE_INCLUDE_DIR_ft2build - ft2build.h - HINTS - ENV FREETYPE_DIR - PATHS - /usr/X11R6 - /usr/local/X11R6 - /usr/local/X11 - /usr/freeware - ENV GTKMM_BASEPATH - [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] - PATH_SUFFIXES - include/freetype2 - include - freetype2 -) - -find_path( - FREETYPE_INCLUDE_DIR_freetype2 - NAMES - freetype/config/ftheader.h - config/ftheader.h - HINTS - ENV FREETYPE_DIR - PATHS - /usr/X11R6 - /usr/local/X11R6 - /usr/local/X11 - /usr/freeware - ENV GTKMM_BASEPATH - [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] - PATH_SUFFIXES - include/freetype2 - include - freetype2 -) - -find_library(FREETYPE_LIBRARY - NAMES - freetype - libfreetype - freetype219 - HINTS - ENV FREETYPE_DIR - PATHS - /usr/X11R6 - /usr/local/X11R6 - /usr/local/X11 - /usr/freeware - ENV GTKMM_BASEPATH - [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] - PATH_SUFFIXES - lib -) - -# set the user variables -if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) - set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") - list(REMOVE_DUPLICATES FREETYPE_INCLUDE_DIRS) -endif() -set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}") - -if(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") - set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") -elseif(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") - set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") -endif() - -if(FREETYPE_INCLUDE_DIR_freetype2 AND FREETYPE_H) - file(STRINGS "${FREETYPE_H}" freetype_version_str - REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$") - - unset(FREETYPE_VERSION_STRING) - foreach(VPART MAJOR MINOR PATCH) - foreach(VLINE ${freetype_version_str}) - if(VLINE MATCHES "^#[\t ]*define[\t ]+FREETYPE_${VPART}[\t ]+([0-9]+)$") - set(FREETYPE_VERSION_PART "${CMAKE_MATCH_1}") - if(FREETYPE_VERSION_STRING) - set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_STRING}.${FREETYPE_VERSION_PART}") - else() - set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_PART}") - endif() - unset(FREETYPE_VERSION_PART) - endif() - endforeach() - endforeach() -endif() - - -# set FREETYPE_FOUND to TRUE if all listed variables are TRUE -if(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS AND FREETYPE_VERSION_STRING) - set(FREETYPE_FOUND TRUE) -else() - set(FREETYPE_FOUND FALSE) -endif() - -mark_as_advanced( - FREETYPE_LIBRARY - FREETYPE_INCLUDE_DIR_freetype2 - FREETYPE_INCLUDE_DIR_ft2build -) diff --git a/cmake/Modules/FindGLES.cmake b/cmake/Modules/FindGLES.cmake index f34f2cd0..948e9bf9 100644 --- a/cmake/Modules/FindGLES.cmake +++ b/cmake/Modules/FindGLES.cmake @@ -9,6 +9,6 @@ find_path(GLES_INCLUDE_DIR GLES/gl.h) find_library(GLES_LIBRARY NAMES GLESv1_CM) - + include(FindPackageHandleStandardArgs) find_package_handle_standard_args(GLES DEFAULT_MSG GLES_LIBRARY GLES_INCLUDE_DIR) diff --git a/cmake/Modules/FindGLEW.cmake b/cmake/Modules/FindGLEW.cmake new file mode 100644 index 00000000..17c3c39c --- /dev/null +++ b/cmake/Modules/FindGLEW.cmake @@ -0,0 +1,65 @@ +# +# Try to find GLEW library and include path. +# Once done this will define +# +# GLEW_FOUND +# GLEW_INCLUDE_PATH +# GLEW_LIBRARY +# + +IF (WIN32) + FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h + $ENV{PROGRAMFILES}/GLEW/include + ${GLEW_ROOT_DIR}/include + DOC "The directory where GL/glew.h resides") + + IF (NV_SYSTEM_PROCESSOR STREQUAL "AMD64") + FIND_LIBRARY( GLEW_LIBRARY + NAMES glew64 glew64s + PATHS + $ENV{PROGRAMFILES}/GLEW/lib + ${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin + ${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib + DOC "The GLEW library (64-bit)" + ) + ELSE(NV_SYSTEM_PROCESSOR STREQUAL "AMD64") + FIND_LIBRARY( GLEW_LIBRARY + NAMES glew GLEW glew32 glew32s + PATHS + $ENV{PROGRAMFILES}/GLEW/lib + ${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin + ${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib + DOC "The GLEW library" + ) + ENDIF(NV_SYSTEM_PROCESSOR STREQUAL "AMD64") +ELSE (WIN32) + FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h + /usr/include + /usr/local/include + /sw/include + /opt/local/include + ${GLEW_ROOT_DIR}/include + DOC "The directory where GL/glew.h resides") + + FIND_LIBRARY( GLEW_LIBRARY + NAMES GLEW glew + PATHS + /usr/lib64 + /usr/lib + /usr/local/lib64 + /usr/local/lib + /sw/lib + /opt/local/lib + ${GLEW_ROOT_DIR}/lib + DOC "The GLEW library") +ENDIF (WIN32) + +SET(GLEW_FOUND "NO") +IF (GLEW_INCLUDE_PATH AND GLEW_LIBRARY) + SET(GLEW_LIBRARIES ${GLEW_LIBRARY}) + SET(GLEW_FOUND "YES") +ENDIF (GLEW_INCLUDE_PATH AND GLEW_LIBRARY) + + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_LIBRARY GLEW_INCLUDE_PATH) diff --git a/cmake/Modules/FindSFML.cmake b/cmake/Modules/FindSFML.cmake new file mode 100644 index 00000000..93e94e5b --- /dev/null +++ b/cmake/Modules/FindSFML.cmake @@ -0,0 +1,359 @@ +# This script locates the SFML library +# ------------------------------------ +# +# Usage +# ----- +# +# When you try to locate the SFML libraries, you must specify which modules you want to use (system, window, graphics, network, audio, main). +# If none is given, the SFML_LIBRARIES variable will be empty and you'll end up linking to nothing. +# example: +# find_package(SFML COMPONENTS graphics window system) // find the graphics, window and system modules +# +# You can enforce a specific version, either MAJOR.MINOR or only MAJOR. +# If nothing is specified, the version won't be checked (i.e. any version will be accepted). +# example: +# find_package(SFML COMPONENTS ...) // no specific version required +# find_package(SFML 2 COMPONENTS ...) // any 2.x version +# find_package(SFML 2.4 COMPONENTS ...) // version 2.4 or greater +# +# By default, the dynamic libraries of SFML will be found. To find the static ones instead, +# you must set the SFML_STATIC_LIBRARIES variable to TRUE before calling find_package(SFML ...). +# Since you have to link yourself all the SFML dependencies when you link it statically, the following +# additional variables are defined: SFML_XXX_DEPENDENCIES and SFML_DEPENDENCIES (see their detailed +# description below). +# In case of static linking, the SFML_STATIC macro will also be defined by this script. +# example: +# set(SFML_STATIC_LIBRARIES TRUE) +# find_package(SFML 2 COMPONENTS network system) +# +# On Mac OS X if SFML_STATIC_LIBRARIES is not set to TRUE then by default CMake will search for frameworks unless +# CMAKE_FIND_FRAMEWORK is set to "NEVER" for example. Please refer to CMake documentation for more details. +# Moreover, keep in mind that SFML frameworks are only available as release libraries unlike dylibs which +# are available for both release and debug modes. +# +# If SFML is not installed in a standard path, you can use the SFML_ROOT CMake (or environment) variable +# to tell CMake where SFML is. +# +# Output +# ------ +# +# This script defines the following variables: +# - For each specified module XXX (system, window, graphics, network, audio, main): +# - SFML_XXX_LIBRARY_DEBUG: the name of the debug library of the xxx module (set to SFML_XXX_LIBRARY_RELEASE is no debug version is found) +# - SFML_XXX_LIBRARY_RELEASE: the name of the release library of the xxx module (set to SFML_XXX_LIBRARY_DEBUG is no release version is found) +# - SFML_XXX_LIBRARY: the name of the library to link to for the xxx module (includes both debug and optimized names if necessary) +# - SFML_XXX_FOUND: true if either the debug or release library of the xxx module is found +# - SFML_XXX_DEPENDENCIES: the list of libraries the module depends on, in case of static linking +# - SFML_LIBRARIES: the list of all libraries corresponding to the required modules +# - SFML_FOUND: true if all the required modules are found +# - SFML_INCLUDE_DIR: the path where SFML headers are located (the directory containing the SFML/Config.hpp file) +# - SFML_DEPENDENCIES: the list of libraries SFML depends on, in case of static linking +# +# example: +# find_package(SFML 2 COMPONENTS system window graphics audio REQUIRED) +# include_directories(${SFML_INCLUDE_DIR}) +# add_executable(myapp ...) +# target_link_libraries(myapp ${SFML_LIBRARIES}) + +# define the SFML_STATIC macro if static build was chosen +if(SFML_STATIC_LIBRARIES) + add_definitions(-DSFML_STATIC) +endif() + +# define the list of search paths for headers and libraries +set(FIND_SFML_PATHS + ${SFML_ROOT} + $ENV{SFML_ROOT} + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt) + +# find the SFML include directory +find_path(SFML_INCLUDE_DIR SFML/Config.hpp + PATH_SUFFIXES include + PATHS ${FIND_SFML_PATHS}) + +# check the version number +set(SFML_VERSION_OK TRUE) +if(SFML_FIND_VERSION AND SFML_INCLUDE_DIR) + # extract the major and minor version numbers from SFML/Config.hpp + # we have to handle framework a little bit differently: + if("${SFML_INCLUDE_DIR}" MATCHES "SFML.framework") + set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/Headers/Config.hpp") + else() + set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/SFML/Config.hpp") + endif() + FILE(READ "${SFML_CONFIG_HPP_INPUT}" SFML_CONFIG_HPP_CONTENTS) + STRING(REGEX MATCH ".*#define SFML_VERSION_MAJOR ([0-9]+).*#define SFML_VERSION_MINOR ([0-9]+).*#define SFML_VERSION_PATCH ([0-9]+).*" SFML_CONFIG_HPP_CONTENTS "${SFML_CONFIG_HPP_CONTENTS}") + STRING(REGEX REPLACE ".*#define SFML_VERSION_MAJOR ([0-9]+).*" "\\1" SFML_VERSION_MAJOR "${SFML_CONFIG_HPP_CONTENTS}") + STRING(REGEX REPLACE ".*#define SFML_VERSION_MINOR ([0-9]+).*" "\\1" SFML_VERSION_MINOR "${SFML_CONFIG_HPP_CONTENTS}") + STRING(REGEX REPLACE ".*#define SFML_VERSION_PATCH ([0-9]+).*" "\\1" SFML_VERSION_PATCH "${SFML_CONFIG_HPP_CONTENTS}") + math(EXPR SFML_REQUESTED_VERSION "${SFML_FIND_VERSION_MAJOR} * 10000 + ${SFML_FIND_VERSION_MINOR} * 100 + ${SFML_FIND_VERSION_PATCH}") + + # if we could extract them, compare with the requested version number + if (SFML_VERSION_MAJOR) + # transform version numbers to an integer + math(EXPR SFML_VERSION "${SFML_VERSION_MAJOR} * 10000 + ${SFML_VERSION_MINOR} * 100 + ${SFML_VERSION_PATCH}") + + # compare them + if(SFML_VERSION LESS SFML_REQUESTED_VERSION) + set(SFML_VERSION_OK FALSE) + endif() + else() + # SFML version is < 2.0 + if (SFML_REQUESTED_VERSION GREATER 10900) + set(SFML_VERSION_OK FALSE) + set(SFML_VERSION_MAJOR 1) + set(SFML_VERSION_MINOR x) + set(SFML_VERSION_PATCH x) + endif() + endif() +endif() + +# find the requested modules +set(SFML_FOUND TRUE) # will be set to false if one of the required modules is not found +foreach(FIND_SFML_COMPONENT ${SFML_FIND_COMPONENTS}) + string(TOLOWER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_LOWER) + string(TOUPPER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_UPPER) + set(FIND_SFML_COMPONENT_NAME sfml-${FIND_SFML_COMPONENT_LOWER}) + + # no suffix for sfml-main, it is always a static library + if(FIND_SFML_COMPONENT_LOWER STREQUAL "main") + # release library + find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE + NAMES ${FIND_SFML_COMPONENT_NAME} + PATH_SUFFIXES lib64 lib + PATHS ${FIND_SFML_PATHS}) + + # debug library + find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG + NAMES ${FIND_SFML_COMPONENT_NAME}-d + PATH_SUFFIXES lib64 lib + PATHS ${FIND_SFML_PATHS}) + else() + # static release library + find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_RELEASE + NAMES ${FIND_SFML_COMPONENT_NAME}-s + PATH_SUFFIXES lib64 lib + PATHS ${FIND_SFML_PATHS}) + + # static debug library + find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_DEBUG + NAMES ${FIND_SFML_COMPONENT_NAME}-s-d + PATH_SUFFIXES lib64 lib + PATHS ${FIND_SFML_PATHS}) + + # dynamic release library + find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_RELEASE + NAMES ${FIND_SFML_COMPONENT_NAME} + PATH_SUFFIXES lib64 lib + PATHS ${FIND_SFML_PATHS}) + + # dynamic debug library + find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_DEBUG + NAMES ${FIND_SFML_COMPONENT_NAME}-d + PATH_SUFFIXES lib64 lib + PATHS ${FIND_SFML_PATHS}) + + # choose the entries that fit the requested link type + if(SFML_STATIC_LIBRARIES) + if(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_RELEASE) + set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_RELEASE}) + endif() + if(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_DEBUG) + set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_DEBUG}) + endif() + else() + if(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_RELEASE) + set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_RELEASE}) + endif() + if(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_DEBUG) + set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_DEBUG}) + endif() + endif() + endif() + + if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG OR SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE) + # library found + set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND TRUE) + + # if both are found, set SFML_XXX_LIBRARY to contain both + if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE) + set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY debug ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG} + optimized ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE}) + endif() + + # if only one debug/release variant is found, set the other to be equal to the found one + if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND NOT SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE) + # debug and not release + set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG}) + set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG}) + endif() + if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE AND NOT SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG) + # release and not debug + set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE}) + set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE}) + endif() + else() + # library not found + set(SFML_FOUND FALSE) + set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND FALSE) + set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY "") + set(FIND_SFML_MISSING "${FIND_SFML_MISSING} SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY") + endif() + + # mark as advanced + MARK_AS_ADVANCED(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY + SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE + SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG + SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_RELEASE + SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_STATIC_DEBUG + SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_RELEASE + SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DYNAMIC_DEBUG) + + # add to the global list of libraries + set(SFML_LIBRARIES ${SFML_LIBRARIES} "${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY}") +endforeach() + +# in case of static linking, we must also define the list of all the dependencies of SFML libraries +if(SFML_STATIC_LIBRARIES) + + # detect the OS + if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(FIND_SFML_OS_WINDOWS 1) + elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(FIND_SFML_OS_LINUX 1) + elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + set(FIND_SFML_OS_FREEBSD 1) + elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(FIND_SFML_OS_MACOSX 1) + endif() + + # start with an empty list + set(SFML_DEPENDENCIES) + set(FIND_SFML_DEPENDENCIES_NOTFOUND) + + # macro that searches for a 3rd-party library + macro(find_sfml_dependency output friendlyname) + find_library(${output} NAMES ${ARGN} PATHS ${FIND_SFML_PATHS} PATH_SUFFIXES lib) + if(${${output}} STREQUAL "${output}-NOTFOUND") + unset(output) + set(FIND_SFML_DEPENDENCIES_NOTFOUND "${FIND_SFML_DEPENDENCIES_NOTFOUND} ${friendlyname}") + endif() + endmacro() + + # sfml-system + list(FIND SFML_FIND_COMPONENTS "system" FIND_SFML_SYSTEM_COMPONENT) + if(NOT ${FIND_SFML_SYSTEM_COMPONENT} EQUAL -1) + + # update the list -- these are only system libraries, no need to find them + if(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD OR FIND_SFML_OS_MACOSX) + set(SFML_SYSTEM_DEPENDENCIES "pthread") + endif() + if(FIND_SFML_OS_LINUX) + set(SFML_SYSTEM_DEPENDENCIES "rt") + endif() + if(FIND_SFML_OS_WINDOWS) + set(SFML_SYSTEM_DEPENDENCIES "winmm") + endif() + set(SFML_DEPENDENCIES ${SFML_SYSTEM_DEPENDENCIES} ${SFML_DEPENDENCIES}) + endif() + + # sfml-network + list(FIND SFML_FIND_COMPONENTS "network" FIND_SFML_NETWORK_COMPONENT) + if(NOT ${FIND_SFML_NETWORK_COMPONENT} EQUAL -1) + + # update the list -- these are only system libraries, no need to find them + if(FIND_SFML_OS_WINDOWS) + set(SFML_NETWORK_DEPENDENCIES "ws2_32") + endif() + set(SFML_DEPENDENCIES ${SFML_NETWORK_DEPENDENCIES} ${SFML_DEPENDENCIES}) + endif() + + # sfml-window + list(FIND SFML_FIND_COMPONENTS "window" FIND_SFML_WINDOW_COMPONENT) + if(NOT ${FIND_SFML_WINDOW_COMPONENT} EQUAL -1) + + # find libraries + if(FIND_SFML_OS_LINUX) + find_sfml_dependency(X11_LIBRARY "X11" X11) + find_sfml_dependency(XRANDR_LIBRARY "Xrandr" Xrandr) + find_sfml_dependency(UDEV_LIBRARIES "UDev" udev) + endif() + + # update the list + if(FIND_SFML_OS_WINDOWS) + set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "opengl32" "winmm" "gdi32") + elseif(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD) + set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "GL" ${X11_LIBRARY} ${XRANDR_LIBRARY}) + if(FIND_SFML_OS_FREEBSD) + set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "usbhid") + else() + set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} ${UDEV_LIBRARIES}) + endif() + elseif(FIND_SFML_OS_MACOSX) + set(SFML_WINDOW_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} "-framework OpenGL -framework Foundation -framework AppKit -framework IOKit -framework Carbon") + endif() + set(SFML_DEPENDENCIES ${SFML_WINDOW_DEPENDENCIES} ${SFML_DEPENDENCIES}) + endif() + + # sfml-graphics + list(FIND SFML_FIND_COMPONENTS "graphics" FIND_SFML_GRAPHICS_COMPONENT) + if(NOT ${FIND_SFML_GRAPHICS_COMPONENT} EQUAL -1) + + # find libraries + find_sfml_dependency(FREETYPE_LIBRARY "FreeType" freetype) + find_sfml_dependency(GLEW_LIBRARY "GLEW" glew GLEW glew32 glew32s glew64 glew64s) + find_sfml_dependency(JPEG_LIBRARY "libjpeg" jpeg) + + # update the list + set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY} ${GLEW_LIBRARY} ${JPEG_LIBRARY}) + set(SFML_DEPENDENCIES ${SFML_GRAPHICS_DEPENDENCIES} ${SFML_DEPENDENCIES}) + endif() + + # sfml-audio + list(FIND SFML_FIND_COMPONENTS "audio" FIND_SFML_AUDIO_COMPONENT) + if(NOT ${FIND_SFML_AUDIO_COMPONENT} EQUAL -1) + + # find libraries + find_sfml_dependency(OPENAL_LIBRARY "OpenAL" openal openal32) + find_sfml_dependency(SNDFILE_LIBRARY "libsndfile" sndfile) + + # update the list + set(SFML_AUDIO_DEPENDENCIES ${OPENAL_LIBRARY} ${SNDFILE_LIBRARY}) + set(SFML_DEPENDENCIES ${SFML_AUDIO_DEPENDENCIES} ${SFML_DEPENDENCIES}) + endif() + +endif() + +# handle errors +if(NOT SFML_VERSION_OK) + # SFML version not ok + set(FIND_SFML_ERROR "SFML found but version too low (requested: ${SFML_FIND_VERSION}, found: ${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR}.${SFML_VERSION_PATCH})") + set(SFML_FOUND FALSE) +elseif(SFML_STATIC_LIBRARIES AND FIND_SFML_DEPENDENCIES_NOTFOUND) + set(FIND_SFML_ERROR "SFML found but some of its dependencies are missing (${FIND_SFML_DEPENDENCIES_NOTFOUND})") + set(SFML_FOUND FALSE) +elseif(NOT SFML_FOUND) + # include directory or library not found + set(FIND_SFML_ERROR "Could NOT find SFML (missing: ${FIND_SFML_MISSING})") +endif() +if (NOT SFML_FOUND) + if(SFML_FIND_REQUIRED) + # fatal error + message(FATAL_ERROR ${FIND_SFML_ERROR}) + elseif(NOT SFML_FIND_QUIETLY) + # error but continue + message("${FIND_SFML_ERROR}") + endif() +endif() + +# handle success +if(SFML_FOUND) + message(STATUS "Found SFML ${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR}.${SFML_VERSION_PATCH} in ${SFML_INCLUDE_DIR}") +endif() diff --git a/cmake/Modules/FindSndfile.cmake b/cmake/Modules/FindSndfile.cmake new file mode 100644 index 00000000..ac8a6356 --- /dev/null +++ b/cmake/Modules/FindSndfile.cmake @@ -0,0 +1,28 @@ +# - Find sndfile +# Find the native sndfile includes and libraries +# +# SNDFILE_INCLUDE_DIR - where to find sndfile.h, etc. +# SNDFILE_LIBRARIES - List of libraries when using libsndfile. +# SNDFILE_FOUND - True if libsndfile found. + +if(SNDFILE_INCLUDE_DIR) + # Already in cache, be silent + set(SNDFILE_FIND_QUIETLY TRUE) +endif(SNDFILE_INCLUDE_DIR) + +find_path(SNDFILE_INCLUDE_DIR sndfile.h) + +find_library(SNDFILE_LIBRARY NAMES sndfile sndfile-1) + +# Handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if +# all listed variables are TRUE. +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(SNDFILE DEFAULT_MSG SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR) + +if(SNDFILE_FOUND) + set(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY}) +else(SNDFILE_FOUND) + set(SNDFILE_LIBRARIES) +endif(SNDFILE_FOUND) + +mark_as_advanced(SNDFILE_INCLUDE_DIR SNDFILE_LIBRARY) diff --git a/cmake/Modules/FindUDev.cmake b/cmake/Modules/FindUDev.cmake index 467bd693..e3c6e708 100644 --- a/cmake/Modules/FindUDev.cmake +++ b/cmake/Modules/FindUDev.cmake @@ -29,9 +29,9 @@ IF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR) execute_process(COMMAND pkg-config --atleast-version=143 libudev RESULT_VARIABLE UDEV_STABLE) # retvale is 0 of the condition is "true" so we need to negate the value... if (UDEV_STABLE) - set(UDEV_STABLE 0) + set(UDEV_STABLE 0) else (UDEV_STABLE) - set(UDEV_STABLE 1) + set(UDEV_STABLE 1) endif (UDEV_STABLE) message(STATUS "libudev stable: ${UDEV_STABLE}") ENDIF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR) @@ -50,4 +50,3 @@ ELSE (UDEV_FOUND) ENDIF (UDev_FIND_REQUIRED) ENDIF (UDEV_FOUND) -mark_as_advanced(UDEV_INCLUDE_DIR UDEV_LIBRARIES) diff --git a/cmake/Modules/FindVORBIS.cmake b/cmake/Modules/FindVORBIS.cmake deleted file mode 100644 index e285411a..00000000 --- a/cmake/Modules/FindVORBIS.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# -# Try to find Ogg/Vorbis libraries and include paths. -# Once done this will define -# -# VORBIS_FOUND -# VORBIS_INCLUDE_DIRS -# VORBIS_LIBRARIES -# - -find_path(OGG_INCLUDE_DIR ogg/ogg.h) -find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h) - -find_library(OGG_LIBRARY NAMES ogg) -find_library(VORBIS_LIBRARY NAMES vorbis) -if (NOT SFML_OS_IOS) - find_library(VORBISFILE_LIBRARY NAMES vorbisfile) - find_library(VORBISENC_LIBRARY NAMES vorbisenc) - set(VORBIS_LIBRARIES ${VORBISENC_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY}) -else() - set(VORBIS_LIBRARIES ${VORBIS_LIBRARY} ${OGG_LIBRARY}) -endif() - -include(FindPackageHandleStandardArgs) - -find_package_handle_standard_args(VORBIS DEFAULT_MSG VORBIS_LIBRARIES VORBIS_INCLUDE_DIR OGG_INCLUDE_DIR) - -set(VORBIS_INCLUDE_DIRS ${OGG_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR}) - -mark_as_advanced(OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY) diff --git a/cmake/SFMLConfig.cmake.in b/cmake/SFMLConfig.cmake.in deleted file mode 100644 index 86527b73..00000000 --- a/cmake/SFMLConfig.cmake.in +++ /dev/null @@ -1,148 +0,0 @@ -# This script provides the SFML libraries as imported targets -# ------------------------------------ -# -# Usage -# ----- -# -# When you try to locate the SFML libraries, you must specify which modules you want to use (system, window, graphics, network, audio, main). -# If none is given, no imported target will be created and you won't be able to link to SFML libraries. -# example: -# find_package(SFML COMPONENTS graphics window system) # find the graphics, window and system modules -# -# You can enforce a specific version, either MAJOR.MINOR or only MAJOR. -# If nothing is specified, the version won't be checked (i.e. any version will be accepted). -# example: -# find_package(SFML COMPONENTS ...) # no specific version required -# find_package(SFML 2 COMPONENTS ...) # any 2.x version -# find_package(SFML 2.4 COMPONENTS ...) # version 2.4 or greater -# -# By default, the dynamic libraries of SFML will be found. To find the static ones instead, -# you must set the SFML_STATIC_LIBRARIES variable to TRUE before calling find_package(SFML ...). -# You don't need to deal with SFML's dependencies when linking your targets against SFML libraries, -# they will all be configured automatically, even if you use SFML static libraries. -# example: -# set(SFML_STATIC_LIBRARIES TRUE) -# find_package(SFML 2 COMPONENTS network system) -# -# On macOS by default CMake will search for frameworks. If you want to use static libraries and have installed -# both SFML frameworks and SFML static libraries, your must set CMAKE_FIND_FRAMEWORK to "NEVER" or "LAST" -# in addition to setting SFML_STATIC_LIBRARIES to TRUE. Otherwise CMake will check the frameworks bundle config and -# fail after finding out that it does not provide static libraries. Please refer to CMake documentation for more details. -# -# Additionally, keep in mind that SFML frameworks are only available as release libraries unlike dylibs which -# are available for both release and debug modes. -# -# If SFML is not installed in a standard path, you can use the SFML_DIR CMake variable -# to tell CMake where SFML's config file is located (PREFIX/lib/cmake/SFML for a library-based installation, -# and PREFIX/SFML.framework/Resources/CMake on macOS for a framework-based installation). -# -# Output -# ------ -# -# This script defines the following variables: -# - For each specified module XXX (system, window, graphics, network, audio, main): -# - SFML_XXX_FOUND: true if either the debug or release library of the xxx module is found -# - SFML_FOUND: true if all the required modules are found -# -# And the following targets: -# - For each specified module XXX (system, window, graphics, network, audio, main): -# - sfml-XXX -# The SFML targets are the same for both Debug and Release build configurations and will automatically provide -# correct settings based on your currently active build configuration. The SFML targets name also do not change -# when using dynamic or static SFML libraries. -# -# When linking against a SFML target, you do not need to specify indirect dependencies. For example, linking -# against sfml-graphics will also automatically link against sfml-window and sfml-system. -# -# example: -# find_package(SFML 2 COMPONENTS graphics audio REQUIRED) -# add_executable(myapp ...) -# target_link_libraries(myapp sfml-graphics sfml-audio) - -if (NOT SFML_FIND_COMPONENTS) - message(FATAL_ERROR "find_package(SFML) called with no component") -endif() - -set(FIND_SFML_PATHS - "${CMAKE_CURRENT_LIST_DIR}/../.." - ${SFML_ROOT} - $ENV{SFML_ROOT} - ~/Library/Frameworks - /Library/Frameworks - /usr/local - /usr - /sw - /opt/local - /opt/csw - /opt) - -find_path(SFML_DOC_DIR SFML.tag - PATH_SUFFIXES SFML/doc share/doc/SFML - PATHS ${FIND_SFML_PATHS}) - - -# Update requested components (eg. request window component if graphics component was requested) -set(FIND_SFML_SYSTEM_DEPENDENCIES "") -set(FIND_SFML_MAIN_DEPENDENCIES "") -set(FIND_SFML_AUDIO_DEPENDENCIES system) -set(FIND_SFML_NETWORK_DEPENDENCIES system) -set(FIND_SFML_WINDOW_DEPENDENCIES system) -set(FIND_SFML_GRAPHICS_DEPENDENCIES window system) -set(FIND_SFML_ADDITIONAL_COMPONENTS "") -foreach(component ${SFML_FIND_COMPONENTS}) - string(TOUPPER "${component}" UPPER_COMPONENT) - list(APPEND FIND_SFML_ADDITIONAL_COMPONENTS ${FIND_SFML_${UPPER_COMPONENT}_DEPENDENCIES}) -endforeach() -list(APPEND SFML_FIND_COMPONENTS ${FIND_SFML_ADDITIONAL_COMPONENTS}) -list(REMOVE_DUPLICATES SFML_FIND_COMPONENTS) - -# Choose which target definitions must be imported -if (SFML_STATIC_LIBRARIES) - set(SFML_IS_FRAMEWORK_INSTALL "@SFML_BUILD_FRAMEWORKS@") - if (SFML_IS_FRAMEWORK_INSTALL) - message(WARNING "Static frameworks are not supported by SFML. Clear SFML_DIR cache entry, \ -and either change SFML_STATIC_LIBRARIES or CMAKE_FIND_FRAMEWORK before calling find_package(SFML)") - endif() - set(config_name "Static") -else() - set(config_name "Shared") -endif() -set(targets_config_file "${CMAKE_CURRENT_LIST_DIR}/SFML${config_name}Targets.cmake") - -# Generate imported targets for SFML and its dependencies -if (EXISTS "${targets_config_file}") - # Set SFML_FOUND to TRUE by default, may be overwritten by one of the includes below - set(SFML_FOUND TRUE) - include("${targets_config_file}") - include("${CMAKE_CURRENT_LIST_DIR}/SFMLConfigDependencies.cmake") - - if (SFML_FOUND) - foreach (component ${SFML_FIND_COMPONENTS}) - string(TOUPPER "${component}" UPPER_COMPONENT) - if (TARGET sfml-${component}) - set(SFML_${UPPER_COMPONENT}_FOUND TRUE) - else() - set(FIND_SFML_ERROR "Found SFML but requested component '${component}' is missing in the config defined in ${SFML_DIR}.") - set(SFML_${UPPER_COMPONENT}_FOUND FALSE) - set(SFML_FOUND FALSE) - endif() - endforeach() - endif() -else() - set(FIND_SFML_ERROR "Requested SFML configuration (${config_name}) was not found") - set(SFML_FOUND FALSE) -endif() - -if (NOT SFML_FOUND) - if(SFML_FIND_REQUIRED) - # fatal error - message(FATAL_ERROR "${FIND_SFML_ERROR}") - elseif(NOT SFML_FIND_QUIETLY) - # error but continue - message(STATUS "${FIND_SFML_ERROR}") - endif() -endif() - -if (SFML_FOUND AND NOT SFML_FIND_QUIETLY) - message(STATUS "Found SFML @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ in ${CMAKE_CURRENT_LIST_DIR}") -endif() diff --git a/cmake/SFMLConfigDependencies.cmake.in b/cmake/SFMLConfigDependencies.cmake.in deleted file mode 100644 index c5813bd6..00000000 --- a/cmake/SFMLConfigDependencies.cmake.in +++ /dev/null @@ -1,87 +0,0 @@ - -if (CMAKE_VERSION VERSION_LESS 3.5.2) - include(CMakeParseArguments) -endif() - -# in case of static linking, we must also define the list of all the dependencies of SFML libraries -if(SFML_STATIC_LIBRARIES) - # detect the OS - if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set(FIND_SFML_OS_WINDOWS 1) - elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - set(FIND_SFML_OS_LINUX 1) - elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") - set(FIND_SFML_OS_FREEBSD 1) - elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - if (DEFINED IOS) - set(FIND_SFML_OS_IOS 1) - else() - set(FIND_SFML_OS_MACOSX 1) - endif() - endif() - - # start with an empty list - set(FIND_SFML_DEPENDENCIES_NOTFOUND) - - # macro that searches for a 3rd-party library - function(sfml_bind_dependency) - cmake_parse_arguments(THIS "" "TARGET;FRIENDLY_NAME" "SEARCH_NAMES" ${ARGN}) - if (THIS_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "Unknown arguments when calling sfml_bind_dependency: ${THIS_UNPARSED_ARGUMENTS}") - endif() - - # No lookup in environment variables (PATH on Windows), as they may contain wrong library versions - find_library(${THIS_FRIENDLY_NAME}_LIB NAMES ${THIS_SEARCH_NAMES} - PATHS ${FIND_SFML_PATHS} PATH_SUFFIXES lib NO_SYSTEM_ENVIRONMENT_PATH) - mark_as_advanced(${THIS_FRIENDLY_NAME}_LIB) - if(${THIS_FRIENDLY_NAME}_LIB) - set_property(TARGET ${THIS_TARGET} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${${THIS_FRIENDLY_NAME}_LIB}") - else() - set(FIND_SFML_DEPENDENCIES_NOTFOUND "${FIND_SFML_DEPENDENCIES_NOTFOUND} ${THIS_FRIENDLY_NAME}" PARENT_SCOPE) - endif() - endfunction() - - # sfml-window - list(FIND SFML_FIND_COMPONENTS "window" FIND_SFML_WINDOW_COMPONENT_INDEX) - if(FIND_SFML_WINDOW_COMPONENT_INDEX GREATER -1) - if(FIND_SFML_OS_LINUX OR FIND_SFML_OS_FREEBSD) - sfml_bind_dependency(TARGET X11 FRIENDLY_NAME "X11" SEARCH_NAMES "X11") - sfml_bind_dependency(TARGET X11 FRIENDLY_NAME "Xrandr" SEARCH_NAMES "Xrandr") - sfml_bind_dependency(TARGET X11 FRIENDLY_NAME "Xcursor" SEARCH_NAMES "Xcursor") - endif() - - if(FIND_SFML_OS_LINUX) - sfml_bind_dependency(TARGET UDev FRIENDLY_NAME "UDev" SEARCH_NAMES "udev" "libudev") - endif() - - if (FIND_SFML_OS_WINDOWS) - set_property(TARGET OpenGL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "OpenGL32") - elseif(NOT FIND_SFML_OS_IOS) - sfml_bind_dependency(TARGET OpenGL FRIENDLY_NAME "OpenGL" SEARCH_NAMES "OpenGL" "GL") - endif() - endif() - - # sfml-graphics - list(FIND SFML_FIND_COMPONENTS "graphics" FIND_SFML_GRAPHICS_COMPONENT_INDEX) - if(FIND_SFML_GRAPHICS_COMPONENT_INDEX GREATER -1) - sfml_bind_dependency(TARGET Freetype FRIENDLY_NAME "FreeType" SEARCH_NAMES "freetype") - endif() - - # sfml-audio - list(FIND SFML_FIND_COMPONENTS "audio" FIND_SFML_AUDIO_COMPONENT_INDEX) - if(FIND_SFML_AUDIO_COMPONENT_INDEX GREATER -1) - sfml_bind_dependency(TARGET OpenAL FRIENDLY_NAME "OpenAL" SEARCH_NAMES "OpenAL" "openal" "openal32") - if (NOT FIND_SFML_OS_IOS) - sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "VorbisFile" SEARCH_NAMES "vorbisfile") - sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "VorbisEnc" SEARCH_NAMES "vorbisenc") - endif() - sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "Vorbis" SEARCH_NAMES "vorbis") - sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "Ogg" SEARCH_NAMES "ogg") - sfml_bind_dependency(TARGET FLAC FRIENDLY_NAME "FLAC" SEARCH_NAMES "FLAC") - endif() - - if (FIND_SFML_DEPENDENCIES_NOTFOUND) - set(FIND_SFML_ERROR "SFML found but some of its dependencies are missing (${FIND_SFML_DEPENDENCIES_NOTFOUND})") - set(SFML_FOUND FALSE) - endif() -endif() diff --git a/cmake/toolchains/android.toolchain.cmake b/cmake/toolchains/android.toolchain.cmake new file mode 100644 index 00000000..0b109718 --- /dev/null +++ b/cmake/toolchains/android.toolchain.cmake @@ -0,0 +1,1156 @@ +# ------------------------------------------------------------------------------ +# Android CMake toolchain file, for use with the Android NDK r9d +# Requires cmake 2.6.3 or newer (2.8.5 or newer is recommended). +# See home page: http://code.google.com/p/android-cmake/ +# +# The file was forked from the OpenCV project. This version is maintained by +# the SFML project and can be found at http://github.com/LaurentGomila/SFML +# (cmake/toolchains/android.toolchain.cmake). It brings support for the +# latest NDK versions. +# +# Usage Linux: +# $ export ANDROID_NDK=/absolute/path/to/the/android-ndk +# $ mkdir build && cd build +# $ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/the/android.toolchain.cmake .. +# $ make -j8 +# +# Usage Linux (using standalone toolchain): +# $ export ANDROID_STANDALONE_TOOLCHAIN=/absolute/path/to/android-toolchain +# $ mkdir build && cd build +# $ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/the/android.toolchain.cmake .. +# $ make -j8 +# +# Usage Windows: +# You need native port of make to build your project. +# Android NDK r7 (or newer) already has make.exe on board. +# For older NDK you have to install it separately. +# For example, this one: http://gnuwin32.sourceforge.net/packages/make.htm +# +# $ SET ANDROID_NDK=C:\absolute\path\to\the\android-ndk +# $ mkdir build && cd build +# $ cmake.exe -G"MinGW Makefiles" +# -DCMAKE_TOOLCHAIN_FILE=path\to\the\android.toolchain.cmake +# -DCMAKE_MAKE_PROGRAM="%ANDROID_NDK%\prebuilt\windows\bin\make.exe" .. +# $ "%ANDROID_NDK%\prebuilt\windows\bin\make.exe" +# +# +# Options (can be set as cmake parameters: -D=): +# ANDROID_NDK=/opt/android-ndk - path to the NDK root. +# Can be set as environment variable. Can be set only at first cmake run. +# +# ANDROID_STANDALONE_TOOLCHAIN=/opt/android-toolchain - path to the +# standalone toolchain. This option is not used if full NDK is found +# (ignored if ANDROID_NDK is set). +# Can be set as environment variable. Can be set only at first cmake run. +# +# ANDROID_ABI=armeabi-v7a - specifies the target Application Binary +# Interface (ABI). This option nearly matches to the APP_ABI variable +# used by ndk-build tool from Android NDK. +# +# Possible targets are: +# "armeabi" - matches to the NDK ABI with the same name. +# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation. +# "armeabi-v7a" - matches to the NDK ABI with the same name. +# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation. +# "armeabi-v7a with NEON" - same as armeabi-v7a, but +# sets NEON as floating-point unit +# "armeabi-v7a with VFPV3" - same as armeabi-v7a, but +# sets VFPV3 as floating-point unit (has 32 registers instead of 16). +# "armeabi-v6 with VFP" - tuned for ARMv6 processors having VFP. +# "x86" - matches to the NDK ABI with the same name. +# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation. +# "mips" - matches to the NDK ABI with the same name +# (not testes on real devices) +# +# ANDROID_NATIVE_API_LEVEL=android-9 - level of Android API compile for. +# Option is read-only when standalone toolchain used. +# +# ANDROID_FORCE_ARM_BUILD=OFF - set true to generate 32-bit ARM instructions +# instead of Thumb-1. Is not available for "x86" (inapplicable) and +# "armeabi-v6 with VFP" (forced) ABIs. +# +# ANDROID_NO_UNDEFINED=ON - set true to show all undefined symbols as linker +# errors even if they are not used. +# +# ANDROID_SO_UNDEFINED=OFF - set true to allow undefined symbols in shared +# libraries. Automatically turned on for NDK r5x and r6x due to GLESv2 +# problems. +# +# LIBRARY_OUTPUT_PATH_ROOT=${CMAKE_SOURCE_DIR} - where to output binary +# files. See additional details below. +# +# ANDROID_SET_OBSOLETE_VARIABLES=ON - it set, then toolchain defines some +# obsolete variables which were set by previous versions of this file for +# backward compatibility. +# +# +# What?: +# android-cmake toolchain searches for NDK/toolchain in the following order: +# ANDROID_NDK - cmake parameter +# ANDROID_NDK - environment variable +# ANDROID_STANDALONE_TOOLCHAIN - cmake parameter +# ANDROID_STANDALONE_TOOLCHAIN - environment variable +# ANDROID_NDK - default locations +# ANDROID_STANDALONE_TOOLCHAIN - default locations +# +# Make sure to do the following in your scripts: +# SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${my_cxx_flags}" ) +# SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${my_cxx_flags}" ) +# The flags will be prepopulated with critical flags, so don't loose them. +# Also be aware that toolchain also sets configuration-specific compiler +# flags and linker flags. +# +# ANDROID and BUILD_ANDROID will be set to true, you may test any of these +# variables to make necessary Android-specific configuration changes. +# +# Also ARMEABI or ARMEABI_V7A or X86 will be set true, mutually exclusive. +# NEON option will be set true if VFP is set to NEON. +# +# LIBRARY_OUTPUT_PATH_ROOT should be set in cache to determine where Android +# libraries will be installed. +# Default is ${CMAKE_SOURCE_DIR}, and the android libs will always be +# under the ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME} +# (depending on the target ABI). This is convenient for Android packaging. +# +# Authors: +# Ethan Rublee ethan.ruble@gmail.com +# Andrey Kamaev andrey.kamaev@itseez.com +# +# Contributors: +# Jonathan De Wachter dewachter.jonathan@gmail.com +# +# Change Log: +# - initial version December 2010 +# - modified April 2011 +# [+] added possibility to build with NDK (without standalone toolchain) +# [+] support cross-compilation on Windows (native, no cygwin support) +# [+] added compiler option to force "char" type to be signed +# [+] added toolchain option to compile to 32-bit ARM instructions +# [+] added toolchain option to disable SWIG search +# [+] added platform "armeabi-v7a with VFPV3" +# [~] ARM_TARGETS renamed to ARM_TARGET +# [+] EXECUTABLE_OUTPUT_PATH is set by toolchain (required on Windows) +# [~] Fixed bug with ANDROID_API_LEVEL variable +# [~] turn off SWIG search if it is not found first time +# - modified May 2011 +# [~] ANDROID_LEVEL is renamed to ANDROID_API_LEVEL +# [+] ANDROID_API_LEVEL is detected by toolchain if not specified +# [~] added guard to prevent changing of output directories on the first +# cmake pass +# [~] toolchain exits with error if ARM_TARGET is not recognized +# - modified June 2011 +# [~] default NDK path is updated for version r5c +# [+] variable CMAKE_SYSTEM_PROCESSOR is set based on ARM_TARGET +# [~] toolchain install directory is added to linker paths +# [-] removed SWIG-related stuff from toolchain +# [+] added macro find_host_package, find_host_program to search +# packages/programs on the host system +# [~] fixed path to STL library +# - modified July 2011 +# [~] fixed options caching +# [~] search for all supported NDK versions +# [~] allowed spaces in NDK path +# - modified September 2011 +# [~] updated for NDK r6b +# - modified November 2011 +# [*] rewritten for NDK r7 +# [+] x86 toolchain support (experimental) +# [+] added "armeabi-v6 with VFP" ABI for ARMv6 processors. +# [~] improved compiler and linker flags management +# [+] support different build flags for Release and Debug configurations +# [~] by default compiler flags the same as used by ndk-build (but only +# where reasonable) +# [~] ANDROID_NDK_TOOLCHAIN_ROOT is splitted to ANDROID_STANDALONE_TOOLCHAIN +# and ANDROID_TOOLCHAIN_ROOT +# [~] ARM_TARGET is renamed to ANDROID_ABI +# [~] ARMEABI_NDK_NAME is renamed to ANDROID_NDK_ABI_NAME +# [~] ANDROID_API_LEVEL is renamed to ANDROID_NATIVE_API_LEVEL +# - modified January 2012 +# [+] added stlport_static support (experimental) +# [+] added special check for cygwin +# [+] filtered out hidden files (starting with .) while globbing inside NDK +# [+] automatically applied GLESv2 linkage fix for NDK revisions 5-6 +# [+] added ANDROID_GET_ABI_RAWNAME to get NDK ABI names by CMake flags +# - modified February 2012 +# [+] updated for NDK r7b +# [~] fixed cmake try_compile() command +# [~] Fix for missing install_name_tool on OS X +# - modified March 2012 +# [~] fixed incorrect C compiler flags +# [~] fixed CMAKE_SYSTEM_PROCESSOR change on ANDROID_ABI change +# [+] improved toolchain loading speed +# [+] added assembler language support (.S) +# [+] allowed preset search paths and extra search suffixes +# - modified April 2012 +# [+] updated for NDK r7c +# [~] fixed most of problems with compiler/linker flags and caching +# [+] added option ANDROID_FUNCTION_LEVEL_LINKING +# - modified May 2012 +# [+] updated for NDK r8 +# [+] added mips architecture support +# - modified August 2012 +# [+] updated for NDK r8b +# [~] all intermediate files generated by toolchain are moved into CMakeFiles +# [~] libstdc++ and libsupc are removed from explicit link libraries +# - modified September 2013 +# [+] updated for NDK r9 +# [+] support 64-bits toolchains +# - modified March 2014 +# [+] updated for NDK r9d and dropped earlier versions +# [+] replaced stlport with libc++ +# ------------------------------------------------------------------------------ + +cmake_minimum_required( VERSION 2.6.3 ) + +if( DEFINED CMAKE_CROSSCOMPILING ) + # subsequent toolchain loading is not really needed + return() +endif() + +get_property(_CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE) +if( _CMAKE_IN_TRY_COMPILE ) + include( "${CMAKE_CURRENT_SOURCE_DIR}/../android.toolchain.config.cmake" OPTIONAL ) +endif() + +# this one is important +set( CMAKE_SYSTEM_NAME Linux ) +# this one not so much +set( CMAKE_SYSTEM_VERSION 1 ) + +set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9d "" ) +if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS) + if( CMAKE_HOST_WIN32 ) + file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS ) + set( ANDROID_NDK_SEARCH_PATHS "${ANDROID_NDK_SEARCH_PATHS}/android-ndk" "$ENV{SystemDrive}/NVPACK/android-ndk" ) + else() + file( TO_CMAKE_PATH "$ENV{HOME}" ANDROID_NDK_SEARCH_PATHS ) + set( ANDROID_NDK_SEARCH_PATHS /opt/android-ndk "${ANDROID_NDK_SEARCH_PATHS}/NVPACK/android-ndk" ) + endif() +endif() +if(NOT DEFINED ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH) + set( ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH /opt/android-toolchain ) +endif() + +set( ANDROID_SUPPORTED_ABIS_arm "armeabi;armeabi-v7a;armeabi-v7a with NEON;armeabi-v7a with VFPV3;armeabi-v6 with VFP" ) +set( ANDROID_SUPPORTED_ABIS_x86 "x86" ) +set( ANDROID_SUPPORTED_ABIS_mipsel "mips" ) + +set( ANDROID_DEFAULT_NDK_API_LEVEL 9 ) +set( ANDROID_DEFAULT_NDK_API_LEVEL_x86 9 ) +set( ANDROID_DEFAULT_NDK_API_LEVEL_mips 9 ) + + +macro( __LIST_FILTER listvar regex ) + if( ${listvar} ) + foreach( __val ${${listvar}} ) + if( __val MATCHES "${regex}" ) + list( REMOVE_ITEM ${listvar} "${__val}" ) + endif() + endforeach() + endif() +endmacro() + +macro( __INIT_VARIABLE var_name ) + set( __test_path 0 ) + foreach( __var ${ARGN} ) + if( __var STREQUAL "PATH" ) + set( __test_path 1 ) + break() + endif() + endforeach() + if( __test_path AND NOT EXISTS "${${var_name}}" ) + unset( ${var_name} CACHE ) + endif() + if( "${${var_name}}" STREQUAL "" ) + set( __values 0 ) + foreach( __var ${ARGN} ) + if( __var STREQUAL "VALUES" ) + set( __values 1 ) + elseif( NOT __var STREQUAL "PATH" ) + set( __obsolete 0 ) + if( __var MATCHES "^OBSOLETE_.*$" ) + string( REPLACE "OBSOLETE_" "" __var "${__var}" ) + set( __obsolete 1 ) + endif() + if( __var MATCHES "^ENV_.*$" ) + string( REPLACE "ENV_" "" __var "${__var}" ) + set( __value "$ENV{${__var}}" ) + elseif( DEFINED ${__var} ) + set( __value "${${__var}}" ) + else() + if( __values ) + set( __value "${__var}" ) + else() + set( __value "" ) + endif() + endif() + if( NOT "${__value}" STREQUAL "" ) + if( __test_path ) + if( EXISTS "${__value}" ) + set( ${var_name} "${__value}" ) + if( __obsolete ) + message( WARNING "Using value of obsolete variable ${__var} as initial value for ${var_name}. Please note, that ${__var} can be completely removed in future versions of the toolchain." ) + endif() + break() + endif() + else() + set( ${var_name} "${__value}" ) + if( __obsolete ) + message( WARNING "Using value of obsolete variable ${__var} as initial value for ${var_name}. Please note, that ${__var} can be completely removed in future versions of the toolchain." ) + endif() + break() + endif() + endif() + endif() + endforeach() + unset( __value ) + unset( __values ) + unset( __obsolete ) + endif() + unset( __test_path ) +endmacro() + +macro( __DETECT_NATIVE_API_LEVEL _var _path ) + SET( __ndkApiLevelRegex "^[\t ]*#define[\t ]+__ANDROID_API__[\t ]+([0-9]+)[\t ]*$" ) + FILE( STRINGS ${_path} __apiFileContent REGEX "${__ndkApiLevelRegex}" ) + if( NOT __apiFileContent ) + message( SEND_ERROR "Could not get Android native API level. Probably you have specified invalid level value, or your copy of NDK/toolchain is broken." ) + endif() + string( REGEX REPLACE "${__ndkApiLevelRegex}" "\\1" ${_var} "${__apiFileContent}" ) + unset( __apiFileContent ) + unset( __ndkApiLevelRegex ) +endmacro() + +macro( __DETECT_TOOLCHAIN_MACHINE_NAME _var _root ) + file( GLOB __gccExePath "${_root}/bin/*-gcc${TOOL_OS_SUFFIX}" ) + __LIST_FILTER( __gccExePath "bin/[.].*-gcc${TOOL_OS_SUFFIX}$" ) + list( LENGTH __gccExePath __gccExePathsCount ) + if( NOT __gccExePathsCount EQUAL 1 ) + message( WARNING "Could not uniquely determine machine name for compiler from ${_root}." ) + set( ${_var} "" ) + else() + get_filename_component( __gccExeName "${__gccExePath}" NAME_WE ) + string( REPLACE "-gcc" "" ${_var} "${__gccExeName}" ) + endif() + unset( __gccExePath ) + unset( __gccExePathsCount ) + unset( __gccExeName ) +endmacro() + +macro( __COPY_IF_DIFFERENT _source _destination ) + execute_process( COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${_source}" "${_destination}" RESULT_VARIABLE __fileCopyProcess ) + if( NOT __fileCopyProcess EQUAL 0 OR NOT EXISTS "${_destination}") + message( SEND_ERROR "Failed copying of ${_source} to the ${_destination}" ) + endif() + unset( __fileCopyProcess ) +endmacro() + + +# stl version: by default gnustl_static will be used +set( ANDROID_USE_STLPORT TRUE CACHE BOOL "Experimental: use stlport_static instead of gnustl_static") +mark_as_advanced( ANDROID_USE_STLPORT ) + +# fight against cygwin +set( ANDROID_FORBID_SYGWIN TRUE CACHE BOOL "Prevent cmake from working under cygwin and using cygwin tools") +mark_as_advanced( ANDROID_FORBID_SYGWIN ) +if( ANDROID_FORBID_SYGWIN ) + if( CYGWIN ) + message( FATAL_ERROR "Android NDK and android-cmake toolchain are not welcome Cygwin. It is unlikely that this cmake toolchain will work under cygwin. But if you want to try then you can set cmake variable ANDROID_FORBID_SYGWIN to FALSE and rerun cmake." ) + endif() + + if( CMAKE_HOST_WIN32 ) + # remove cygwin from PATH + set( __new_path "$ENV{PATH}") + __LIST_FILTER( __new_path "cygwin" ) + set(ENV{PATH} "${__new_path}") + unset(__new_path) + endif() +endif() + +# see if we have path to Android NDK +__INIT_VARIABLE( ANDROID_NDK PATH ENV_ANDROID_NDK ) +if( NOT ANDROID_NDK ) + # see if we have path to Android standalone toolchain + __INIT_VARIABLE( ANDROID_STANDALONE_TOOLCHAIN PATH ENV_ANDROID_STANDALONE_TOOLCHAIN OBSOLETE_ANDROID_NDK_TOOLCHAIN_ROOT OBSOLETE_ENV_ANDROID_NDK_TOOLCHAIN_ROOT ) + + if( NOT ANDROID_STANDALONE_TOOLCHAIN ) + #try to find Android NDK in one of the the default locations + set( __ndkSearchPaths ) + foreach( __ndkSearchPath ${ANDROID_NDK_SEARCH_PATHS} ) + foreach( suffix ${ANDROID_SUPPORTED_NDK_VERSIONS} ) + list( APPEND __ndkSearchPaths "${__ndkSearchPath}${suffix}" ) + endforeach() + endforeach() + __INIT_VARIABLE( ANDROID_NDK PATH VALUES ${__ndkSearchPaths} ) + unset( __ndkSearchPaths ) + + if( ANDROID_NDK ) + message( STATUS "Using default path for Android NDK: ${ANDROID_NDK}" ) + message( STATUS " If you prefer to use a different location, please define a cmake or environment variable: ANDROID_NDK" ) + else() + #try to find Android standalone toolchain in one of the the default locations + __INIT_VARIABLE( ANDROID_STANDALONE_TOOLCHAIN PATH ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH ) + + if( ANDROID_STANDALONE_TOOLCHAIN ) + message( STATUS "Using default path for standalone toolchain ${ANDROID_STANDALONE_TOOLCHAIN}" ) + message( STATUS " If you prefer to use a different location, please define the variable: ANDROID_STANDALONE_TOOLCHAIN" ) + endif( ANDROID_STANDALONE_TOOLCHAIN ) + endif( ANDROID_NDK ) + endif( NOT ANDROID_STANDALONE_TOOLCHAIN ) +endif( NOT ANDROID_NDK ) + +# remember found paths +if( ANDROID_NDK ) + get_filename_component( ANDROID_NDK "${ANDROID_NDK}" ABSOLUTE ) + # try to detect change + if( CMAKE_AR ) + string( LENGTH "${ANDROID_NDK}" __length ) + string( SUBSTRING "${CMAKE_AR}" 0 ${__length} __androidNdkPreviousPath ) + if( NOT __androidNdkPreviousPath STREQUAL ANDROID_NDK ) + message( FATAL_ERROR "It is not possible to change path to the NDK on subsequent run." ) + endif() + unset( __androidNdkPreviousPath ) + unset( __length ) + endif() + set( ANDROID_NDK "${ANDROID_NDK}" CACHE INTERNAL "Path of the Android NDK" ) + set( BUILD_WITH_ANDROID_NDK True ) +elseif( ANDROID_STANDALONE_TOOLCHAIN ) + get_filename_component( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" ABSOLUTE ) + # try to detect change + if( CMAKE_AR ) + string( LENGTH "${ANDROID_STANDALONE_TOOLCHAIN}" __length ) + string( SUBSTRING "${CMAKE_AR}" 0 ${__length} __androidStandaloneToolchainPreviousPath ) + if( NOT __androidStandaloneToolchainPreviousPath STREQUAL ANDROID_STANDALONE_TOOLCHAIN ) + message( FATAL_ERROR "It is not possible to change path to the Android standalone toolchain on subsequent run." ) + endif() + unset( __androidStandaloneToolchainPreviousPath ) + unset( __length ) + endif() + set( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" CACHE INTERNAL "Path of the Android standalone toolchain" ) + set( BUILD_WITH_STANDALONE_TOOLCHAIN True ) +else() + list(GET ANDROID_NDK_SEARCH_PATHS 0 ANDROID_NDK_SEARCH_PATH) + message( FATAL_ERROR "Could not find neither Android NDK nor Android standalone toolcahin. + You should either set an environment variable: + export ANDROID_NDK=~/my-android-ndk + or + export ANDROID_STANDALONE_TOOLCHAIN=~/my-android-toolchain + or put the toolchain or NDK in the default path: + sudo ln -s ~/my-android-ndk ${ANDROID_NDK_SEARCH_PATH} + sudo ln -s ~/my-android-toolchain ${ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH}" ) +endif() + +# detect current host platform +set( ANDROID_NDK_HOST_SYSTEM_ARCH "x86" ) +set( TOOL_OS_SUFFIX "" ) +if( CMAKE_HOST_APPLE ) + set( ANDROID_NDK_HOST_SYSTEM_NAME "darwin-x86" ) + if(NOT EXISTS "${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.6/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}") + set( ANDROID_NDK_HOST_SYSTEM_NAME "darwin-x86_64" ) + set( ANDROID_NDK_HOST_SYSTEM_ARCH "x64" ) + endif() +elseif( CMAKE_HOST_WIN32 ) + set( ANDROID_NDK_HOST_SYSTEM_NAME "windows" ) + set( TOOL_OS_SUFFIX ".exe" ) + if(NOT EXISTS "${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.6/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}") + set( ANDROID_NDK_HOST_SYSTEM_NAME "windows-x86_64" ) + set( ANDROID_NDK_HOST_SYSTEM_ARCH "x64" ) + endif() +elseif( CMAKE_HOST_UNIX ) + set( ANDROID_NDK_HOST_SYSTEM_NAME "linux-x86" ) + if(NOT EXISTS "${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.6/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}") + set( ANDROID_NDK_HOST_SYSTEM_NAME "linux-x86_64" ) + set( ANDROID_NDK_HOST_SYSTEM_ARCH "x64" ) + endif() +else() + message( FATAL_ERROR "Cross-compilation on your platform is not supported by this cmake toolchain" ) +endif() + +# get all the details about standalone toolchain +if( BUILD_WITH_STANDALONE_TOOLCHAIN ) + __DETECT_NATIVE_API_LEVEL( ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_STANDALONE_TOOLCHAIN}/sysroot/usr/include/android/api-level.h" ) + set( ANDROID_STANDALONE_TOOLCHAIN_API_LEVEL ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} ) + set( __availableToolchains "standalone" ) + __DETECT_TOOLCHAIN_MACHINE_NAME( __availableToolchainMachines "${ANDROID_STANDALONE_TOOLCHAIN}" ) + if( NOT __availableToolchainMachines ) + message( FATAL_ERROR "Could not determine machine name of your toolchain. Probably your Android standalone toolchain is broken." ) + endif() + if( __availableToolchainMachines MATCHES i686 ) + set( __availableToolchainArchs "x86" ) + elseif( __availableToolchainMachines MATCHES arm ) + set( __availableToolchainArchs "arm" ) + elseif( __availableToolchainMachines MATCHES mipsel ) + set( __availableToolchainArchs "mipsel" ) + endif() + if( ANDROID_COMPILER_VERSION ) + # do not run gcc every time because it is relatevely expencive + set( __availableToolchainCompilerVersions "${ANDROID_COMPILER_VERSION}" ) + else() + execute_process( COMMAND "${ANDROID_STANDALONE_TOOLCHAIN}/bin/${__availableToolchainMachines}-gcc${TOOL_OS_SUFFIX}" --version + OUTPUT_VARIABLE __availableToolchainCompilerVersions OUTPUT_STRIP_TRAILING_WHITESPACE ) + string( REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" __availableToolchainCompilerVersions "${__availableToolchainCompilerVersions}" ) + endif() +endif() + +# get all the details about NDK +if( BUILD_WITH_ANDROID_NDK ) + file( GLOB ANDROID_SUPPORTED_NATIVE_API_LEVELS RELATIVE "${ANDROID_NDK}/platforms" "${ANDROID_NDK}/platforms/android-*" ) + string( REPLACE "android-" "" ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_SUPPORTED_NATIVE_API_LEVELS}" ) + file( GLOB __availableToolchains RELATIVE "${ANDROID_NDK}/toolchains" "${ANDROID_NDK}/toolchains/*" ) + __LIST_FILTER( __availableToolchains "^[.]" ) + set( __availableToolchainMachines "" ) + set( __availableToolchainArchs "" ) + set( __availableToolchainCompilerVersions "" ) + foreach( __toolchain ${__availableToolchains} ) + __DETECT_TOOLCHAIN_MACHINE_NAME( __machine "${ANDROID_NDK}/toolchains/${__toolchain}/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}" ) + if( __machine ) + string( REGEX MATCH "[0-9]+[.][0-9]+[.]*[0-9]*$" __version "${__toolchain}" ) + string( REGEX MATCH "^[^-]+" __arch "${__toolchain}" ) + list( APPEND __availableToolchainMachines "${__machine}" ) + list( APPEND __availableToolchainArchs "${__arch}" ) + list( APPEND __availableToolchainCompilerVersions "${__version}" ) + else() + list( REMOVE_ITEM __availableToolchains "${__toolchain}" ) + endif() + endforeach() + if( NOT __availableToolchains ) + message( FATAL_ERROR "Could not any working toolchain in the NDK. Probably your Android NDK is broken." ) + endif() +endif() + +# build list of available ABIs +if( NOT ANDROID_SUPPORTED_ABIS ) + set( ANDROID_SUPPORTED_ABIS "" ) + set( __uniqToolchainArchNames ${__availableToolchainArchs} ) + list( REMOVE_DUPLICATES __uniqToolchainArchNames ) + list( SORT __uniqToolchainArchNames ) + foreach( __arch ${__uniqToolchainArchNames} ) + list( APPEND ANDROID_SUPPORTED_ABIS ${ANDROID_SUPPORTED_ABIS_${__arch}} ) + endforeach() + unset( __uniqToolchainArchNames ) + if( NOT ANDROID_SUPPORTED_ABIS ) + message( FATAL_ERROR "No one of known Android ABIs is supported by this cmake toolchain." ) + endif() +endif() + +# choose target ABI +__INIT_VARIABLE( ANDROID_ABI OBSOLETE_ARM_TARGET OBSOLETE_ARM_TARGETS VALUES ${ANDROID_SUPPORTED_ABIS} ) +# verify that target ABI is supported +list( FIND ANDROID_SUPPORTED_ABIS "${ANDROID_ABI}" __androidAbiIdx ) +if( __androidAbiIdx EQUAL -1 ) + string( REPLACE ";" "\", \"" PRINTABLE_ANDROID_SUPPORTED_ABIS "${ANDROID_SUPPORTED_ABIS}" ) + message( FATAL_ERROR "Specified ANDROID_ABI = \"${ANDROID_ABI}\" is not supported by this cmake toolchain or your NDK/toolchain. + Supported values are: \"${PRINTABLE_ANDROID_SUPPORTED_ABIS}\" + " ) +endif() +unset( __androidAbiIdx ) + +# remember target ABI +set( ANDROID_ABI "${ANDROID_ABI}" CACHE STRING "The target ABI for Android. If arm, then armeabi-v7a is recommended for hardware floating point." FORCE ) + +# set target ABI options +if( ANDROID_ABI STREQUAL "x86" ) + set( X86 true ) + set( ANDROID_NDK_ABI_NAME "x86" ) + set( ANDROID_ARCH_NAME "x86" ) + set( ANDROID_ARCH_FULLNAME "x86" ) + set( CMAKE_SYSTEM_PROCESSOR "i686" ) +elseif( ANDROID_ABI STREQUAL "mips" ) + set( MIPS true ) + set( ANDROID_NDK_ABI_NAME "mips" ) + set( ANDROID_ARCH_NAME "mips" ) + set( ANDROID_ARCH_FULLNAME "mipsel" ) + set( CMAKE_SYSTEM_PROCESSOR "mips" ) +elseif( ANDROID_ABI STREQUAL "armeabi" ) + set( ARMEABI true ) + set( ANDROID_NDK_ABI_NAME "armeabi" ) + set( ANDROID_ARCH_NAME "arm" ) + set( ANDROID_ARCH_FULLNAME "arm" ) + set( CMAKE_SYSTEM_PROCESSOR "armv5te" ) +elseif( ANDROID_ABI STREQUAL "armeabi-v6 with VFP" ) + set( ARMEABI_V6 true ) + set( ANDROID_NDK_ABI_NAME "armeabi" ) + set( ANDROID_ARCH_NAME "arm" ) + set( ANDROID_ARCH_FULLNAME "arm" ) + set( CMAKE_SYSTEM_PROCESSOR "armv6" ) + # need always fallback to older platform + set( ARMEABI true ) +elseif( ANDROID_ABI STREQUAL "armeabi-v7a") + set( ARMEABI_V7A true ) + set( ANDROID_NDK_ABI_NAME "armeabi-v7a" ) + set( ANDROID_ARCH_NAME "arm" ) + set( ANDROID_ARCH_FULLNAME "arm" ) + set( CMAKE_SYSTEM_PROCESSOR "armv7-a" ) +elseif( ANDROID_ABI STREQUAL "armeabi-v7a with VFPV3" ) + set( ARMEABI_V7A true ) + set( ANDROID_NDK_ABI_NAME "armeabi-v7a" ) + set( ANDROID_ARCH_NAME "arm" ) + set( ANDROID_ARCH_FULLNAME "arm" ) + set( CMAKE_SYSTEM_PROCESSOR "armv7-a" ) + set( VFPV3 true ) +elseif( ANDROID_ABI STREQUAL "armeabi-v7a with NEON" ) + set( ARMEABI_V7A true ) + set( ANDROID_NDK_ABI_NAME "armeabi-v7a" ) + set( ANDROID_ARCH_NAME "arm" ) + set( ANDROID_ARCH_FULLNAME "arm" ) + set( CMAKE_SYSTEM_PROCESSOR "armv7-a" ) + set( VFPV3 true ) + set( NEON true ) +else() + message( SEND_ERROR "Unknown ANDROID_ABI=\"${ANDROID_ABI}\" is specified." ) +endif() + +if( CMAKE_BINARY_DIR AND EXISTS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake" ) + # really dirty hack + # it is not possible to change CMAKE_SYSTEM_PROCESSOR after the first run... + file( APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake" "SET(CMAKE_SYSTEM_PROCESSOR \"${CMAKE_SYSTEM_PROCESSOR}\")\n" ) +endif() + +set( ANDROID_SUPPORTED_ABIS ${ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_FULLNAME}} CACHE INTERNAL "ANDROID_ABI can be changed only to one of these ABIs. Changing to any other ABI requires to reset cmake cache." ) +if( CMAKE_VERSION VERSION_GREATER "2.8" ) + list( SORT ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_FULLNAME} ) + set_property( CACHE ANDROID_ABI PROPERTY STRINGS ${ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_FULLNAME}} ) +endif() + +if( ANDROID_ARCH_NAME STREQUAL "arm" AND NOT ARMEABI_V6 ) + __INIT_VARIABLE( ANDROID_FORCE_ARM_BUILD OBSOLETE_FORCE_ARM VALUES OFF ) + set( ANDROID_FORCE_ARM_BUILD ${ANDROID_FORCE_ARM_BUILD} CACHE BOOL "Use 32-bit ARM instructions instead of Thumb-1" FORCE ) + mark_as_advanced( ANDROID_FORCE_ARM_BUILD ) +else() + unset( ANDROID_FORCE_ARM_BUILD CACHE ) +endif() + +# choose toolchain +if( ANDROID_TOOLCHAIN_NAME ) + list( FIND __availableToolchains "${ANDROID_TOOLCHAIN_NAME}" __toolchainIdx ) + if( __toolchainIdx EQUAL -1 ) + message( FATAL_ERROR "Previously selected toolchain \"${ANDROID_TOOLCHAIN_NAME}\" is missing. You need to remove CMakeCache.txt and rerun cmake manually to change the toolchain" ) + endif() + list( GET __availableToolchainArchs ${__toolchainIdx} __toolchainArch ) + if( NOT __toolchainArch STREQUAL ANDROID_ARCH_FULLNAME ) + message( SEND_ERROR "Previously selected toolchain \"${ANDROID_TOOLCHAIN_NAME}\" is not able to compile binaries for the \"${ANDROID_ARCH_NAME}\" platform." ) + endif() +else() + set( __toolchainIdx -1 ) + set( __applicableToolchains "" ) + set( __toolchainMaxVersion "0.0.0" ) + list( LENGTH __availableToolchains __availableToolchainsCount ) + math( EXPR __availableToolchainsCount "${__availableToolchainsCount}-1" ) + foreach( __idx RANGE ${__availableToolchainsCount} ) + list( GET __availableToolchainArchs ${__idx} __toolchainArch ) + if( __toolchainArch STREQUAL ANDROID_ARCH_FULLNAME ) + list( GET __availableToolchainCompilerVersions ${__idx} __toolchainVersion ) + if( __toolchainVersion VERSION_GREATER __toolchainMaxVersion ) + set( __toolchainMaxVersion "${__toolchainVersion}" ) + set( __toolchainIdx ${__idx} ) + endif() + endif() + endforeach() + unset( __availableToolchainsCount ) + unset( __toolchainMaxVersion ) + unset( __toolchainVersion ) +endif() +unset( __toolchainArch ) +if( __toolchainIdx EQUAL -1 ) + message( FATAL_ERROR "No one of available compiler toolchains is able to compile for ${ANDROID_ARCH_NAME} platform." ) +endif() +list( GET __availableToolchains ${__toolchainIdx} ANDROID_TOOLCHAIN_NAME ) +list( GET __availableToolchainMachines ${__toolchainIdx} ANDROID_TOOLCHAIN_MACHINE_NAME ) +list( GET __availableToolchainCompilerVersions ${__toolchainIdx} ANDROID_COMPILER_VERSION ) +set( ANDROID_TOOLCHAIN_NAME "${ANDROID_TOOLCHAIN_NAME}" CACHE INTERNAL "Name of toolchain used" ) +set( ANDROID_COMPILER_VERSION "${ANDROID_COMPILER_VERSION}" CACHE INTERNAL "compiler version from selected toolchain" ) +unset( __toolchainIdx ) +unset( __availableToolchains ) +unset( __availableToolchainMachines ) +unset( __availableToolchainArchs ) +unset( __availableToolchainCompilerVersions ) + +# choose native API level +__INIT_VARIABLE( ANDROID_NATIVE_API_LEVEL ENV_ANDROID_NATIVE_API_LEVEL ANDROID_API_LEVEL ENV_ANDROID_API_LEVEL ANDROID_STANDALONE_TOOLCHAIN_API_LEVEL ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME} ANDROID_DEFAULT_NDK_API_LEVEL ) +string( REGEX MATCH "[0-9]+" ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" ) +# validate +list( FIND ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_NATIVE_API_LEVEL}" __levelIdx ) +if( __levelIdx EQUAL -1 ) + message( SEND_ERROR "Specified Android native API level (${ANDROID_NATIVE_API_LEVEL}) is not supported by your NDK/toolchain." ) +endif() +unset( __levelIdx ) +if( BUILD_WITH_ANDROID_NDK ) + __DETECT_NATIVE_API_LEVEL( __realApiLevel "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}/usr/include/android/api-level.h" ) + if( NOT __realApiLevel EQUAL ANDROID_NATIVE_API_LEVEL ) + message( SEND_ERROR "Specified Android API level (${ANDROID_NATIVE_API_LEVEL}) does not match to the level found (${__realApiLevel}). Probably your copy of NDK is broken." ) + endif() + unset( __realApiLevel ) +endif() +set( ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" CACHE STRING "Android API level for native code" FORCE ) +if( CMAKE_VERSION VERSION_GREATER "2.8" ) + list( SORT ANDROID_SUPPORTED_NATIVE_API_LEVELS ) + set_property( CACHE ANDROID_NATIVE_API_LEVEL PROPERTY STRINGS ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} ) +endif() + +# setup paths +if( BUILD_WITH_STANDALONE_TOOLCHAIN ) + set( ANDROID_TOOLCHAIN_ROOT "${ANDROID_STANDALONE_TOOLCHAIN}" ) + set( ANDROID_SYSROOT "${ANDROID_STANDALONE_TOOLCHAIN}/sysroot" ) + set( __stlLibPath "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib" ) +endif() +if( BUILD_WITH_ANDROID_NDK ) + set( ANDROID_TOOLCHAIN_ROOT "${ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN_NAME}/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}" ) + set( ANDROID_SYSROOT "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}" ) + if( ANDROID_USE_STLPORT ) + list( APPEND __stlIncludePath "${ANDROID_NDK}/sources/android/support/include" ) + list( APPEND __stlIncludePath "${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include" ) + set( __stlLibPath "${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${ANDROID_NDK_ABI_NAME}" ) + else() + if( EXISTS "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}" ) + set( __stlIncludePath "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}/include" ) + set( __stlLibPath "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}/libs/${ANDROID_NDK_ABI_NAME}" ) + else() + set( __stlIncludePath "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/include" ) + set( __stlLibPath "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/libs/${ANDROID_NDK_ABI_NAME}" ) + endif() + endif() +endif() + +# specify the cross compiler +set( CMAKE_C_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}" CACHE PATH "gcc" ) +set( CMAKE_CXX_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-g++${TOOL_OS_SUFFIX}" CACHE PATH "g++" ) +set( CMAKE_ASM_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}" CACHE PATH "Assembler" ) +if( CMAKE_VERSION VERSION_LESS 2.8.5 ) + set( CMAKE_ASM_COMPILER_ARG1 "-c" ) +endif() +# there may be a way to make cmake deduce these TODO deduce the rest of the tools +set( CMAKE_STRIP "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-strip${TOOL_OS_SUFFIX}" CACHE PATH "strip" ) +set( CMAKE_AR "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ar${TOOL_OS_SUFFIX}" CACHE PATH "archive" ) +set( CMAKE_LINKER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ld${TOOL_OS_SUFFIX}" CACHE PATH "linker" ) +set( CMAKE_NM "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-nm${TOOL_OS_SUFFIX}" CACHE PATH "nm" ) +set( CMAKE_OBJCOPY "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objcopy${TOOL_OS_SUFFIX}" CACHE PATH "objcopy" ) +set( CMAKE_OBJDUMP "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objdump${TOOL_OS_SUFFIX}" CACHE PATH "objdump" ) +set( CMAKE_RANLIB "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ranlib${TOOL_OS_SUFFIX}" CACHE PATH "ranlib" ) +set( _CMAKE_TOOLCHAIN_PREFIX "${ANDROID_TOOLCHAIN_MACHINE_NAME}-" ) +if( APPLE ) + find_program( CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool ) + if( NOT CMAKE_INSTALL_NAME_TOOL ) + message( FATAL_ERROR "Could not find install_name_tool, please check your installation." ) + endif() + mark_as_advanced( CMAKE_INSTALL_NAME_TOOL ) +endif() + +# export directories +set( ANDROID_SYSTEM_INCLUDE_DIRS "" ) +set( ANDROID_SYSTEM_LIB_DIRS "" ) + +# setup output directories +set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_SOURCE_DIR} CACHE PATH "root for library output, set this to change where android libs are installed to" ) +set( CMAKE_INSTALL_PREFIX "${ANDROID_TOOLCHAIN_ROOT}/user" CACHE STRING "path for installing" ) + +if(NOT _CMAKE_IN_TRY_COMPILE) + if( EXISTS "${CMAKE_SOURCE_DIR}/jni/CMakeLists.txt" ) + set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_ABI_NAME}" CACHE PATH "Output directory for applications" ) + else() + set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin" CACHE PATH "Output directory for applications" ) + endif() + set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}" CACHE PATH "path for android libs" ) +endif() + +# includes +if( __stlIncludePath ) + list( APPEND ANDROID_SYSTEM_INCLUDE_DIRS "${__stlIncludePath}" ) +endif() + +# c++ bits includes +if( __stlLibPath AND EXISTS "${__stlLibPath}/include" ) + list( APPEND ANDROID_SYSTEM_INCLUDE_DIRS "${__stlLibPath}/include" ) +endif() +if( ANDROID_ARCH_NAME STREQUAL "arm" AND EXISTS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}/thumb/bits" ) + list( APPEND ANDROID_SYSTEM_INCLUDE_DIRS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}/thumb" ) +elseif( EXISTS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}/bits" ) + list( APPEND ANDROID_SYSTEM_INCLUDE_DIRS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}" ) +elseif( ANDROID_ARCH_NAME STREQUAL "arm" AND EXISTS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/thumb/bits" ) + list( APPEND ANDROID_SYSTEM_INCLUDE_DIRS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/thumb" ) +elseif( EXISTS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/bits" ) + list( APPEND ANDROID_SYSTEM_INCLUDE_DIRS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" ) +endif() + +# flags and definitions +if(ANDROID_SYSROOT MATCHES "[ ;\"]") + set( ANDROID_CXX_FLAGS "--sysroot=\"${ANDROID_SYSROOT}\"" ) + # quotes will break try_compile and compiler identification + message(WARNING "Your Android system root has non-alphanumeric symbols. It can break compiler features detection and the whole build.") +else() + set( ANDROID_CXX_FLAGS "--sysroot=${ANDROID_SYSROOT}" ) +endif() + +remove_definitions( -DANDROID ) +add_definitions( -DANDROID ) + +# Force set compilers because standard identification works badly for us +include( CMakeForceCompiler ) +CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU ) +set( CMAKE_C_PLATFORM_ID Linux ) +set( CMAKE_C_SIZEOF_DATA_PTR 4 ) +set( CMAKE_C_HAS_ISYSROOT 1 ) +set( CMAKE_C_COMPILER_ABI ELF ) +CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU ) +set( CMAKE_CXX_PLATFORM_ID Linux ) +set( CMAKE_CXX_SIZEOF_DATA_PTR 4 ) +set( CMAKE_CXX_HAS_ISYSROOT 1 ) +set( CMAKE_CXX_COMPILER_ABI ELF ) +# force ASM compiler (required for CMake < 2.8.5) +set( CMAKE_ASM_COMPILER_ID_RUN TRUE ) +set( CMAKE_ASM_COMPILER_ID GNU ) +set( CMAKE_ASM_COMPILER_WORKS TRUE ) +set( CMAKE_ASM_COMPILER_FORCED TRUE ) +set( CMAKE_COMPILER_IS_GNUASM 1) + +# NDK flags +if( ARMEABI OR ARMEABI_V7A ) + # NDK also defines -ffunction-sections -funwind-tables but they result in worse OpenCV performance + set( _CMAKE_CXX_FLAGS "-fPIC -Wno-psabi" ) + set( _CMAKE_C_FLAGS "-fPIC -Wno-psabi" ) + remove_definitions( -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ ) + add_definitions( -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ ) + # extra arm-specific flags + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fsigned-char" ) +elseif( X86 ) + set( _CMAKE_CXX_FLAGS "-funwind-tables" ) + set( _CMAKE_C_FLAGS "-funwind-tables" ) +elseif( MIPS ) + set( _CMAKE_CXX_FLAGS "-fpic -Wno-psabi -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers" ) + set( _CMAKE_CXX_FLAGS "-fpic -Wno-psabi -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers" ) + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fsigned-char" ) +else() + set( _CMAKE_CXX_FLAGS "" ) + set( _CMAKE_C_FLAGS "" ) +endif() + +if( ANDROID_USE_STLPORT ) + set( _CMAKE_CXX_FLAGS "${_CMAKE_CXX_FLAGS} -frtti -fno-exceptions" ) + set( _CMAKE_C_FLAGS "${_CMAKE_C_FLAGS} -fno-exceptions" ) +else() + set( _CMAKE_CXX_FLAGS "${_CMAKE_CXX_FLAGS} -frtti -fexceptions" ) + set( _CMAKE_C_FLAGS "${_CMAKE_C_FLAGS} -fexceptions" ) +endif() + +# release and debug flags +if( ARMEABI OR ARMEABI_V7A ) + if( NOT ANDROID_FORCE_ARM_BUILD AND NOT ARMEABI_V6 ) + # It is recommended to use the -mthumb compiler flag to force the generation + # of 16-bit Thumb-1 instructions (the default being 32-bit ARM ones). + # O3 instead of O2/Os in release mode - like cmake sets for desktop gcc + set( _CMAKE_CXX_FLAGS_RELEASE "-mthumb -O3" ) + set( _CMAKE_C_FLAGS_RELEASE "-mthumb -O3" ) + set( _CMAKE_CXX_FLAGS_DEBUG "-marm -Os -finline-limit=64" ) + set( _CMAKE_C_FLAGS_DEBUG "-marm -Os -finline-limit=64" ) + else() + # always compile ARMEABI_V6 in arm mode; otherwise there is no difference from ARMEABI + # O3 instead of O2/Os in release mode - like cmake sets for desktop gcc + set( _CMAKE_CXX_FLAGS_RELEASE "-marm -O3 -fstrict-aliasing" ) + set( _CMAKE_C_FLAGS_RELEASE "-marm -O3 -fstrict-aliasing" ) + set( _CMAKE_CXX_FLAGS_DEBUG "-marm -O0 -finline-limit=300" ) + set( _CMAKE_C_FLAGS_DEBUG "-marm -O0 -finline-limit=300" ) + endif() +elseif( X86 ) + set( _CMAKE_CXX_FLAGS_RELEASE "-O3 -fstrict-aliasing" ) + set( _CMAKE_C_FLAGS_RELEASE "-O3 -fstrict-aliasing" ) + set( _CMAKE_CXX_FLAGS_DEBUG "-O0 -finline-limit=300" ) + set( _CMAKE_C_FLAGS_DEBUG "-O0 -finline-limit=300" ) +elseif( MIPS ) + set( _CMAKE_CXX_FLAGS_RELEASE "-O3 -funswitch-loops -finline-limit=300" ) + set( _CMAKE_C_FLAGS_RELEASE "-O3 -funswitch-loops -finline-limit=300" ) + set( _CMAKE_CXX_FLAGS_DEBUG "-O0 -g" ) + set( _CMAKE_C_FLAGS_DEBUG "-O0 -g" ) +endif() +set( _CMAKE_CXX_FLAGS_RELEASE "${_CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer -DNDEBUG" ) +set( _CMAKE_C_FLAGS_RELEASE "${_CMAKE_C_FLAGS_RELEASE} -fomit-frame-pointer -DNDEBUG" ) +set( _CMAKE_CXX_FLAGS_DEBUG "${_CMAKE_CXX_FLAGS_DEBUG} -fno-strict-aliasing -fno-omit-frame-pointer -DDEBUG -D_DEBUG" ) +set( _CMAKE_C_FLAGS_DEBUG "${_CMAKE_C_FLAGS_DEBUG} -fno-strict-aliasing -fno-omit-frame-pointer -DDEBUG -D_DEBUG" ) + +# ABI-specific flags +if( ARMEABI_V7A ) + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv7-a -mfloat-abi=softfp" ) + if( NEON ) + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=neon" ) + elseif( VFPV3 ) + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=vfpv3-d16" ) + else() + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=vfpv3-d16" ) + endif() +elseif( ARMEABI_V6 ) + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv6 -mfloat-abi=softfp -mfpu=vfp" ) +elseif( ARMEABI ) + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv5te -mtune=xscale -msoft-float" ) +elseif( X86 ) + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS}" )#sse? +endif() + +# linker flags +if( NOT DEFINED __ndklibspath ) + set( __ndklibspath "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/ndklibs/${ANDROID_NDK_ABI_NAME}" ) +endif() +list( APPEND ANDROID_SYSTEM_LIB_DIRS "${CMAKE_INSTALL_PREFIX}/libs/${ANDROID_NDK_ABI_NAME}" ) +set( ANDROID_LINKER_FLAGS "" ) + +# STL +if( ANDROID_USE_STLPORT ) + if( EXISTS "${__stlLibPath}/libc++_shared.so" ) + set( CMAKE_CXX_CREATE_SHARED_LIBRARY " -o \"${__stlLibPath}/libc++_shared.so\" -latomic") + set( CMAKE_CXX_CREATE_SHARED_MODULE " -o \"${__stlLibPath}/libc++_shared.so\" -latomic") + endif() +else( ANDROID_USE_STLPORT ) + if( EXISTS "${__stlLibPath}/libgnustl_static.a" ) + __COPY_IF_DIFFERENT( "${__stlLibPath}/libgnustl_static.a" "${__ndklibspath}/libstdc++.a" ) + elseif( ANDROID_ARCH_NAME STREQUAL "arm" AND EXISTS "${__stlLibPath}/${CMAKE_SYSTEM_PROCESSOR}/thumb/libstdc++.a" ) + __COPY_IF_DIFFERENT( "${__stlLibPath}/${CMAKE_SYSTEM_PROCESSOR}/thumb/libstdc++.a" "${__ndklibspath}/libstdc++.a" ) + elseif( ANDROID_ARCH_NAME STREQUAL "arm" AND EXISTS "${__stlLibPath}/${CMAKE_SYSTEM_PROCESSOR}/libstdc++.a" ) + __COPY_IF_DIFFERENT( "${__stlLibPath}/${CMAKE_SYSTEM_PROCESSOR}/libstdc++.a" "${__ndklibspath}/libstdc++.a" ) + elseif( ANDROID_ARCH_NAME STREQUAL "arm" AND EXISTS "${__stlLibPath}/thumb/libstdc++.a" ) + __COPY_IF_DIFFERENT( "${__stlLibPath}/thumb/libstdc++.a" "${__ndklibspath}/libstdc++.a" ) + elseif( EXISTS "${__stlLibPath}/libstdc++.a" ) + __COPY_IF_DIFFERENT( "${__stlLibPath}/libstdc++.a" "${__ndklibspath}/libstdc++.a" ) + endif() + if( EXISTS "${__stlLibPath}/libsupc++.a" ) + __COPY_IF_DIFFERENT( "${__stlLibPath}/libsupc++.a" "${__ndklibspath}/libsupc++.a" ) + elseif( ANDROID_ARCH_NAME STREQUAL "arm" AND EXISTS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libsupc++.a" ) + __COPY_IF_DIFFERENT( "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libsupc++.a" "${__ndklibspath}/libsupc++.a" ) + elseif( ANDROID_ARCH_NAME STREQUAL "arm" AND EXISTS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libsupc++.a" ) + __COPY_IF_DIFFERENT( "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libsupc++.a" "${__ndklibspath}/libsupc++.a" ) + elseif( ANDROID_ARCH_NAME STREQUAL "arm" AND EXISTS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libsupc++.a" ) + __COPY_IF_DIFFERENT( "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libsupc++.a" "${__ndklibspath}/libsupc++.a" ) + elseif( EXISTS "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libsupc++.a" ) + __COPY_IF_DIFFERENT( "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libsupc++.a" "${__ndklibspath}/libsupc++.a" ) + endif() + list( APPEND ANDROID_SYSTEM_LIB_DIRS "${__ndklibspath}" ) +endif( ANDROID_USE_STLPORT ) + +# cleanup for STL search +unset( __stlIncludePath ) +unset( __stlLibPath ) + +# other linker flags +__INIT_VARIABLE( ANDROID_NO_UNDEFINED OBSOLETE_NO_UNDEFINED VALUES ON ) +set( ANDROID_NO_UNDEFINED ${ANDROID_NO_UNDEFINED} CACHE BOOL "Show all undefined symbols as linker errors" FORCE ) +mark_as_advanced( ANDROID_NO_UNDEFINED ) +if( ANDROID_NO_UNDEFINED ) + set( ANDROID_LINKER_FLAGS "-Wl,--no-undefined ${ANDROID_LINKER_FLAGS}" ) +endif() + +if (ANDROID_NDK MATCHES "-r[56].?$") + # libGLESv2.so in NDK's prior to r7 refers to exteranal symbols. So this flag option is required for all projects using OpenGL from native. + __INIT_VARIABLE( ANDROID_SO_UNDEFINED VALUES ON ) +else() + __INIT_VARIABLE( ANDROID_SO_UNDEFINED VALUES OFF ) +endif() + +set( ANDROID_SO_UNDEFINED ${ANDROID_SO_UNDEFINED} CACHE BOOL "Allows or disallows undefined symbols in shared libraries" FORCE ) +mark_as_advanced( ANDROID_SO_UNDEFINED ) +if( ANDROID_SO_UNDEFINED ) + set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,-allow-shlib-undefined" ) +endif() + +__INIT_VARIABLE( ANDROID_FUNCTION_LEVEL_LINKING VALUES ON ) +set( ANDROID_FUNCTION_LEVEL_LINKING ON CACHE BOOL "Allows or disallows undefined symbols in shared libraries" FORCE ) +mark_as_advanced( ANDROID_FUNCTION_LEVEL_LINKING ) +if( ANDROID_FUNCTION_LEVEL_LINKING ) + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fdata-sections -ffunction-sections" ) + set( ANDROID_LINKER_FLAGS "-Wl,--gc-sections ${ANDROID_LINKER_FLAGS}" ) +endif() + +if( ARMEABI_V7A ) + # this is *required* to use the following linker flags that routes around + # a CPU bug in some Cortex-A8 implementations: + set( ANDROID_LINKER_FLAGS "-Wl,--fix-cortex-a8 ${ANDROID_LINKER_FLAGS}" ) +endif() + +# cache flags +set( CMAKE_CXX_FLAGS "${_CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags" ) +set( CMAKE_C_FLAGS "${_CMAKE_C_FLAGS}" CACHE STRING "c flags" ) +set( CMAKE_CXX_FLAGS_RELEASE "${_CMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "c++ Release flags" ) +set( CMAKE_C_FLAGS_RELEASE "${_CMAKE_C_FLAGS_RELEASE}" CACHE STRING "c Release flags" ) +set( CMAKE_CXX_FLAGS_DEBUG "${_CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING "c++ Debug flags" ) +set( CMAKE_C_FLAGS_DEBUG "${_CMAKE_C_FLAGS_DEBUG}" CACHE STRING "c Debug flags" ) +set( CMAKE_SHARED_LINKER_FLAGS "" CACHE STRING "linker flags" ) +set( CMAKE_MODULE_LINKER_FLAGS "" CACHE STRING "linker flags" ) +set( CMAKE_EXE_LINKER_FLAGS "-Wl,-z,nocopyreloc" CACHE STRING "linker flags" ) + +include_directories( SYSTEM ${ANDROID_SYSTEM_INCLUDE_DIRS} ) +link_directories( ${ANDROID_SYSTEM_LIB_DIRS} ) + +# finish flags +set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS}" CACHE INTERNAL "Extra Android compiler flags") +set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS}" CACHE INTERNAL "Extra Android linker flags") +set( CMAKE_CXX_FLAGS "${ANDROID_CXX_FLAGS} ${CMAKE_CXX_FLAGS}" ) +set( CMAKE_C_FLAGS "${ANDROID_CXX_FLAGS} ${CMAKE_C_FLAGS}" ) +if( MIPS AND BUILD_WITH_ANDROID_NDK ) + set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN_NAME}/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}/mipsel-linux-android/lib/ldscripts/elf32btsmip.xsc ${ANDROID_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}" ) + set( CMAKE_MODULE_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN_NAME}/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}/mipsel-linux-android/lib/ldscripts/elf32btsmip.xsc ${ANDROID_LINKER_FLAGS} ${CMAKE_MODULE_LINKER_FLAGS}" ) + set( CMAKE_EXE_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN_NAME}/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}/mipsel-linux-android/lib/ldscripts/elf32btsmip.x ${ANDROID_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}" ) + # todo: should we use elf64btsmip.xsc on x64 host platforms ? + #set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN_NAME}/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}/mipsel-linux-android/lib/ldscripts/elf64btsmip.xsc ${ANDROID_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}" ) + #set( CMAKE_MODULE_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN_NAME}/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}/mipsel-linux-android/lib/ldscripts/elf64btsmip.xsc ${ANDROID_LINKER_FLAGS} ${CMAKE_MODULE_LINKER_FLAGS}" ) + #set( CMAKE_EXE_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN_NAME}/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}/mipsel-linux-android/lib/ldscripts/elf64btsmip.x ${ANDROID_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}" ) +else() + set( CMAKE_SHARED_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}" ) + set( CMAKE_MODULE_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} ${CMAKE_MODULE_LINKER_FLAGS}" ) + set( CMAKE_EXE_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}" ) +endif() + +# set these global flags for cmake client scripts to change behavior +set( ANDROID True ) +set( BUILD_ANDROID True ) + +# where is the target environment +set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" ) + +# only search for libraries and includes in the ndk toolchain +set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY ) +set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) +set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) + + +# macro to find packages on the host OS +macro( find_host_package ) + set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) + set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER ) + set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER ) + if( CMAKE_HOST_WIN32 ) + SET( WIN32 1 ) + SET( UNIX ) + elseif( CMAKE_HOST_APPLE ) + SET( APPLE 1 ) + SET( UNIX ) + endif() + find_package( ${ARGN} ) + SET( WIN32 ) + SET( APPLE ) + SET( UNIX 1 ) + set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY ) + set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) + set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) +endmacro() + + +# macro to find programs on the host OS +macro( find_host_program ) + set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) + set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER ) + set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER ) + if( CMAKE_HOST_WIN32 ) + SET( WIN32 1 ) + SET( UNIX ) + elseif( CMAKE_HOST_APPLE ) + SET( APPLE 1 ) + SET( UNIX ) + endif() + find_program( ${ARGN} ) + SET( WIN32 ) + SET( APPLE ) + SET( UNIX 1 ) + set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY ) + set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) + set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) +endmacro() + + +macro( ANDROID_GET_ABI_RAWNAME TOOLCHAIN_FLAG VAR ) + if( "${TOOLCHAIN_FLAG}" STREQUAL "ARMEABI" ) + set( ${VAR} "armeabi" ) + elseif( "${TOOLCHAIN_FLAG}" STREQUAL "ARMEABI_V7A" ) + set( ${VAR} "armeabi-v7a" ) + elseif( "${TOOLCHAIN_FLAG}" STREQUAL "X86" ) + set( ${VAR} "x86" ) + else() + set( ${VAR} "unknown" ) + endif() +endmacro() + + +# export toolchain settings for the try_compile() command +if( NOT PROJECT_NAME STREQUAL "CMAKE_TRY_COMPILE" ) + set( __toolchain_config "") + foreach( __var ANDROID_ABI ANDROID_FORCE_ARM_BUILD ANDROID_NATIVE_API_LEVEL ANDROID_NO_UNDEFINED ANDROID_SO_UNDEFINED ANDROID_SET_OBSOLETE_VARIABLES LIBRARY_OUTPUT_PATH_ROOT ANDROID_USE_STLPORT ANDROID_FORBID_SYGWIN ANDROID_NDK ANDROID_STANDALONE_TOOLCHAIN ANDROID_FUNCTION_LEVEL_LINKING __ndklibspath ) + if( DEFINED ${__var} ) + if( "${__var}" MATCHES " ") + set( __toolchain_config "${__toolchain_config}set( ${__var} \"${${__var}}\" CACHE INTERNAL \"\" )\n" ) + else() + set( __toolchain_config "${__toolchain_config}set( ${__var} ${${__var}} CACHE INTERNAL \"\" )\n" ) + endif() + endif() + endforeach() + file( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/android.toolchain.config.cmake" "${__toolchain_config}" ) + unset( __toolchain_config ) + unset( __ndklibspath ) +endif() + + +# set some obsolete variables for backward compatibility +set( ANDROID_SET_OBSOLETE_VARIABLES ON CACHE BOOL "Define obsolete Andrid-specific cmake variables" ) +mark_as_advanced( ANDROID_SET_OBSOLETE_VARIABLES ) +if( ANDROID_SET_OBSOLETE_VARIABLES ) + set( ANDROID_API_LEVEL ${ANDROID_NATIVE_API_LEVEL} ) + set( ARM_TARGET "${ANDROID_ABI}" ) + set( ARMEABI_NDK_NAME "${ANDROID_NDK_ABI_NAME}" ) +endif() + +# don't leave libs/ directories in source directory +set(LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_LIBRARY_DIR}) + +# Variables controlling behavior or set by cmake toolchain: +# ANDROID_ABI: "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips" +# ANDROID_NATIVE_API_LEVEL: 3,4,5,8,9,14 (depends on NDK version) +# ANDROID_SET_OBSOLETE_VARIABLES: ON/OFF +# ANDROID_USE_STLPORT: OFF/ON - EXPERIMENTAL!!! +# ANDROID_FORBID_SYGWIN: ON/OFF +# ANDROID_NO_UNDEFINED: ON/OFF +# ANDROID_SO_UNDEFINED: OFF/ON (default depends on NDK version) +# ANDROID_FUNCTION_LEVEL_LINKING: ON/OFF +# Variables that takes effect only at first run: +# ANDROID_FORCE_ARM_BUILD: ON/OFF +# LIBRARY_OUTPUT_PATH_ROOT: +# Can be set only at the first run: +# ANDROID_NDK +# ANDROID_STANDALONE_TOOLCHAIN +# ANDROID_TOOLCHAIN_NAME: "arm-linux-androideabi-4.4.3" or "arm-linux-androideabi-4.6" or "mipsel-linux-android-4.4.3" or "mipsel-linux-android-4.6" or "x86-4.4.3" or "x86-4.6" +# Obsolete: +# ANDROID_API_LEVEL: superseded by ANDROID_NATIVE_API_LEVEL +# ARM_TARGET: superseded by ANDROID_ABI +# ARM_TARGETS: superseded by ANDROID_ABI (can be set only) +# ANDROID_NDK_TOOLCHAIN_ROOT: superseded by ANDROID_STANDALONE_TOOLCHAIN (can be set only) +# ANDROID_LEVEL: superseded by ANDROID_NATIVE_API_LEVEL (completely removed) +# +# Primary read-only variables: +# ANDROID: always TRUE +# ARMEABI: TRUE for arm v6 and older devices +# ARMEABI_V6: TRUE for arm v6 +# ARMEABI_V7A: TRUE for arm v7a +# NEON: TRUE if NEON unit is enabled +# VFPV3: TRUE if VFP version 3 is enabled +# X86: TRUE if configured for x86 +# BUILD_ANDROID: always TRUE +# BUILD_WITH_ANDROID_NDK: TRUE if NDK is used +# BUILD_WITH_STANDALONE_TOOLCHAIN: TRUE if standalone toolchain is used +# ANDROID_NDK_HOST_SYSTEM_NAME: "windows", "linux-x86" or "darwin-x86" depending on host platform +# ANDROID_NDK_HOST_SYSTEM_ARCH: "x86", "x64" depending on host platform +# ANDROID_NDK_ABI_NAME: "armeabi", "armeabi-v7a" or "x86" depending on ANDROID_ABI +# ANDROID_ARCH_NAME: "arm" or "x86" or "mips" depending on ANDROID_ABI +# TOOL_OS_SUFFIX: "" or ".exe" depending on host platform +# ANDROID_SYSROOT: path to the compiler sysroot +# ANDROID_SYSTEM_INCLUDE_DIRS +# ANDROID_SYSTEM_LIB_DIRS +# Obsolete: +# ARMEABI_NDK_NAME: superseded by ANDROID_NDK_ABI_NAME +# +# Secondary (less stable) read-only variables: +# ANDROID_COMPILER_VERSION: GCC version used +# ANDROID_CXX_FLAGS: C/C++ compiler flags required by Android platform +# ANDROID_SUPPORTED_ABIS: list of currently allowed values for ANDROID_ABI +# ANDROID_TOOLCHAIN_MACHINE_NAME: "arm-linux-androideabi", "arm-eabi" or "i686-android-linux" +# ANDROID_TOOLCHAIN_ROOT: path to the top level of toolchain (standalone or placed inside NDK) +# ANDROID_SUPPORTED_NATIVE_API_LEVELS: list of native API levels found inside NDK +# +# Defaults: +# ANDROID_DEFAULT_NDK_API_LEVEL +# ANDROID_DEFAULT_NDK_API_LEVEL_${ARCH} +# ANDROID_NDK_SEARCH_PATHS +# ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH +# ANDROID_SUPPORTED_ABIS_${ARCH} +# ANDROID_SUPPORTED_NDK_VERSIONS diff --git a/cmake/toolchains/iOS.toolchain.cmake b/cmake/toolchains/iOS.toolchain.cmake deleted file mode 100644 index c697857f..00000000 --- a/cmake/toolchains/iOS.toolchain.cmake +++ /dev/null @@ -1,188 +0,0 @@ -# Copyright (c) 2016, Bogdan Cristea -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# This file is based off of the Platform/Darwin.cmake and Platform/UnixPaths.cmake -# files which are included with CMake 2.8.4 -# It has been altered for iOS development - -# Options: -# -# IOS_PLATFORM = OS (default) or SIMULATOR -# This decides if SDKS will be selected from the iPhoneOS.platform or iPhoneSimulator.platform folders -# OS - the default, used to build for iPhone and iPad physical devices, which have an arm arch. -# SIMULATOR - used to build for the Simulator platforms, which have an x86_64 arch. -# -# IOS_DEVELOPER_ROOT = automatic(default) or /path/to/platform/Developer folder -# By default this location is automatcially chosen based on the IOS_PLATFORM value above. -# If set manually, it will override the default location and force the user of a particular Developer Platform -# -# IOS_SDK_ROOT = automatic(default) or /path/to/platform/Developer/SDKs/SDK folder -# By default this location is automatcially chosen based on the IOS_DEVELOPER_ROOT value. -# In this case it will always be the most up-to-date SDK found in the IOS_DEVELOPER_ROOT path. -# If set manually, this will force the use of a specific SDK version - -# Macros: -# -# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE) -# A convenience macro for setting xcode specific properties on targets -# example: set_xcode_property (myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1") -# -# find_host_package (PROGRAM ARGS) -# A macro used to find executable programs on the host system, not within the iOS environment. -# Thanks to the android-cmake project for providing the command - -# Standard settings -set (CMAKE_SYSTEM_NAME Darwin) -set (CMAKE_SYSTEM_VERSION 1) -set (UNIX True) -set (APPLE True) -set (IOS True) - -# Required as of cmake 2.8.10 -set (CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE) - -# Determine the cmake host system version so we know where to find the iOS SDKs -find_program (CMAKE_UNAME uname /bin /usr/bin /usr/local/bin) -if (CMAKE_UNAME) - exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION) - string (REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}") -endif (CMAKE_UNAME) - -set(CMAKE_C_COMPILER /usr/bin/clang CACHE FILEPATH "" FORCE) -set(CMAKE_CXX_COMPILER /usr/bin/clang++ CACHE FILEPATH "" FORCE) -set(CMAKE_AR ar CACHE FILEPATH "" FORCE) - -# Skip the platform compiler checks for cross compiling -set (CMAKE_CXX_COMPILER_WORKS TRUE) -set (CMAKE_C_COMPILER_WORKS TRUE) - -# All iOS/Darwin specific settings - some may be redundant -set (CMAKE_SHARED_LIBRARY_PREFIX "lib") -set (CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") -set (CMAKE_SHARED_MODULE_PREFIX "lib") -set (CMAKE_SHARED_MODULE_SUFFIX ".so") -set (CMAKE_MODULE_EXISTS 1) -set (CMAKE_DL_LIBS "") - -set (CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") -set (CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ") -set (CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}") -set (CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}") - -# Hidden visibilty is required for cxx on iOS -set (CMAKE_C_FLAGS_INIT "") -set (CMAKE_CXX_FLAGS_INIT "-fvisibility=hidden -fvisibility-inlines-hidden") - -set (CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}") -set (CMAKE_CXX_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}") - -set (CMAKE_PLATFORM_HAS_INSTALLNAME 1) -set (CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names") -set (CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names") -set (CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,") -set (CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,") -set (CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a") - -# hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old build tree -# (where install_name_tool was hardcoded) and where CMAKE_INSTALL_NAME_TOOL isn't in the cache -# and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun) -# hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex -if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL) - find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool) -endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL) - -# Setup iOS platform unless specified manually with IOS_PLATFORM -if (NOT DEFINED IOS_PLATFORM) - set (IOS_PLATFORM "OS") -endif (NOT DEFINED IOS_PLATFORM) -set (IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform: OS or SIMULATOR") - -# Check the platform selection and setup for developer root -if (IOS_PLATFORM STREQUAL OS) - set (IOS_PLATFORM_LOCATION "iPhoneOS.platform") - - # This causes the installers to properly locate the output libraries - set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos") -elseif (IOS_PLATFORM STREQUAL SIMULATOR) - set (IOS_PLATFORM_LOCATION "iPhoneSimulator.platform") - - # This causes the installers to properly locate the output libraries - set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator") -else () - message (FATAL_ERROR "Unsupported IOS_PLATFORM value '${IOS_PLATFORM}' selected. Please choose OS or SIMULATOR") -endif () - -# Setup iOS developer location unless specified manually with IOS_DEVELOPER_ROOT -exec_program(/usr/bin/xcode-select ARGS -print-path OUTPUT_VARIABLE XCODE_DEVELOPER_DIR) -set (IOS_DEVELOPER_ROOT "${XCODE_DEVELOPER_DIR}/Platforms/${IOS_PLATFORM_LOCATION}/Developer" CACHE PATH "Location of iOS Platform") - -# Find and use the most recent iOS sdk unless specified manually with IOS_SDK_ROOT -if (NOT DEFINED IOS_SDK_ROOT) - file (GLOB _IOS_SDKS "${IOS_DEVELOPER_ROOT}/SDKs/*") - if (_IOS_SDKS) - list (SORT _IOS_SDKS) - list (REVERSE _IOS_SDKS) - list (GET _IOS_SDKS 0 IOS_SDK_ROOT) - else (_IOS_SDKS) - message (FATAL_ERROR "No iOS SDK's found in default search path ${IOS_DEVELOPER_ROOT}. Manually set IOS_SDK_ROOT or install the iOS SDK.") - endif (_IOS_SDKS) - message (STATUS "Toolchain using default iOS SDK: ${IOS_SDK_ROOT}") -endif (NOT DEFINED IOS_SDK_ROOT) -set (IOS_SDK_ROOT ${IOS_SDK_ROOT} CACHE PATH "Location of the selected iOS SDK") - -# Set the sysroot default to the most recent SDK -set (CMAKE_OSX_SYSROOT ${IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS support") - -# set the architecture for iOS -if (${IOS_PLATFORM} STREQUAL OS) - set (OSX_UNIVERSAL true) - set (IOS_ARCH arm64) -elseif (${IOS_PLATFORM} STREQUAL SIMULATOR) - set (IOS_ARCH x86_64) -endif (${IOS_PLATFORM} STREQUAL OS) - -set (CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE STRING "Build architecture for iOS" FORCE) - -# Set the find root to the iOS developer roots and to user defined paths -set (CMAKE_FIND_ROOT_PATH ${IOS_DEVELOPER_ROOT} ${IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} CACHE STRING "iOS find search path root") - -# default to searching for frameworks first -set (CMAKE_FIND_FRAMEWORK FIRST) - -# set up the default search directories for frameworks -set (CMAKE_SYSTEM_FRAMEWORK_PATH - ${IOS_SDK_ROOT}/System/Library/Frameworks - ${IOS_SDK_ROOT}/System/Library/PrivateFrameworks - ${IOS_SDK_ROOT}/Developer/Library/Frameworks -) - -# only search the iOS sdks, not the remainder of the host filesystem -set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) -set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - - -# This macro lets you find executable programs on the host system -macro (find_host_package) - set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) - set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) - set (IOS FALSE) - - find_package(${ARGN}) - - set (IOS TRUE) - set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) - set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -endmacro (find_host_package) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index d67f9062..2fa5dae2 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -2,14 +2,14 @@ # find doxygen if(SFML_OS_MACOSX) # Add some path to search doxygen in more directories. - set(ADDITIONAL_PATHS - /Developer/Applications/Doxygen.app/Contents/Resources - /Developer/Applications/Doxygen.app/Contents/MacOS - $ENV{HOME}/Applications/Doxygen.app/Contents/Resources - $ENV{HOME}/Applications/Doxygen.app/Contents/MacOS - $ENV{HOME}/Applications/Developer/Doxygen.app/Contents/Resources + set(ADDITIONAL_PATHS + /Developer/Applications/Doxygen.app/Contents/Resources + /Developer/Applications/Doxygen.app/Contents/MacOS + $ENV{HOME}/Applications/Doxygen.app/Contents/Resources + $ENV{HOME}/Applications/Doxygen.app/Contents/MacOS + $ENV{HOME}/Applications/Developer/Doxygen.app/Contents/Resources $ENV{HOME}/Applications/Developer/Doxygen.app/Contents/MacOS) - + set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${ADDITIONAL_PATHS}) endif() @@ -24,7 +24,7 @@ if(SFML_OS_WINDOWS) # if HHC is found, we can generate the CHM (compressed HTML) output find_program(DOXYGEN_HHC_PROGRAM NAMES hhc.exe - PATHS "C:/Program Files/HTML Help Workshop" "C:/Program Files (x86)/HTML Help Workshop" + PATHS "c:/Program Files/HTML Help Workshop" DOC "HTML Help Compiler program") if(DOXYGEN_HHC_PROGRAM) set(DOXYGEN_GENERATE_HTMLHELP YES) @@ -39,7 +39,6 @@ endif() # configure the source Doxyfile by copying it and replacing all @variables@ set(DOXYGEN_CONFIGURED_INPUT ${DOXYGEN_OUTPUT_DIR}/doxyfile) configure_file(${DOXYGEN_INPUT_DIR}/doc/doxyfile.in ${DOXYGEN_CONFIGURED_INPUT} @ONLY) -configure_file(${DOXYGEN_INPUT_DIR}/doc/header.html.in ${DOXYGEN_OUTPUT_DIR}/header.html @ONLY) # copy the files needed by the documentation configure_file(${DOXYGEN_INPUT_DIR}/doc/doxygen.css ${DOXYGEN_OUTPUT_DIR}/html/doxygen.css COPYONLY) @@ -52,14 +51,11 @@ add_custom_target(doc ALL WORKING_DIRECTORY ${DOXYGEN_INPUT_DIR}) # setup install rules -install(FILES ${DOXYGEN_OUTPUT_DIR}/SFML.tag - DESTINATION ${CMAKE_INSTALL_DOCDIR} - COMPONENT doc) install(DIRECTORY ${DOXYGEN_OUTPUT_DIR}/html - DESTINATION ${CMAKE_INSTALL_DOCDIR} + DESTINATION ${INSTALL_MISC_DIR}/doc COMPONENT doc) if(DOXYGEN_HHC_PROGRAM) install(FILES ${DOXYGEN_OUTPUT_DIR}/sfml.chm - DESTINATION ${CMAKE_INSTALL_DOCDIR} + DESTINATION ${INSTALL_MISC_DIR}/doc COMPONENT doc) endif() diff --git a/doc/doxyfile.in b/doc/doxyfile.in index 104ff75b..7d291faf 100644 --- a/doc/doxyfile.in +++ b/doc/doxyfile.in @@ -1,122 +1,90 @@ -# Doxyfile 1.8.14 +# Doxyfile 1.5.8 # This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. +# doxygen (www.doxygen.org) for a project # -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. +# All text after a hash (#) is considered a comment and will be ignored # The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See -# https://www.gnu.org/software/libiconv/ for the list of possible encodings. -# The default value is: UTF-8. +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. PROJECT_NAME = SFML -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. PROJECT_NUMBER = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = "@DOXYGEN_OUTPUT_DIR@" -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, +# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, +# Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. -# The default value is: YES. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ @@ -131,9 +99,8 @@ ABBREVIATE_BRIEF = "The $name class" \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief +# Doxygen will generate a detailed section even if there is only a brief # description. -# The default value is: NO. ALWAYS_DETAILED_SEC = YES @@ -141,1876 +108,1097 @@ ALWAYS_DETAILED_SEC = YES # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. -# The default value is: NO. INLINE_INHERITED_MEMB = YES -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. STRIP_FROM_PATH = -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = YES -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines (in the resulting output). You can put ^^ in the value part of an -# alias to insert a newline as if a physical newline was in the original file. +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. -#--------------------------------------------------------------------------- -# SFML specific aliases -#--------------------------------------------------------------------------- +ALIASES = -# sfplatform{platform(s)} -# sfplatform{platform(s), header} -# -# Warns the user that some specific class or function is only available on -# specific platforms. -# -# This shouldn't be used for incomplete implementations. It's meant for things -# that will never appear on another platform, e.g. Android's native activity. -# -# If a header is given, the user is informed, that this header must be included -# for the mentioned element to be defined. - -ALIASES = "sfplatform{1}=
Platform Limitation
This is only available on \1.
" \ - "sfplatform{2}=
Platform Limitation
This is only available on \1 and to use it, you'll have to specifically include \2 in your code.
" - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. +# sources. Doxygen will then generate output that is tailored for +# VHDL. OPTIMIZE_OUTPUT_VHDL = NO -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C EXTENSION_MAPPING = -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up -# to that level are automatically included in the table of contents, even if -# they do not have an id attribute. -# Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 0. -# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. - -TOC_INCLUDE_HEADINGS = 0 - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. -# The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. -# The default value is: NO. CPP_CLI_SUPPORT = NO -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first +# tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. -# The default value is: NO. DISTRIBUTE_GROUP_DOC = NO -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. SUBGROUPING = YES -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. TYPEDEF_HIDES_STRUCT = NO -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols -LOOKUP_CACHE_SIZE = 0 +SYMBOL_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. EXTRACT_PRIVATE = NO -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. EXTRACT_ANON_NSPACES = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO, these declarations will be -# included in the documentation. -# The default value is: NO. +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. -# The default value is: system dependent. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. SHOW_INCLUDE_FILES = YES -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. SORT_BRIEF_DOCS = NO -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. SORT_GROUP_NAMES = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. +# Note: This option applies only to the class list, not to the +# alphabetical list. SORT_BY_SCOPE_NAME = NO -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. -# The default value is: YES. SHOW_USED_FILES = YES -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. SHOW_FILES = YES -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. FILE_VERSION_FILTER = -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. LAYOUT_FILE = -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - #--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages +# configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. WARNINGS = YES -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. WARN_IF_UNDOCUMENTED = YES -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. -# The default value is: NO. +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. WARN_NO_PARAMDOC = YES -# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. -# The default value is: NO. - -WARN_AS_ERROR = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- -# Configuration options related to the input files +# configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. INPUT = "@DOXYGEN_INPUT_DIR@/include/SFML" \ "@DOXYGEN_INPUT_DIR@/doc/mainpage.hpp" # This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: https://www.gnu.org/software/libiconv/) for the list of -# possible encodings. -# The default value is: UTF-8. +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, -# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = *.hpp -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should be +# The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. EXCLUDE = -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. -# The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* -EXCLUDE_PATTERNS = .git \ - extlibs \ - src \ - examples \ - install \ - build \ - tools \ - cmake +EXCLUDE_PATTERNS = .svn \ + Linux \ + Unix \ + OSX* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = priv -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. EXAMPLE_PATTERNS = * # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - #--------------------------------------------------------------------------- -# Configuration options related to source browsing +# configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. REFERENCED_BY_RELATION = NO -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. REFERENCES_RELATION = NO -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = NO -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see https://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index +# configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) -COLS_IN_ALPHA_INDEX = 3 +COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the HTML output +# configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. -HTML_FILE_EXTENSION = .html +HTML_FILE_EXTENSION = .htm -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = "@DOXYGEN_OUTPUT_DIR@/header.html" +HTML_HEADER = "@DOXYGEN_INPUT_DIR@/doc/header.htm" -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. -HTML_FOOTER = "@DOXYGEN_INPUT_DIR@/doc/footer.html" +HTML_FOOTER = "@DOXYGEN_INPUT_DIR@/doc/footer.htm" -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = "@DOXYGEN_INPUT_DIR@/doc/doxygen.css" -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# https://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = NO - -# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML -# documentation will contain a main index with vertical navigation menus that -# are dynamically created via Javascript. If disabled, the navigation index will -# consists of multiple levels of tabs that are statically embedded in every HTML -# page. Disable this option to support browsers that do not have Javascript, -# like the Qt help browser. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_MENUS = NO +HTML_ALIGN_MEMBERS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: https://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See https://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. GENERATE_DOCSET = NO -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. -DOCSET_FEEDNAME = "SFML Documentation" +DOCSET_FEEDNAME = "Doxygen generated docs" -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. -DOCSET_BUNDLE_ID = org.sfml-dev.SFML +DOCSET_BUNDLE_ID = org.doxygen.Project -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.sfml-dev.SFML - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = SFML - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. GENERATE_HTMLHELP = @DOXYGEN_GENERATE_HTMLHELP@ -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = ../SFML.chm -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. HHC_LOCATION = "@DOXYGEN_HHC_PROGRAM@" -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). GENERATE_CHI = NO -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. CHM_INDEX_ENCODING = -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. GENERATE_QHP = NO -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. QCH_FILE = -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://doc.qt.io/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace -QHP_NAMESPACE = org.doxygen.Project +QHP_NAMESPACE = -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://doc.qt.io/qt-4.8/qthelpproject.html#virtual-folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters). -# This tag requires that the tag GENERATE_QHP is set to YES. +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters). -# This tag requires that the tag GENERATE_QHP is set to YES. +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://doc.qt.io/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. QHG_LOCATION = -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. DISABLE_INDEX = NO +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 1 + # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. +# structure should be generated to display hierarchical information. +# If the tag value is set to FRAME, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. Other possible values +# for this tag are: HIERARCHIES, which will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list; +# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which +# disables this behavior completely. For backwards compatibility with previous +# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE +# respectively. GENERATE_TREEVIEW = NO -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. TREEVIEW_WIDTH = 250 -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. FORMULA_FONTSIZE = 10 -# Use the FORMULA_TRANSPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# https://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. -# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /