Skip to content

Commit

Permalink
Move gltfpack sources to gltf/
Browse files Browse the repository at this point in the history
This adds a folder that we can put all gltfpack-related sources to.

The name was chosen over gltfpack to avoid conflicts with gltfpack
executable name since this doesn't change the build structure for now.
  • Loading branch information
zeux committed Feb 8, 2020
1 parent 92ba049 commit 5729ed6
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ set(SOURCES
src/vfetchoptimizer.cpp
)

set(GLTF_SOURCES
gltf/basistoktx.cpp
gltf/gltfpack.cpp
)

if(MSVC)
add_compile_options(/W4 /WX)
else()
Expand Down Expand Up @@ -59,7 +64,7 @@ if(MESHOPT_BUILD_DEMO)
endif()

if(MESHOPT_BUILD_TOOLS)
add_executable(gltfpack tools/gltfpack.cpp tools/meshloader.cpp tools/basistoktx.cpp)
add_executable(gltfpack ${GLTF_SOURCES} tools/meshloader.cpp)
target_link_libraries(gltfpack meshoptimizer)
list(APPEND TARGETS gltfpack)

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LIBRARY_OBJECTS=$(LIBRARY_SOURCES:%=$(BUILD)/%.o)
DEMO_SOURCES=$(wildcard demo/*.c demo/*.cpp) tools/meshloader.cpp
DEMO_OBJECTS=$(DEMO_SOURCES:%=$(BUILD)/%.o)

GLTFPACK_SOURCES=tools/gltfpack.cpp tools/meshloader.cpp tools/basistoktx.cpp
GLTFPACK_SOURCES=$(wildcard gltf/*.cpp) tools/meshloader.cpp
GLTFPACK_OBJECTS=$(GLTFPACK_SOURCES:%=$(BUILD)/%.o)

OBJECTS=$(LIBRARY_OBJECTS) $(DEMO_OBJECTS) $(GLTFPACK_OBJECTS)
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tools/gltfpack.cpp → gltf/gltfpack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
#include <unistd.h>
#endif

#include "cgltf.h"
#include "fast_obj.h"
#include "../tools/cgltf.h"
#include "../tools/fast_obj.h"

struct Attr
{
Expand Down
File renamed without changes.

0 comments on commit 5729ed6

Please sign in to comment.