From ba500bec5f63acd9cad38a88760f42e9a51dc41f Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Sat, 3 May 2025 09:58:37 +0200 Subject: [PATCH 1/3] cmake: set STEAMLIB only if STEAM_ENABLED on darwin --- platform/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/CMakeLists.txt b/platform/CMakeLists.txt index 343a8e2..c2203da 100644 --- a/platform/CMakeLists.txt +++ b/platform/CMakeLists.txt @@ -95,7 +95,9 @@ elseif(APPLE) linux/app_start.cpp ) target_compile_definitions(mylib PRIVATE PLATFORM_MACOS) - set(STEAMLIB ${STEAMWORKS_SDK_DIR}/redistributable_bin/osx/libsteam_api.dylib) + if(STEAM_ENABLED) + set(STEAMLIB ${STEAMWORKS_SDK_DIR}/redistributable_bin/osx/libsteam_api.dylib) + endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") message(STATUS "Building for macOS") target_link_libraries(skeldal ${all_libs} ${STEAMLIB}) From 8d5c5c419a21361ad4a2196dfcadaa8a9f1f1c38 Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Sat, 3 May 2025 10:06:01 +0200 Subject: [PATCH 2/3] cmake: remove mylib target on darwin --- platform/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/platform/CMakeLists.txt b/platform/CMakeLists.txt index c2203da..d9daadb 100644 --- a/platform/CMakeLists.txt +++ b/platform/CMakeLists.txt @@ -94,7 +94,6 @@ elseif(APPLE) target_sources(skeldal PRIVATE linux/app_start.cpp ) - target_compile_definitions(mylib PRIVATE PLATFORM_MACOS) if(STEAM_ENABLED) set(STEAMLIB ${STEAMWORKS_SDK_DIR}/redistributable_bin/osx/libsteam_api.dylib) endif() From 990b96a29b280dcaeb20f49a4a2051f3cd2a3be8 Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Sat, 3 May 2025 10:12:34 +0200 Subject: [PATCH 3/3] mem.h: Fix malloc.h include --- platform/mem.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/mem.h b/platform/mem.h index eaac886..edaf164 100644 --- a/platform/mem.h +++ b/platform/mem.h @@ -1,2 +1,6 @@ #include -#include +#if defined(__linux__) + #include +#elif defined(__APPLE__) + #include +#endif