Commit Graph

4 Commits

Author SHA1 Message Date
ManoloFLTK
0cd048a7a8 Improve procedure to construct best link command for macOS platform
As discussed between Matthias, Albrecht and Manolo, the best procedure is
- use MAC_OS_X_VERSION_MAX_ALLOWED but not __MAC_OS_X_VERSION_MAX_ALLOWED;
- compile helper file CMake /macOSMaxAllowed.c to detect whether the SDK in use
is in version above a given threshold version number;
- based upon the result of this check, decide to weakly link or not a given framework.
2024-11-28 14:59:32 +01:00
Albrecht Schlosser
d5c0e215a4 MacOS: Improve detection of SDK version (#1103)
CMake/macOSMaxAllowed.c:
  avoid C compiler warning in test code

CMake/setup.cmake, technical changes:
- optimization: test SDK 15.0.0 first to avoid unnecessary test if true
- use a function instead of a macro
- use different names for (cached) result variables
- use prefix FLTK_ for cache variables

Note: the cache variables are marked 'internal': you may need to grep
  CMakeCache.txt to view them.
2024-11-05 16:09:39 +01:00
Matthias Melcher
a77cc0cb35 MacOS version check using try_compile: #1103
This change will work as well when cross-compiling.
2024-11-04 22:35:49 +01:00
Matthias Melcher
71a61d9cbf
Using try_run to get __MAC_OS_X_VERSION_MAX_ALLOWED (#1105) 2024-11-04 20:26:49 +01:00