diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-04-29 18:32:19 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-04-29 18:32:19 +0200 |
| commit | 4ba92a99bb259d19e524fb82f16ba8e2d4999def (patch) | |
| tree | 31de43d738d8ff8916b008445296b6197f70aba3 /README.CMake.txt | |
| parent | 9df287b415cd4d67a7a371c4cc89a11ebb8340f6 (diff) | |
Document how to build universal apps for macOS
Diffstat (limited to 'README.CMake.txt')
| -rw-r--r-- | README.CMake.txt | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/README.CMake.txt b/README.CMake.txt index 111c2cd1f..40dfc5b74 100644 --- a/README.CMake.txt +++ b/README.CMake.txt @@ -92,6 +92,12 @@ CMAKE_INSTALL_PREFIX Where everything will go on install. Defaults are /usr/local for Unix and C:\Program Files\FLTK for Windows. +CMAKE_OSX_ARCHITECTURES (macOS only, ignored on other platforms) + Set this to either "arm64", "x86_64", or a list of both "arm64;x86_64". + The latter will build "universal apps" on macOS, whereas the former + will either build Intel (x86_64) or Apple Silicon aka M1 (arm64) apps. + The default is to build for the host processor architecture. + The following are the FLTK specific options. Platform specific options are ignored on other platforms. @@ -134,9 +140,9 @@ OPTION_USE_THREADS - default ON OPTION_LARGE_FILE - default ON Enables large file (>2G) support. -OPTION_USE_SYSTEM_LIBJPEG - default ON -OPTION_USE_SYSTEM_ZLIB - default ON -OPTION_USE_SYSTEM_LIBPNG - default ON +OPTION_USE_SYSTEM_LIBJPEG - default ON (macOS: OFF) +OPTION_USE_SYSTEM_LIBPNG - default ON (macOS: OFF) +OPTION_USE_SYSTEM_ZLIB - default ON FLTK has built in jpeg, zlib, and png libraries. These options let you use system libraries instead, unless CMake can't find them. If you set any of these options to OFF, then the built in library will be used. @@ -526,9 +532,10 @@ The built-in libraries (if built): ------------------------ CMake has a command named fltk_wrap_ui which helps deal with fluid *.fl -files. Unfortunately it is broken in CMake 3.4.x. You can however use -add_custom_command to achieve the same result. -This is a more basic approach and should work for all CMake versions. +files. Unfortunately it is broken in CMake 3.4.x but it seems to work in +3.5 and later CMake versions. You can however use add_custom_command() +to achieve the same result. This is a more basic approach and should +work for all CMake versions. Here is a sample CMakeLists.txt which compiles the CubeView example from a directory you've copied the test/Cube* files to. @@ -584,3 +591,4 @@ Jan 31 2016 - msurette: custom command instead of fltk_wrap_ui Nov 01 2016 - AlbrechtS: remove deprecated FLTK_USE_FILE, add MinGW build Jul 05 2017 - matt: added instructions for MacOS and Xcode Dec 29 2018 - AlbrechtS: add documentation option descriptions +Apr 29 2021 - AlbrechtS: document macOS "universal apps" build setup |
