jorio / Bugdom

🐛 Pangea Software's Bugdom for modern systems
https://pangeasoft.net/bug
Other
380 stars 23 forks source link

Build fails on macOS - Framework not found: "-lFoundation" #14

Closed sebkacz closed 3 years ago

sebkacz commented 3 years ago

Building the latest commit (ca652a1) fails to build on macOS in both cmake and Xcode with the error: ld: framework not found -lFoundation

The recent modification (1d5a9614b6b985d53fd5ff0fbe14f65c65257287) in the CMakeLists.txt file appends Foundation and IOKit to an array for the frameworks to be included, but adds them as separate libraries because they're not enclosed with quotes.

The line in question: https://github.com/jorio/Bugdom/blob/ca652a1a02e3c24d183d0cf6befd5cc5b3c77b0c/CMakeLists.txt#L245

This ends up trying to add -framework -lFoundation -framework -lIOKit to the ld command and fails.

Changing this line to enclose the framework lines list(APPEND GAME_LIBRARIES "-framework Foundation" "-framework IOKit") resolves the error, and builds successfully on macOS 11.4 (20F71)

jorio commented 3 years ago

Fixed. Thank you!