Skip to content

Commit 63394d8

Browse files
committed
Try to find stb before adding it explicitly
1 parent f325c67 commit 63394d8

File tree

11 files changed

+14
-11
lines changed

11 files changed

+14
-11
lines changed

deps/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,8 @@ endif()
3939

4040
## stb
4141
if(NOT TARGET stb)
42-
add_subdirectory(stb)
42+
find_package(stb)
43+
if (NOT ${stb_FOUND})
44+
add_subdirectory(stb)
45+
endif()
4346
endif()

examples/demo-app/demo_app.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#include "glm/gtx/string_cast.hpp"
3333

34-
#include "stb_image.h"
34+
#include <stb_image.h>
3535

3636

3737
bool endsWith(const std::string& str, const std::string& suffix) {

src/polyscope.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "polyscope/utilities.h"
1717
#include "polyscope/view.h"
1818

19-
#include "stb_image.h"
19+
#include <stb_image.h>
2020

2121
#include "nlohmann/json.hpp"
2222
using json = nlohmann::json;

src/render/engine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "polyscope/render/material_defs.h"
99

1010
#include "imgui.h"
11-
#include "stb_image.h"
11+
#include <stb_image.h>
1212

1313
namespace polyscope {
1414

src/render/ground_plane.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "polyscope/render/material_defs.h"
88

99
#include "imgui.h"
10-
#include "stb_image.h"
10+
#include <stb_image.h>
1111

1212
namespace polyscope {
1313
namespace render {

src/render/materials.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "imgui.h"
1010

11-
#include "stb_image.h"
11+
#include <stb_image.h>
1212

1313
namespace polyscope {
1414
namespace render {

src/render/mock_opengl/mock_gl_engine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "polyscope/render/opengl/shaders/volume_mesh_shaders.h"
2828

2929

30-
#include "stb_image.h"
30+
#include <stb_image.h>
3131

3232
namespace polyscope {
3333
namespace render {

src/render/opengl/gl_engine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "polyscope/render/opengl/shaders/vector_shaders.h"
2929
#include "polyscope/render/opengl/shaders/volume_mesh_shaders.h"
3030

31-
#include "stb_image.h"
31+
#include <stb_image.h>
3232

3333
#include <algorithm>
3434
#include <set>

src/render/opengl/gl_engine_egl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "backends/imgui_impl_opengl3.h"
1010
#include "polyscope/render/engine.h"
1111

12-
#include "stb_image.h"
12+
#include <stb_image.h>
1313

1414
#include <algorithm>
1515
#include <cctype>

src/render/opengl/gl_engine_glfw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "polyscope/polyscope.h"
99
#include "polyscope/render/engine.h"
1010

11-
#include "stb_image.h"
11+
#include <stb_image.h>
1212

1313
#include <algorithm>
1414
#include <set>

0 commit comments

Comments
 (0)