Skip to content

Commit 5c8b7da

Browse files
committed
remove tinyobjloader reference
1 parent 8e7e7a5 commit 5c8b7da

5 files changed

Lines changed: 4 additions & 35 deletions

File tree

cmake/3rd.cmake

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,6 @@ CPMAddPackage(
7070
)
7171
find_package(SDL2 REQUIRED)
7272

73-
# # https://github.com/aminosbh/sdl2-cmake-modules.git
74-
# CPMAddPackage(
75-
# NAME sdl2-cmake-modules
76-
# GIT_REPOSITORY https://github.com/aminosbh/sdl2-cmake-modules.git
77-
# DOWNLOAD_ONLY True
78-
# )
79-
80-
# if (sdl2-cmake-modules_ADDED)
81-
# list(APPEND CMAKE_MODULE_PATH ${sdl2-cmake-modules_SOURCE_DIR})
82-
# endif ()
8373

8474
CPMAddPackage(
8575
NAME assimp
@@ -91,26 +81,10 @@ CPMAddPackage(
9181
"ASSIMP_BUILD_SAMPLES OFF"
9282
)
9383

94-
# https://github.com/tinyobjloader/tinyobjloader.git
95-
CPMAddPackage(
96-
NAME tinyobjloader
97-
GIT_REPOSITORY https://github.com/tinyobjloader/tinyobjloader.git
98-
GIT_TAG 853f059d778058a43c954850e561a231934b33a7
99-
DOWNLOAD_ONLY True
100-
)
101-
if (tinyobjloader_ADDED)
102-
add_library(tinyobjloader INTERFACE)
103-
target_sources(tinyobjloader INTERFACE
104-
FILE_SET HEADERS
105-
BASE_DIRS ${tinyobjloader_SOURCE_DIR}
106-
FILES tiny_obj_loader.h
107-
)
108-
endif ()
109-
11084
CPMAddPackage(
11185
NAME glm
11286
GITHUB_REPOSITORY g-truc/glm
113-
VERSION 1.0.1
87+
GIT_TAG 1.0.1
11488
)
11589

11690
# https://github.com/nothings/stb.git

cmake/add_header.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
# 将头文件路径添加到 _target 的搜索路径中
77

88
function(add_header_3rd _target)
9-
target_include_directories(${_target} PRIVATE
10-
${tinyobjloader_SOURCE_DIR})
9+
target_include_directories(${_target} PRIVATE)
1110
endfunction()

cmake/compile_config.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ list(APPEND DEFAULT_COMPILE_OPTIONS
1616
list(APPEND DEFAULT_LINK_LIB
1717
spdlog::spdlog
1818
stb
19-
tinyobjloader
2019
glm::glm
2120
${glog_LIBRARIES}
2221
SDL2::SDL2

src/model.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
#include <assimp/postprocess.h>
2424
#include <assimp/scene.h>
2525

26-
#define TINYOBJLOADER_IMPLEMENTATION
27-
#include <tiny_obj_loader.h>
28-
2926
#include "log_system.h"
3027

3128
namespace simple_renderer {

test/system_test/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626

2727
/// @name 默认大小
2828
/// @{
29-
static constexpr const size_t kWidth = 1920;
30-
static constexpr const size_t kHeight = 1080;
29+
static constexpr const size_t kWidth = 800;
30+
static constexpr const size_t kHeight = 600;
3131
/// @}
3232

3333
static void pixel(size_t x, size_t y, uint32_t color, uint32_t *buffer) {

0 commit comments

Comments
 (0)