Skip to content

Commit

Permalink
Improve procedure to construct best link command for macOS platform
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ManoloFLTK committed Nov 28, 2024
1 parent be6966b commit 0cd048a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMake/macOSMaxAllowed.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#include <AvailabilityMacros.h>
#if __MAC_OS_X_VERSION_MAX_ALLOWED < SDK_VERSION_CHECK
#error __MAC_OS_X_VERSION_MAX_ALLOWED < SDK_VERSION_CHECK
#if MAC_OS_X_VERSION_MAX_ALLOWED < SDK_VERSION_CHECK
#error MAC_OS_X_VERSION_MAX_ALLOWED < SDK_VERSION_CHECK
#endif
int main(int argc, char** argv) { return 0; }

0 comments on commit 0cd048a

Please sign in to comment.