Skip to content

Commit

Permalink
Merge pull request #860 from CesiumGS/build-tweaks
Browse files Browse the repository at this point in the history
Improvements to the build process
  • Loading branch information
lilleyse authored Apr 15, 2024
2 parents f058520 + a3237c9 commit 46c8b9e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ endif()
install(TARGETS GSL)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/extern/GSL/include/gsl TYPE INCLUDE)

# ktx_read's PUBLIC_HEADER has paths relative to its own directory, so the install line below will fail.
# ktx's PUBLIC_HEADER has paths relative to its own directory, so the install line below will fail.
# We could fix that, but we don't need the KTX public headers installed anyway (they should be considered
# private to cesium-native), so just set the PUBLIC_HEADER to an empty string.
set_target_properties(ktx_read PROPERTIES PUBLIC_HEADER "")
install(TARGETS ktx_read)
set_target_properties(ktx PROPERTIES PUBLIC_HEADER "")
install(TARGETS ktx)

install(TARGETS webpdecoder)

Expand Down
5 changes: 2 additions & 3 deletions CesiumGltfContent/src/ImageManipulation.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#include <CesiumGltf/ImageCesium.h>
#include <CesiumGltfContent/ImageManipulation.h>

#include <stb_image_resize.h>

#include <cassert>
#include <cstring>

#define STB_IMAGE_RESIZE_IMPLEMENTATION
#include <stb_image_resize.h>
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include <stb_image_write.h>

Expand Down
2 changes: 1 addition & 1 deletion CesiumGltfReader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ target_link_libraries(CesiumGltfReader
modp_b64
${CESIUM_NATIVE_DRACO_LIBRARY}
PRIVATE
ktx_read
ktx
webp
webpdecoder
turbojpeg
Expand Down
1 change: 1 addition & 0 deletions CesiumGltfReader/src/GltfReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <string>

#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_RESIZE_IMPLEMENTATION
#define STBI_FAILURE_USERMSG
#include <stb_image.h>
#include <stb_image_resize.h>
Expand Down
1 change: 1 addition & 0 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ if(IOS)
set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "12.0" CACHE STRING "iOS Deployment Target")
endif()

set(KTX_FEATURE_TOOLS off)
add_subdirectory(KTX-Software)

option(WEBP_BUILD_ANIM_UTILS "" off)
Expand Down
2 changes: 1 addition & 1 deletion extern/KTX-Software
Submodule KTX-Software updated 1732 files

0 comments on commit 46c8b9e

Please sign in to comment.