Skip to content

Commit 4f96d33

Browse files
authored
Merge pull request #1265 from CesiumGS/zlib-ng-cleanup
Clean up dependencies, especially zlib-ng.
2 parents 6da0610 + 32d275e commit 4f96d33

File tree

4 files changed

+20
-61
lines changed

4 files changed

+20
-61
lines changed

CMakeLists.txt

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -295,44 +295,40 @@ list(APPEND CMAKE_PREFIX_PATH "${PACKAGE_BUILD_DIR}")
295295
# they won't be visible in this scope nor any of the subdirectories for the actual libraries.
296296
#
297297
# However, for some of the vcpkg built libraries where they don't provide a prope cmake config file, we have to declare
298-
# and imporeted library target ourselves. This is the case for modp_b64::modp_b64, picosha2::picosha2 and earcut. In
298+
# an imported library target ourselves. This is the case for modp_b64::modp_b64, picosha2::picosha2 and earcut. In
299299
# these cases, we *do* have the somewhat ugly and verbose details in the extern/CMakeLists.txt file.
300300
#
301301
# XXX Above comment should be obsoleted by these first calls to
302302
# find_package, which resolve to our own modules that provide
303303
# targets. If needed, they can be installed with CMake config files
304304
# etc.
305-
find_package(zlib-ng REQUIRED)
306305
find_package(modp_b64 REQUIRED)
307306

308307
find_package(ada CONFIG REQUIRED)
309308
find_package(Async++ CONFIG REQUIRED)
309+
find_package(blend2d CONFIG REQUIRED)
310310
find_package(doctest CONFIG REQUIRED)
311311
find_package(draco CONFIG REQUIRED)
312312
find_package(expected-lite CONFIG REQUIRED)
313313
find_package(glm CONFIG REQUIRED)
314314
find_package(httplib CONFIG REQUIRED)
315315
find_package(Ktx CONFIG REQUIRED)
316-
find_package(libmorton CONFIG REQUIRED)
317316
find_package(libjpeg-turbo CONFIG REQUIRED)
317+
find_package(libmorton CONFIG REQUIRED)
318318
find_package(meshoptimizer CONFIG REQUIRED)
319319
find_package(OpenSSL REQUIRED)
320320
find_package(s2 CONFIG REQUIRED)
321321
find_package(spdlog CONFIG REQUIRED)
322322
find_package(tinyxml2 CONFIG REQUIRED)
323323
find_package(unofficial-sqlite3 CONFIG REQUIRED)
324324
find_package(WebP CONFIG REQUIRED)
325-
find_package(blend2d CONFIG REQUIRED)
325+
find_package(zlib-ng CONFIG REQUIRED)
326+
326327
# asmjit should not be included with iOS builds as iOS doesn't support JIT compilation.
327328
if(NOT IOS AND NOT VCPKG_CMAKE_SYSTEM_NAME MATCHES "iOS")
328329
find_package(asmjit CONFIG REQUIRED)
329330
endif()
330331

331-
if(NOT CESIUM_DISABLE_CURL)
332-
find_package(CURL REQUIRED)
333-
endif()
334-
335-
336332
if(NOT CESIUM_DISABLE_CURL)
337333
find_package(CURL REQUIRED)
338334
endif()
@@ -386,7 +382,6 @@ if(CESIUM_INSTALL_STATIC_LIBS AND CESIUM_INSTALL_HEADERS)
386382
DESTINATION ${CMAKE_INSTALL_DATADIR}/cesium-native/cmake)
387383

388384
install(FILES
389-
"${CMAKE_CURRENT_LIST_DIR}/cmake/modules/Findzlib-ng.cmake"
390385
"${CMAKE_CURRENT_LIST_DIR}/cmake/modules/Findmodp_b64.cmake"
391386
DESTINATION ${CMAKE_INSTALL_DATADIR}/cesium-native/cmake)
392387

CesiumUtility/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ cesium_target_include_directories(
4141
target_link_libraries(
4242
CesiumUtility
4343
PUBLIC
44-
zlib-ng::zlib-ng
44+
zlib-ng::zlib
4545
spdlog::spdlog
4646
glm::glm
4747
ada::ada

cmake/config/Config.cmake.in

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,35 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
44

55
include(CMakeFindDependencyMacro)
66

7-
find_dependency(zlib-ng REQUIRED)
87
find_dependency(modp_b64 REQUIRED)
98

9+
find_dependency(ada CONFIG REQUIRED)
1010
find_dependency(Async++ CONFIG REQUIRED)
11+
find_dependency(blend2d CONFIG REQUIRED)
1112
find_dependency(doctest CONFIG REQUIRED)
1213
find_dependency(draco CONFIG REQUIRED)
1314
find_dependency(expected-lite CONFIG REQUIRED)
1415
find_dependency(glm CONFIG REQUIRED)
15-
find_dependency(meshoptimizer CONFIG REQUIRED)
1616
find_dependency(httplib CONFIG REQUIRED)
1717
find_dependency(Ktx CONFIG REQUIRED)
18-
find_dependency(libmorton CONFIG REQUIRED)
1918
find_dependency(libjpeg-turbo CONFIG REQUIRED)
19+
find_dependency(libmorton CONFIG REQUIRED)
20+
find_dependency(meshoptimizer CONFIG REQUIRED)
2021
find_dependency(OpenSSL REQUIRED)
2122
find_dependency(s2 CONFIG REQUIRED)
2223
find_dependency(spdlog CONFIG REQUIRED)
2324
find_dependency(tinyxml2 CONFIG REQUIRED)
2425
find_dependency(unofficial-sqlite3 CONFIG REQUIRED)
25-
find_dependency(ada CONFIG REQUIRED)
2626
find_dependency(WebP CONFIG REQUIRED)
27+
find_dependency(zlib-ng CONFIG REQUIRED)
28+
29+
# asmjit should not be included with iOS builds as iOS doesn't support JIT compilation.
30+
if(NOT IOS AND NOT VCPKG_CMAKE_SYSTEM_NAME MATCHES "iOS")
31+
find_dependency(asmjit CONFIG REQUIRED)
32+
endif()
33+
34+
if(NOT CESIUM_DISABLE_CURL)
35+
find_dependency(CURL REQUIRED)
36+
endif()
2737

2838
include("${CMAKE_CURRENT_LIST_DIR}/cesium-nativeTargets.cmake")

cmake/modules/Findzlib-ng.cmake

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)