|
|
On 4/29/21 8:30 PM Bob Tolbert wrote:
I certainly didn't mean to make a permanent change to build Universal
apps. Just wanted to point out that it built and runs just dandy.
That's good and appreciated,, thanks and thanks for the clarification.
But I also wanted to prevent other users from copying what you did and
suggest a better method. All fine!
On Thu, Apr 29, 2021 at 9:29 AM Albrecht Schlosser
<AlbrechtS.fltk@online.de <mailto:AlbrechtS.fltk@online.de>> wrote:
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/37424479-99e1-5c51-dfb1-166c6ec4e74b%40online.de.
[ Direct Link to Message ] | |
|
| |