From cea891f87d9b80f0187ff1b26922604995e9caee Mon Sep 17 00:00:00 2001 From: Linus Probert Date: Thu, 21 Mar 2019 08:52:39 +0100 Subject: [PATCH] Move checksum configuration to CMakeLists.txt and config.h --- CMakeLists.txt | 4 ++++ src/config.h.in | 5 +++++ src/defines.h | 4 ---- src/main.c | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9bb33bd..e09a262 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,10 @@ set(breakhack_MINOR_VERSION 0) set(breakhack_PATCH_VERSION 1) set(breakhack_RELEASE_TYPE "") +# Checksums +set(breakhack_STEAMAPI_DLL_CHECKSUM 0x18dba28) +set(breakhack_STEAMAPI_SO_CHECKSUM 0x1f5786b) + include(FindLua) include(FindPhysFS) include(build/cmake/FindSDL2.cmake) diff --git a/src/config.h.in b/src/config.h.in index 83795fc..ad9de1b 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -27,4 +27,9 @@ #define PATCH_VERSION @breakhack_PATCH_VERSION@ #define RELEASE_TYPE "@breakhack_RELEASE_TYPE@" + +/* Checksums */ +#define SO_LIBSTEAM_CHECKSUM @breakhack_STEAMAPI_SO_CHECKSUM@ +#define DLL_LIBSTEAM_CHECKSUM @breakhack_STEAMAPI_DLL_CHECKSUM@ + #endif // CONFIG_H_ diff --git a/src/defines.h b/src/defines.h index a265c2b..b3dd6ff 100644 --- a/src/defines.h +++ b/src/defines.h @@ -22,10 +22,6 @@ #include #include "config.h" -/* Checksums */ -#define SO_LIBSTEAM_CHECKSUM 0x1f5786b -#define DLL_LIBSTEAM_CHECKSUM 0x18dba28 - /* Room/Map dimensions */ #define MAP_ROOM_WIDTH 16 #define MAP_ROOM_HEIGHT 12 diff --git a/src/main.c b/src/main.c index 8ec6c0f..ee913e1 100644 --- a/src/main.c +++ b/src/main.c @@ -57,6 +57,7 @@ #include "time.h" #include "sprite_util.h" #include "event.h" +#include "config.h" #ifdef STEAM_BUILD #include "checksum.h"