File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,15 @@ function(detect_architecture arch)
125
125
endif ()
126
126
endfunction ()
127
127
128
+ function (detect_macos_version version )
129
+ find_program (SW_VERS_EXECUTABLE sw_vers)
130
+ execute_process (
131
+ COMMAND "${SW_VERS_EXECUTABLE} " -productVersion
132
+ OUTPUT_VARIABLE MACOS_VERSION
133
+ )
134
+ set (${version} "${MACOS_VERSION} " PARENT_SCOPE)
135
+ endfunction ()
136
+
128
137
# convert semicolons in generator expression to $<SEMICOLON>
129
138
function (convert_genex_semicolons genex output )
130
139
set (result)
Original file line number Diff line number Diff line change @@ -83,6 +83,13 @@ project_options(
83
83
# Executable
84
84
add_executable (main ./src/main/main.cpp)
85
85
target_link_libraries (main PRIVATE myproj_project_options myproj_project_warnings)
86
+ if (APPLE )
87
+ detect_macos_version(apple_version)
88
+ if (apple_version VERSION_GREATER_EQUAL 13)
89
+ # workaround for linkage error as described in https://github.com/Homebrew/homebrew-core/issues/145991
90
+ target_link_options (main PRIVATE -ld_classic)
91
+ endif ()
92
+ endif ()
86
93
87
94
## dependencies
88
95
set (DEPENDENCIES_CONFIGURED fmt Eigen3 docopt)
You can’t perform that action at this time.
0 commit comments