Skip to content

Commit

Permalink
chore(thirdparty): rename ice and stb_image libraries to avoid possib…
Browse files Browse the repository at this point in the history
…le conflicts
  • Loading branch information
craftablescience committed Jun 17, 2024
1 parent 0bc3a71 commit f078f59
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 11 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ if(SOURCEPP_USE_VTFPP AND NOT TARGET miniz)
endif()


# stb_image
# stb
if(SOURCEPP_USE_VTFPP)
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/thirdparty/stb_image")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/thirdparty/stb")
endif()


Expand Down Expand Up @@ -147,7 +147,7 @@ if(SOURCEPP_USE_VICEPP)
add_pretty_parser(vicepp SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/include/vicepp/vicepp.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/vicepp/vicepp.cpp")
target_link_libraries(vicepp PRIVATE ice)
target_link_libraries(vicepp PRIVATE sourcepp_ice)
endif()


Expand All @@ -169,7 +169,7 @@ if(SOURCEPP_USE_VTFPP)
"${CMAKE_CURRENT_SOURCE_DIR}/include/vtfpp/vtfpp.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/vtfpp/ImageConversion.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/vtfpp/vtfpp.cpp")
target_link_libraries(vtfpp PRIVATE miniz stb_image)
target_link_libraries(vtfpp PRIVATE miniz sourcepp_stb)

# Compressonator
if(MSVC)
Expand Down
3 changes: 0 additions & 3 deletions include/sourcepp/math/Matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ class Matrix {

[[nodiscard]] const P* operator[](uint8_t i) const { return this->data[i]; }

// todo(c++23): convert to operator[]
[[nodiscard]] P operator()(uint8_t i, uint8_t j) const { return this->data[i][j]; }

private:
P data[M][N];
};
Expand Down
4 changes: 2 additions & 2 deletions src/dmxpp/structs/Value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ std::string Attribute::getValue() const {
for (int i = 0; i < 4; i++) {
out += (i == 0 ? '[' : ' ');
for (int j = 0; j < 4; j++) {
out += std::to_string(mat4(i,j));
out += std::to_string(mat4[i][j]);
if (j < 3) {
out += ", ";
} else if (i < 3) {
Expand Down Expand Up @@ -236,7 +236,7 @@ std::string Attribute::getValue() const {
for (int i = 0; i < 4; i++) {
out += (i == 0 ? "" : " ");
for (int j = 0; j < 4; j++) {
out += std::to_string(matrices[m](i,j));
out += std::to_string(matrices[m][i][j]);
if (j < 3) {
out += ", ";
} else if (i < 3) {
Expand Down
2 changes: 1 addition & 1 deletion src/thirdparty/ice/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(ice)
project(sourcepp_ice)
set(CMAKE_CXX_STANDARD 20)

# Create library
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(stb_image)
project(sourcepp_stb)
set(CMAKE_CXX_STANDARD 20)

# Create library
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f078f59

Please sign in to comment.