Upgrade steamworks and fix for Ninja build

This commit is contained in:
Dale Glass 2023-12-05 15:12:01 -08:00
parent deeb1d7505
commit e23829962f

View file

@ -4,18 +4,82 @@ set(EXTERNAL_NAME steamworks)
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
set(STEAMWORKS_URL "${EXTERNAL_BUILD_ASSETS}/dependencies/steamworks_sdk_137.zip")
set(STEAMWORKS_URL_MD5 "95ba9d0e3ddc04f8a8be17d2da806cbb")
set(STEAMWORKS_URL "${EXTERNAL_BUILD_ASSETS}/dependencies/steamworks_sdk_158a.zip")
set(STEAMWORKS_URL_SHA512 "fe906a7510a2125ab1441ad349e8bc31fafc9ab8130ec3843287e615a850305a8ed303e8d9e5bae4fee06024987834fb9f64c6c10d3da3784267a4906e59c831")
# Ninja needs to know all the files that result from this upfront, so we need to tell it what files this is going
# to generate with BUILD_BYPRODUCTS. We need to include all the files that are going to be referenced from elsewhere
# in the build.
#
# This should include both libraries and headers, since from the point of view of the build, those are the outputs
# of the project, even though we're not actually building anything here, and just unzipping an existing binary.
#
# I believe this list can't be obtained automatically from the compressed file, and needs to be generated by hand.
# Steam SDK .zip has a sdk/ subdirectory, but for ExternalProject, this gets turned into project/src/steamworks.
# So inside the SDK, sdk/redistributable_bin/steam_api.dll becomes project/src/steamworks/redistributable_bin/steam_api.dll
# This can be seen under $BUILD_DIR/ext.
ExternalProject_Add(
${EXTERNAL_NAME}
URL ${STEAMWORKS_URL}
URL_MD5 ${STEAMWORKS_URL_MD5}
URL_HASH SHA512=${STEAMWORKS_URL_SHA512}
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
LOG_DOWNLOAD 1
DOWNLOAD_EXTRACT_TIMESTAMP 1
BUILD_BYPRODUCTS
"project/src/steamworks/redistributable_bin/win64/steam_api64.lib"
"project/src/steamworks/redistributable_bin/win64/steam_api64.dll"
"project/src/steamworks/redistributable_bin/osx/steam_api.dylib"
"project/src/steamworks/redistributable_bin/linux64/steam_api.so"
"project/src/steamworks/redistributable_bin/linux32/steam_api.so"
"project/src/steamworks/redistributable_bin/steam_api.lib"
"project/src/steamworks/redistributable_bin/steam_api.dll"
"project/src/steamworks/public/steam/isteamapplist.h"
"project/src/steamworks/public/steam/isteamapps.h"
"project/src/steamworks/public/steam/isteamappticket.h"
"project/src/steamworks/public/steam/isteamclient.h"
"project/src/steamworks/public/steam/isteamcontroller.h"
"project/src/steamworks/public/steam/isteamdualsense.h"
"project/src/steamworks/public/steam/isteamfriends.h"
"project/src/steamworks/public/steam/isteamgamecoordinator.h"
"project/src/steamworks/public/steam/isteamgameserver.h"
"project/src/steamworks/public/steam/isteamgameserverstats.h"
"project/src/steamworks/public/steam/isteamhtmlsurface.h"
"project/src/steamworks/public/steam/isteamhttp.h"
"project/src/steamworks/public/steam/isteaminput.h"
"project/src/steamworks/public/steam/isteaminventory.h"
"project/src/steamworks/public/steam/isteammatchmaking.h"
"project/src/steamworks/public/steam/isteammusic.h"
"project/src/steamworks/public/steam/isteammusicremote.h"
"project/src/steamworks/public/steam/isteamnetworking.h"
"project/src/steamworks/public/steam/isteamnetworkingmessages.h"
"project/src/steamworks/public/steam/isteamnetworkingsockets.h"
"project/src/steamworks/public/steam/isteamnetworkingutils.h"
"project/src/steamworks/public/steam/isteamparentalsettings.h"
"project/src/steamworks/public/steam/isteamps3overlayrenderer.h"
"project/src/steamworks/public/steam/isteamremoteplay.h"
"project/src/steamworks/public/steam/isteamremotestorage.h"
"project/src/steamworks/public/steam/isteamscreenshots.h"
"project/src/steamworks/public/steam/isteamugc.h"
"project/src/steamworks/public/steam/isteamuser.h"
"project/src/steamworks/public/steam/isteamuserstats.h"
"project/src/steamworks/public/steam/isteamutils.h"
"project/src/steamworks/public/steam/isteamvideo.h"
"project/src/steamworks/public/steam/matchmakingtypes.h"
"project/src/steamworks/public/steam/steam_api_common.h"
"project/src/steamworks/public/steam/steam_api_flat.h"
"project/src/steamworks/public/steam/steam_api.h"
"project/src/steamworks/public/steam/steam_api_internal.h"
"project/src/steamworks/public/steam/steamclientpublic.h"
"project/src/steamworks/public/steam/steamencryptedappticket.h"
"project/src/steamworks/public/steam/steam_gameserver.h"
"project/src/steamworks/public/steam/steamhttpenums.h"
"project/src/steamworks/public/steam/steamnetworkingfakeip.h"
"project/src/steamworks/public/steam/steamnetworkingtypes.h"
"project/src/steamworks/public/steam/steamps3params.h"
"project/src/steamworks/public/steam/steamtypes.h"
"project/src/steamworks/public/steam/steamuniverse.h"
)
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")