|
AUI Framework
master
Cross-platform base for C++ UI apps
|
AUI provides a set of AUI_PLATFORM_* and AUI_COMPILER_* definitions for platform and compiler checking to use in both CMake and C++.
| Platform | C++ | CMake | Platform specific dir(s) |
|---|---|---|---|
| Windows (operating system) | #if AUI_PLATFORM_WIN
// ...
#endif
| if(AUI_PLATFORM_WIN)
# ...
endif()
|
|
| Linux (-based desktop OSes) | #if AUI_PLATFORM_LINUX
// ...
#endif
| if(AUI_PLATFORM_LINUX)
# ...
endif()
|
|
| macOS (operating system) | #if AUI_PLATFORM_MACOS
// ...
#endif
| if(AUI_PLATFORM_MACOS)
# ...
endif()
|
|
| Android (operating system) | #if AUI_PLATFORM_ANDROID
// ...
#endif
| if(AUI_PLATFORM_ANDROID)
# ...
endif()
|
|
| iOS (operating system) (both iPhone and iPad) | #if AUI_PLATFORM_IOS
// ...
#endif
| if(AUI_PLATFORM_IOS)
# ...
endif()
|
|
| Apple (macOS, iOS) | #if AUI_PLATFORM_APPLE
// ...
#endif
| if(AUI_PLATFORM_APPLE)
# ...
endif()
|
|
| Unix (Linux, Android, macOS, iOS) | #if AUI_PLATFORM_UNIX
// ...
#endif
| if(AUI_PLATFORM_UNIX)
# ...
endif()
|
|
| Emscripten (WebAssembly) | #if AUI_PLATFORM_EMSCRIPTEN
// ...
#endif
| if(AUI_PLATFORM_EMSCRIPTEN)
# ...
endif()
| src/Platform/emscriptensrc/platform/emscripten |
With AUI, the platform dependent code can be placed in src/Platform/<PLATFORM_NAME> or src/platform/<PLATFORM_NAME> dirs, where <PLATFORM_NAME> is one of the supported platforms (see the table above).
| Compiler | C++ | CMake |
|---|---|---|
| MSVC | #if AUI_COMPILER_MSVC
// ...
#endif
| if(AUI_COMPILER_MSVC)
# ...
endif()
|
| GCC (including MinGW) | #if AUI_COMPILER_GCC
// ...
#endif
| if(AUI_COMPILER_GCC)
# ...
endif()
|
| CLANG | #if AUI_COMPILER_CLANG
// ...
#endif
| if(AUI_COMPILER_CLANG)
# ...
endif()
|
Target name exposed by aui_module and aui_executable.
${CMAKE_PROJECT_VERSION} exposed by aui_module and aui_executable.
CMAKE_PROJECT_VERSION is typically defined by project CMake command:
dllexport (on Windows) or visibility (on other platforms) policy for the symbol.