Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,18 @@ jobs:
with:
name: meshoptimizer-npm
path: js/meshoptimizer-*.tgz

archive:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: git archive
run: |
VERSION=$(sed -n 's/^project(meshoptimizer VERSION \([0-9.]*\).*/\1/p' CMakeLists.txt)
git archive --format=tar.gz --prefix=meshoptimizer-$VERSION/ -o meshoptimizer-$VERSION.tar.gz HEAD -- \
CMakeLists.txt LICENSE.md README.md demo extern gltf js src \
':(exclude)demo/pirate.*' ':(exclude)demo/*.html' ':(exclude)demo/*.js'
- uses: actions/upload-artifact@v7
with:
path: meshoptimizer-*.tar.gz
archive: false
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ if(MESHOPT_BUILD_SHARED_LIBS)
endif()

if(MESHOPT_BUILD_DEMO)
add_executable(demo demo/main.cpp demo/nanite.cpp demo/tests.cpp tools/objloader.cpp)
add_executable(demo demo/main.cpp demo/nanite.cpp demo/tests.cpp)
set_target_properties(demo PROPERTIES CXX_STANDARD 11)
set_target_properties(demo PROPERTIES OUTPUT_NAME meshoptdemo)
target_link_libraries(demo meshoptimizer)
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ BUILD=build/$(config)
LIBRARY_SOURCES=$(wildcard src/*.cpp)
LIBRARY_OBJECTS=$(LIBRARY_SOURCES:%=$(BUILD)/%.o)

DEMO_SOURCES=$(wildcard demo/*.c demo/*.cpp) tools/objloader.cpp
DEMO_SOURCES=$(wildcard demo/*.c demo/*.cpp)
DEMO_OBJECTS=$(DEMO_SOURCES:%=$(BUILD)/%.o)

GLTFPACK_SOURCES=$(wildcard gltf/*.cpp)
Expand Down Expand Up @@ -218,7 +218,7 @@ js/meshopt_decoder.cjs: js/meshopt_decoder.mjs
$(DEMO): $(DEMO_OBJECTS) $(LIBRARY)
$(CXX) $^ $(LDFLAGS) -o $@

vcachetuner: tools/vcachetuner.cpp tools/objloader.cpp $(LIBRARY)
vcachetuner: tools/vcachetuner.cpp $(LIBRARY)
$(CXX) $^ -fopenmp $(CXXFLAGS) -std=c++11 $(LDFLAGS) -o $@

codecbench: tools/codecbench.cpp $(LIBRARY)
Expand Down
5 changes: 5 additions & 0 deletions demo/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif

#include "../src/meshoptimizer.h"

#include <assert.h>
Expand All @@ -9,6 +13,7 @@

#include <vector>

#define FAST_OBJ_IMPLEMENTATION
#include "../extern/fast_obj.h"

#define SDEFL_IMPLEMENTATION
Expand Down
6 changes: 0 additions & 6 deletions tools/objloader.cpp

This file was deleted.

6 changes: 6 additions & 0 deletions tools/vcachetester.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif

#ifdef _WIN32
#include <assert.h>
#include <d3d11.h>
Expand All @@ -10,7 +14,9 @@
#include <algorithm>
#include <vector>

#define FAST_OBJ_IMPLEMENTATION
#include "../extern/fast_obj.h"

#include "../src/meshoptimizer.h"

#pragma comment(lib, "d3d11.lib")
Expand Down
6 changes: 6 additions & 0 deletions tools/vcachetuner.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif

#define FAST_OBJ_IMPLEMENTATION
#include "../extern/fast_obj.h"

#include "../src/meshoptimizer.h"

#define SDEFL_IMPLEMENTATION
Expand Down
Loading