Skip to content

Commit

Permalink
CI: Wot
Browse files Browse the repository at this point in the history
  • Loading branch information
DatCaptainHorse committed Aug 14, 2024
1 parent 5ff0fda commit 43d6433
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.29)

cmake_policy(SET CMP0067 NEW)
cmake_policy(SET CMP0155 OLD)

project(ChatNotifier)

Expand Down
39 changes: 39 additions & 0 deletions cmake/0004-Fix-openal-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 12a2416d..97ad20a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -188,33 +188,10 @@ set(LIB_VERSION_NUM ${LIB_MAJOR_VERSION},${LIB_MINOR_VERSION},${LIB_REVISION},0)

set(EXPORT_DECL "")

-
-# Some systems erroneously require the __STDC_FORMAT_MACROS macro to be defined
-# to get the fixed-width integer type formatter macros.
-check_cxx_source_compiles("#include <cinttypes>
-#include <cstdio>
-int main()
-{
- int64_t i64{};
- std::printf(\"%\" PRId64, i64);
-}"
-HAVE_STDC_FORMAT_MACROS)
-if(NOT HAVE_STDC_FORMAT_MACROS)
- set(CPP_DEFS ${CPP_DEFS} __STDC_FORMAT_MACROS)
-endif()
-
# Some systems may need libatomic for atomic functions to work
set(OLD_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
set(CMAKE_REQUIRED_LIBRARIES ${OLD_REQUIRED_LIBRARIES} atomic)
-check_cxx_source_compiles("#include <atomic>
-std::atomic<int> foo{0};
-int main() { return foo.fetch_add(2); }"
-HAVE_LIBATOMIC)
-if(NOT HAVE_LIBATOMIC)
- set(CMAKE_REQUIRED_LIBRARIES "${OLD_REQUIRED_LIBRARIES}")
-else()
- set(EXTRA_LIBS atomic ${EXTRA_LIBS})
-endif()
+set(EXTRA_LIBS atomic ${EXTRA_LIBS})
unset(OLD_REQUIRED_LIBRARIES)

if(ANDROID)
3 changes: 3 additions & 0 deletions cmake/modules/FetchDeps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ set(ENABLE_CPACK OFF CACHE BOOL "" FORCE)

# Fetch openal-soft
message(STATUS "Fetching openal-soft")
set(ALSOFT_PATCH git apply "${PROJECT_SOURCE_DIR}/cmake/0004-Fix-openal-cmake.patch")
FetchContent_Declare(
openal-soft
GIT_REPOSITORY "https://github.com/kcat/openal-soft.git"
GIT_COMMIT "e39038317623c6282c3fd5685fcceaf3cc3137c7"
PATCH_COMMAND ${ALSOFT_PATCH}
UPDATE_DISCONNECTED 1
FIND_PACKAGE_ARGS
)
# We don't care about the examples
Expand Down

0 comments on commit 43d6433

Please sign in to comment.