|
|
On 4/29/21 4:36 PM Bob Tolbert wrote:
I just cloned from github and checked out the 1.3 branch. With the
renamed VERSION file, everything builds great on macOS
I tested the build on an M1 Mac as well. Looks great and the few apps I
tried run really well.
Thanks for the feedback and this additional test.
There is a single change people can make on macOS to allow building a
"universal" app. I added this one line in "cmake/Setup.cmake"
$ git diff
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
modified: CMake/setup.cmake
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@ CMake/setup.cmake:25 @
set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin)
set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/lib)
set (ARCHIVE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/lib)
*set (CMAKE_OSX_ARCHITECTURES "arm64;x86_64")*
# Search for modules in the FLTK source dir first
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
and after a rebuild, you can see the results are fat binaries:
> ...
Thanks for this hint as well.
Setting CMAKE_OSX_ARCHITECTURES is the right variable but I do /not/
recommend to change setup.cmake and such a change will not be
incorporated in the official sources (because it would overwrite the
cache variable).
A better way to achieve this is to set the cache variable
CMAKE_OSX_ARCHITECTURES either in the CMake GUI or on the commandline:
cmake -D 'CMAKE_OSX_ARCHITECTURES=arm64;x86_64' <...>
if you want to build universal apps.
Maybe we will add a macOS specific option to let the user select for
which architecture to build in 1.4.0.
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/948edb7b-3dd0-f62b-819a-f0d256a07654%40online.de.
[ Direct Link to Message ] | |
|
| |