From e1606f9bbc45e7ba57c461dc1ca4d4a86c5d76dd Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 9 Mar 2024 23:02:17 +0100 Subject: Replaced MachineInfo with stripped cross-platform solution It could easily handle more, but is there really need for it? Having some information about the machine in logs is nice, but with the current state of affairs most of errors are coming from bad pointer uses than anything else... InfoEx is STATIC, because it seems FoundationEx can cause multiple definitions in scenarios like this. --- contrib/CMakeLists.txt | 3 ++- contrib/infoware/1.current.patch | 30 ++++++++++++++++++++++++++++++ contrib/infoware/CMakeLists.txt | 6 ++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 contrib/infoware/1.current.patch create mode 100644 contrib/infoware/CMakeLists.txt (limited to 'contrib') diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index 2f35927..6094770 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -2,11 +2,12 @@ include(ApplyPatch) include(FetchContent) include(MakeAvailable) add_subdirectory(gtest) +add_subdirectory(infoware) add_subdirectory(libpng) add_subdirectory(ogg) add_subdirectory(vorbis) add_subdirectory(zlib) -make_available(gtest libpng ogg vorbis zlib) +make_available(gtest infoware libpng ogg vorbis zlib) add_subdirectory(Opcode) add_subdirectory(sha1) install( diff --git a/contrib/infoware/1.current.patch b/contrib/infoware/1.current.patch new file mode 100644 index 0000000..9ef31bc --- /dev/null +++ b/contrib/infoware/1.current.patch @@ -0,0 +1,30 @@ +diff '--color=auto' -ru a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2024-03-09 23:00:40.101308564 +0100 ++++ b/CMakeLists.txt 2024-03-09 22:59:36.067973296 +0100 +@@ -84,7 +84,7 @@ + find_package(Git) + endif() + +-set(INFOWARE_PCI_DATA_DIR infoware_generated CACHE PATH "Output directory for the PCI ids generator") ++set(INFOWARE_PCI_DATA_DIR "${CMAKE_CURRENT_BINARY_DIR}/infoware_generated" CACHE PATH "Output directory for the PCI ids generator") + set(INFOWARE_PCI_DATA_HPP pci_data.hpp) + set(INFOWARE_PCI_DATA_GEN "${INFOWARE_PCI_DATA_DIR}/${INFOWARE_PCI_DATA_HPP}") + set(infoware_pci_ids_error "\ +@@ -132,13 +132,13 @@ + else() + include(ExternalProject) + ExternalProject_Add(infoware_generate_pcis +- SOURCE_DIR ${CMAKE_SOURCE_DIR} +- PREFIX ${CMAKE_BINARY_DIR}/pci_generator +- BINARY_DIR ${CMAKE_BINARY_DIR}/pci_generator ++ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} ++ PREFIX ${CMAKE_CURRENT_BINARY_DIR}/pci_generator ++ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/pci_generator + BUILD_COMMAND ${CMAKE_COMMAND} --build --target infoware_generate_pcis + INSTALL_COMMAND "" + BUILD_ALWAYS ON +- CMAKE_ARGS -DINFOWARE_PCI_DATA_DIR:PATH=${CMAKE_BINARY_DIR}/${INFOWARE_PCI_DATA_DIR}) ++ CMAKE_ARGS -DINFOWARE_PCI_DATA_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/${INFOWARE_PCI_DATA_DIR}) + endif() + add_dependencies(infoware infoware_generate_pcis) + diff --git a/contrib/infoware/CMakeLists.txt b/contrib/infoware/CMakeLists.txt new file mode 100644 index 0000000..81c7b4b --- /dev/null +++ b/contrib/infoware/CMakeLists.txt @@ -0,0 +1,6 @@ +FetchContent_Declare( + infoware + URL https://github.com/ThePhD/infoware/archive/e469b86.tar.gz + URL_HASH SHA1=e844ae80c5ca3f6b944571130ac3795c96a4e9ab + PATCH_COMMAND ${CMAKE_COMMAND} -D "PATCH_FILE=${CMAKE_CURRENT_SOURCE_DIR}/1.current.patch" -P ${PATCH_SCRIPT} + DOWNLOAD_EXTRACT_TIMESTAMP No) -- cgit v1.1