From 833f938a64513cc2d9f921999d1a8f0e781bfbea Mon Sep 17 00:00:00 2001 From: Margen67 Date: Thu, 31 Jul 2025 00:02:01 -0700 Subject: [PATCH] [premake] Formatting, cleanup --- premake5.lua | 2 +- third_party/SDL2-static.lua | 80 ------------------------------------- third_party/aes_128.lua | 1 - third_party/capstone.lua | 11 ----- third_party/dxbc.lua | 1 - third_party/imgui.lua | 6 --- third_party/libusb.lua | 4 +- third_party/mspack.lua | 5 --- third_party/xxhash.lua | 1 - third_party/zstd.lua | 43 ++++++++++---------- 10 files changed, 24 insertions(+), 130 deletions(-) diff --git a/premake5.lua b/premake5.lua index b3be27c32..7656f46eb 100644 --- a/premake5.lua +++ b/premake5.lua @@ -68,7 +68,7 @@ filter({"configurations:Checked or Debug", "platforms:Linux"}) "_GLIBCXX_DEBUG", -- libstdc++ debug mode }) -filter({"configurations:Checked or Debug", "platforms:Windows"}) +filter({"configurations:Checked or Debug", "platforms:Windows"}) -- "toolset:msc" symbols("Full") filter("configurations:Debug") diff --git a/third_party/SDL2-static.lua b/third_party/SDL2-static.lua index 3cf513ab3..2598b90a9 100644 --- a/third_party/SDL2-static.lua +++ b/third_party/SDL2-static.lua @@ -21,86 +21,6 @@ project("SDL2") }) files({ -- 1:1 from SDL2/VisualC/SDL/SDL.vcxproj file - "SDL2/include/begin_code.h", - "SDL2/include/close_code.h", - "SDL2/include/SDL.h", - "SDL2/include/SDL_assert.h", - "SDL2/include/SDL_atomic.h", - "SDL2/include/SDL_audio.h", - "SDL2/include/SDL_bits.h", - "SDL2/include/SDL_blendmode.h", - "SDL2/include/SDL_clipboard.h", - "SDL2/include/SDL_config.h", - "SDL2/include/SDL_config_windows.h", - "SDL2/include/SDL_copying.h", - "SDL2/include/SDL_cpuinfo.h", - "SDL2/include/SDL_egl.h", - "SDL2/include/SDL_endian.h", - "SDL2/include/SDL_error.h", - "SDL2/include/SDL_events.h", - "SDL2/include/SDL_filesystem.h", - "SDL2/include/SDL_gamecontroller.h", - "SDL2/include/SDL_gesture.h", - "SDL2/include/SDL_guid.h", - "SDL2/include/SDL_haptic.h", - "SDL2/include/SDL_hints.h", - "SDL2/include/SDL_hidapi.h", - "SDL2/include/SDL_joystick.h", - "SDL2/include/SDL_keyboard.h", - "SDL2/include/SDL_keycode.h", - "SDL2/include/SDL_loadso.h", - "SDL2/include/SDL_locale.h", - "SDL2/include/SDL_log.h", - "SDL2/include/SDL_main.h", - "SDL2/include/SDL_messagebox.h", - "SDL2/include/SDL_metal.h", - "SDL2/include/SDL_misc.h", - "SDL2/include/SDL_mouse.h", - "SDL2/include/SDL_mutex.h", - "SDL2/include/SDL_name.h", - "SDL2/include/SDL_opengl.h", - "SDL2/include/SDL_opengl_glext.h", - "SDL2/include/SDL_opengles.h", - "SDL2/include/SDL_opengles2.h", - "SDL2/include/SDL_opengles2_gl2.h", - "SDL2/include/SDL_opengles2_gl2ext.h", - "SDL2/include/SDL_opengles2_gl2platform.h", - "SDL2/include/SDL_opengles2_khrplatform.h", - "SDL2/include/SDL_pixels.h", - "SDL2/include/SDL_platform.h", - "SDL2/include/SDL_power.h", - "SDL2/include/SDL_quit.h", - "SDL2/include/SDL_rect.h", - "SDL2/include/SDL_render.h", - "SDL2/include/SDL_revision.h", - "SDL2/include/SDL_rwops.h", - "SDL2/include/SDL_scancode.h", - "SDL2/include/SDL_sensor.h", - "SDL2/include/SDL_shape.h", - "SDL2/include/SDL_stdinc.h", - "SDL2/include/SDL_surface.h", - "SDL2/include/SDL_system.h", - "SDL2/include/SDL_syswm.h", - "SDL2/include/SDL_test.h", - "SDL2/include/SDL_test_assert.h", - "SDL2/include/SDL_test_common.h", - "SDL2/include/SDL_test_compare.h", - "SDL2/include/SDL_test_crc32.h", - "SDL2/include/SDL_test_font.h", - "SDL2/include/SDL_test_fuzzer.h", - "SDL2/include/SDL_test_harness.h", - "SDL2/include/SDL_test_images.h", - "SDL2/include/SDL_test_log.h", - "SDL2/include/SDL_test_md5.h", - "SDL2/include/SDL_test_memory.h", - "SDL2/include/SDL_test_random.h", - "SDL2/include/SDL_thread.h", - "SDL2/include/SDL_timer.h", - "SDL2/include/SDL_touch.h", - "SDL2/include/SDL_types.h", - "SDL2/include/SDL_version.h", - "SDL2/include/SDL_video.h", - "SDL2/include/SDL_vulkan.h", "SDL2/src/audio/directsound/SDL_directsound.h", "SDL2/src/audio/disk/SDL_diskaudio.h", "SDL2/src/audio/dummy/SDL_dummyaudio.h", diff --git a/third_party/aes_128.lua b/third_party/aes_128.lua index fe0e5298e..d53f66eaa 100644 --- a/third_party/aes_128.lua +++ b/third_party/aes_128.lua @@ -7,6 +7,5 @@ project("aes_128") "aes_128", }) files({ - "aes_128/aes.h", "aes_128/unroll/aes.c", }) diff --git a/third_party/capstone.lua b/third_party/capstone.lua index b7d922851..ee8aea191 100644 --- a/third_party/capstone.lua +++ b/third_party/capstone.lua @@ -15,23 +15,12 @@ project("capstone") }) files({ "capstone/cs.c", - "capstone/cs_priv.h", - "capstone/LEB128.h", - "capstone/MathExtras.h", - "capstone/MCDisassembler.h", - "capstone/MCFixedLenDisassembler.h", "capstone/MCInst.c", - "capstone/MCInst.h", "capstone/MCInstrDesc.c", - "capstone/MCInstrDesc.h", "capstone/MCRegisterInfo.c", - "capstone/MCRegisterInfo.h", "capstone/SStream.c", - "capstone/SStream.h", "capstone/utils.c", - "capstone/utils.h", "capstone/Mapping.c", - "capstone/Mapping.h", "capstone/arch/X86/*.c", "capstone/arch/X86/*.h", diff --git a/third_party/dxbc.lua b/third_party/dxbc.lua index ed5a262f0..83f48eb1a 100644 --- a/third_party/dxbc.lua +++ b/third_party/dxbc.lua @@ -8,5 +8,4 @@ project("dxbc") }) files({ "dxbc/DXBCChecksum.cpp", - "dxbc/DXBCChecksum.h", }) diff --git a/third_party/imgui.lua b/third_party/imgui.lua index 314b83f32..63f62639d 100644 --- a/third_party/imgui.lua +++ b/third_party/imgui.lua @@ -7,15 +7,9 @@ project("imgui") "imgui", }) files({ - "imgui/imconfig.h", "imgui/imgui.cpp", - "imgui/imgui.h", "imgui/imgui_demo.cpp", "imgui/imgui_draw.cpp", - "imgui/imgui_internal.h", "imgui/imgui_tables.cpp", "imgui/imgui_widgets.cpp", - "imgui/imstb_rectpack.h", - "imgui/imstb_textedit.h", - "imgui/imstb_truetype.h", }) diff --git a/third_party/libusb.lua b/third_party/libusb.lua index 42b773012..52ad87bc7 100644 --- a/third_party/libusb.lua +++ b/third_party/libusb.lua @@ -3,7 +3,7 @@ project("libusb") uuid("5f8b5485-fde5-4a42-8a13-8545fcf6d25b") kind("StaticLib") language("C") - includedirs({"libusb/libusb/"}) + includedirs({"libusb/libusb"}) files({ "libusb/libusb/core.c", @@ -15,7 +15,7 @@ project("libusb") }) filter({"platforms:Windows"}) - includedirs({"libusb/msvc/"}) + includedirs({"libusb/msvc"}) files({ "libusb/libusb/os/events_windows.c", "libusb/libusb/os/events_windows.h", diff --git a/third_party/mspack.lua b/third_party/mspack.lua index 5f057361c..862ad71d0 100644 --- a/third_party/mspack.lua +++ b/third_party/mspack.lua @@ -14,11 +14,6 @@ project("mspack") }) files({ "mspack/logging.cc", - "mspack/lzx.h", "mspack/lzxd.c", - "mspack/mspack.h", - "mspack/readbits.h", - "mspack/readhuff.h", "mspack/system.c", - "mspack/system.h", }) diff --git a/third_party/xxhash.lua b/third_party/xxhash.lua index e763ac2b2..a6bb1f873 100644 --- a/third_party/xxhash.lua +++ b/third_party/xxhash.lua @@ -8,5 +8,4 @@ project("xxhash") }) files({ "xxhash/xxhash.c", - "xxhash/xxhash.h", }) diff --git a/third_party/zstd.lua b/third_party/zstd.lua index 1b12581d1..c5597b0d4 100644 --- a/third_party/zstd.lua +++ b/third_party/zstd.lua @@ -19,65 +19,65 @@ function project_zstd(dir, compression, decompression, deprecated, dictbuilder, deprecated = false end - project 'zstd' - kind 'StaticLib' - language 'C' + project "zstd" + kind "StaticLib" + language "C" files { - dir .. 'zstd.h', - dir .. 'common/**.c', - dir .. 'common/**.h' + dir .. "zstd.h", + dir .. "common/**.c", + dir .. "common/**.h" } if compression then files { - dir .. 'compress/**.c', - dir .. 'compress/**.h' + dir .. "compress/**.c", + dir .. "compress/**.h" } end if decompression then files { - dir .. 'decompress/**.c', - dir .. 'decompress/**.h' + dir .. "decompress/**.c", + dir .. "decompress/**.h" } end if dictbuilder then files { - dir .. 'dictBuilder/**.c', - dir .. 'dictBuilder/**.h' + dir .. "dictBuilder/**.c", + dir .. "dictBuilder/**.h" } end if deprecated then files { - dir .. 'deprecated/**.c', - dir .. 'deprecated/**.h' + dir .. "deprecated/**.c", + dir .. "deprecated/**.h" } end if legacy ~= 0 then if legacy >= 8 then files { - dir .. 'legacy/zstd_v0' .. (legacy - 7) .. '.*' + dir .. "legacy/zstd_v0" .. (legacy - 7) .. ".*" } end includedirs { - dir .. 'legacy' + dir .. "legacy" } end includedirs { dir, - dir .. 'common' + dir .. "common" } defines { - 'XXH_NAMESPACE=ZSTD_', + "XXH_NAMESPACE=ZSTD_", -- See here on why: https://gitlab.kitware.com/cmake/cmake/-/issues/25744 - 'ZSTD_DISABLE_ASM=1', - 'ZSTD_LEGACY_SUPPORT=' .. legacy + "ZSTD_DISABLE_ASM=1", + "ZSTD_LEGACY_SUPPORT=" .. legacy } end @@ -85,5 +85,4 @@ end group("third_party") project("zstd") uuid("df336aac-f0c8-11ed-a05b-0242ac120003") - project_zstd('./zstd/lib/') - + project_zstd("./zstd/lib/")