Fix C-Make and Scons builds

This commit is contained in:
Martin Hrubý (hrubymar10) 2018-08-09 17:13:12 +02:00 committed by Jyrki Vesterinen
parent ac4dbfdb77
commit ca7f7a2e93
5 changed files with 5 additions and 1 deletions

View file

@ -622,6 +622,7 @@ for env in [test_env, client_env, env]:
if env["PLATFORM"] == 'darwin': # Mac OS X
env.Append(FRAMEWORKS = "Cocoa") # Cocoa GUI
env.Append(FRAMEWORKS = "Security") # commonCrypto (after OpenSSL replacement on Mac)
env.Append(FRAMEWORKS = "IOKit") # IOKit
if not env['static_test']:
test_env.Append(CPPDEFINES = "BOOST_TEST_DYN_LINK")

View file

@ -67,6 +67,7 @@ commandline_options.cpp
config_cache.cpp
controller_base.cpp
countdown_clock.cpp
desktop/battery_info.cpp
desktop/notifications.cpp
desktop/open.cpp
desktop/paths.cpp

View file

@ -268,6 +268,7 @@ endif(WIN32)
if(APPLE)
set(libwesnoth-game_STAT_SRC
${libwesnoth-game_STAT_SRC}
desktop/apple_battery_info.mm
desktop/apple_notification.mm
desktop/apple_version.mm
)

View file

@ -89,6 +89,7 @@ if env["PLATFORM"] == "win32":
wesnoth_client_sources.append("desktop/windows_tray_notification.cpp")
if env["PLATFORM"] == 'darwin':
wesnoth_client_sources.append("desktop/apple_battery_info.mm")
wesnoth_client_sources.append("desktop/apple_notification.mm")
wesnoth_client_sources.append("desktop/apple_version.mm")

View file

@ -76,7 +76,7 @@ inline NSDictionary* get_iops_battery_info() {
CFRelease(list);
CFRelease(info);
return (NSDictionary*) battery;
return static_cast<NSDictionary*>(battery);
}
#endif