@@ -11,8 +11,8 @@ set(breakhack_PATCH_VERSION 3)
11
11
set (breakhack_RELEASE_TYPE "" )
12
12
13
13
# Checksums
14
- set (breakhack_STEAMAPI_DLL_CHECKSUM 0x18dba28 )
15
- set (breakhack_STEAMAPI_SO_CHECKSUM 0x1f5786b )
14
+ set (breakhack_STEAMAPI_DLL_CHECKSUM 0x1a20dd5 )
15
+ set (breakhack_STEAMAPI_SO_CHECKSUM 0x19f8c71 )
16
16
17
17
include (build_deps/cmake/FindCCache.cmake )
18
18
include (build_deps/cmake/FindCMocka.cmake )
@@ -23,12 +23,18 @@ configure_file(
23
23
"${PROJECT_BINARY_DIR} /config.h"
24
24
)
25
25
26
- if (EXISTS "${PROJECT_SOURCE_DIR} /steamworks_c_wrapper/sdk" )
27
- MESSAGE ( STATUS "Steam SDK located, Steam build enabled" )
28
- set (STEAM 1 )
26
+ set (DISABLE_STEAM_BUILD OFF CACHE BOOL "Disable Steam build" )
27
+
28
+ if (NOT DISABLE_STEAM_BUILD )
29
+ if (EXISTS "${PROJECT_SOURCE_DIR} /lib/steamworks_c_wrapper/sdk" )
30
+ MESSAGE ( STATUS "Steam SDK located, Steam build enabled" )
31
+ set (STEAM ON )
32
+ else ()
33
+ MESSAGE ( STATUS "Steam SDK not found, Steam build disabled" )
34
+ endif ()
29
35
else ()
30
- MESSAGE ( STATUS "Steam SDK not found, Steam build disabled " )
31
- endif ()
36
+ MESSAGE ( STATUS "Steam build disabled by DISABLE_STEAM_BUILD flag " )
37
+ endif ()
32
38
33
39
if (STEAM )
34
40
add_subdirectory (lib/steamworks_c_wrapper )
@@ -98,8 +104,7 @@ ENDIF ()
98
104
99
105
if (STEAM )
100
106
include_directories (
101
- ${STEAMWORKS_INCLUDE_DIR}
102
- steamworks_c_wrapper/src
107
+ lib/steamworks_c_wrapper/src
103
108
)
104
109
endif ()
105
110
@@ -196,7 +201,7 @@ if (STEAM)
196
201
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSTEAM_BUILD" )
197
202
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DSTEAM_BUILD" )
198
203
set (STEAM_SOURCES
199
- src/steam/steamworks_api_wrapper
204
+ src/steam/steamworks_api_wrapper.c
200
205
)
201
206
else ()
202
207
set (STEAM_SOURCES "" )
@@ -301,6 +306,7 @@ endif ()
301
306
302
307
if (STEAM )
303
308
target_link_libraries (breakhack
309
+ ${STEAMWORKS_LIBRARY}
304
310
steamworks_c_wrapper
305
311
)
306
312
endif ()
@@ -382,37 +388,21 @@ endif ()
382
388
SET (CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT "Release" )
383
389
SET (CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "." )
384
390
if (WIN32 )
385
- SET (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
386
- ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
387
- ${CMAKE_SOURCE_DIR} /bin/libFLAC-8.dll
388
- ${CMAKE_SOURCE_DIR} /bin/libfreetype-6.dll
389
- ${CMAKE_SOURCE_DIR} /bin/libmodplug-1.dll
390
- ${CMAKE_SOURCE_DIR} /bin/libmpg123-0.dll
391
- ${CMAKE_SOURCE_DIR} /bin/libogg-0.dll
392
- ${CMAKE_SOURCE_DIR} /bin/libpng16-16.dll
393
- ${CMAKE_SOURCE_DIR} /bin/libvorbis-0.dll
394
- ${CMAKE_SOURCE_DIR} /bin/libvorbisfile-3.dll
395
- ${CMAKE_SOURCE_DIR} /bin/SDL2.dll
396
- ${CMAKE_SOURCE_DIR} /bin/SDL2_image.dll
397
- ${CMAKE_SOURCE_DIR} /bin/SDL2_mixer.dll
398
- ${CMAKE_SOURCE_DIR} /bin/SDL2_ttf.dll
399
- ${CMAKE_SOURCE_DIR} /bin/zlib1.dll
400
- )
401
391
if (STEAM )
402
392
SET (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
403
393
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
404
- steamworks_c_wrapper/sdk/redistributable_bin/steam_api.dll
394
+ lib/ steamworks_c_wrapper/sdk/redistributable_bin/steam_api.dll
405
395
)
406
396
endif ()
407
- else (WIN32 )
397
+ else ()
408
398
if (STEAM )
409
399
SET (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
410
400
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
411
- steamworks_c_wrapper/sdk/redistributable_bin/linux64/libsteam_api.so
401
+ lib/ steamworks_c_wrapper/sdk/redistributable_bin/linux64/libsteam_api.so
412
402
build_deps/linux/breakhack.run
413
403
)
414
404
endif ()
415
- endif (WIN32 )
405
+ endif ()
416
406
include (InstallRequiredSystemLibraries )
417
407
418
408
INSTALL (TARGETS breakhack
0 commit comments