2021-02-17 10:53:54 +08:00
|
|
|
cmake_minimum_required(VERSION 3.15)
|
2024-02-23 11:56:52 +08:00
|
|
|
|
2024-06-06 18:57:11 +08:00
|
|
|
if (NOT VCPKG_LIBRARY_LINKAGE)
|
|
|
|
|
set(VCPKG_LIBRARY_LINKAGE static)
|
|
|
|
|
endif()
|
2024-02-23 11:56:52 +08:00
|
|
|
|
2024-11-17 22:40:54 +08:00
|
|
|
option(CESIUM_USE_EZVCPKG "use ezvcpkg helper" OFF)
|
|
|
|
|
|
|
|
|
|
if(CESIUM_USE_EZVCPKG)
|
2024-08-24 00:37:16 +08:00
|
|
|
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/ezvcpkg/ezvcpkg.cmake)
|
|
|
|
|
endif()
|
|
|
|
|
|
2024-06-13 05:56:31 +08:00
|
|
|
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/detect-vcpkg-triplet.cmake)
|
2024-02-23 11:56:52 +08:00
|
|
|
|
2024-06-06 18:57:11 +08:00
|
|
|
if (NOT VCPKG_TRIPLET)
|
2024-06-13 05:56:31 +08:00
|
|
|
if (DEFINED ENV{VCPKG_TRIPLET})
|
|
|
|
|
set(VCPKG_TRIPLET "$ENV{VCPKG_TRIPLET}")
|
|
|
|
|
elseif(DETECTED_VCPKG_TRIPLET_ERROR)
|
|
|
|
|
message(FATAL_ERROR "${DETECTED_VCPKG_TRIPLET_ERROR}")
|
|
|
|
|
elseif(DETECTED_VCPKG_TRIPLET STREQUAL "x64-windows")
|
|
|
|
|
# cesium-native requires static linking on Windows
|
2024-06-06 18:57:11 +08:00
|
|
|
set(VCPKG_TRIPLET "x64-windows-static-md")
|
2024-06-07 15:32:12 +08:00
|
|
|
else()
|
2024-06-13 05:56:31 +08:00
|
|
|
set(VCPKG_TRIPLET "${DETECTED_VCPKG_TRIPLET}")
|
2024-06-06 18:57:11 +08:00
|
|
|
endif()
|
2024-02-23 11:56:52 +08:00
|
|
|
endif()
|
|
|
|
|
|
2024-06-13 05:56:31 +08:00
|
|
|
message(STATUS "VCPKG_TRIPLET ${VCPKG_TRIPLET}")
|
2024-02-23 11:56:52 +08:00
|
|
|
|
2024-09-11 03:25:01 +08:00
|
|
|
if (NOT VCPKG_OVERLAY_PORTS)
|
|
|
|
|
if (DEFINED ENV{VCPKG_OVERLAY_PORTS})
|
|
|
|
|
set(VCPKG_OVERLAY_PORTS "$ENV{VCPKG_OVERLAY_PORTS}")
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
message(STATUS "VCPKG_OVERLAY_PORTS ${VCPKG_OVERLAY_PORTS}")
|
|
|
|
|
|
|
|
|
|
if (NOT VCPKG_OVERLAY_TRIPLETS)
|
|
|
|
|
if (DEFINED ENV{VCPKG_OVERLAY_TRIPLETS})
|
|
|
|
|
set(VCPKG_OVERLAY_TRIPLETS "$ENV{VCPKG_OVERLAY_TRIPLETS}")
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
message(STATUS "VCPKG_OVERLAY_TRIPLETS ${VCPKG_OVERLAY_TRIPLETS}")
|
|
|
|
|
|
2024-02-23 11:56:52 +08:00
|
|
|
# These packages are used in the public headers of Cesium libraries, so we need to distribute the headers and binaries
|
|
|
|
|
# with the installation
|
|
|
|
|
# Note that fmt is a public dependency of the vcpkg version of spdlog
|
2024-06-06 18:57:11 +08:00
|
|
|
# STB and uriparser aren't technically part of the public interface, but they're used by the downstream Cesium for Unreal project
|
2024-11-06 12:16:03 +08:00
|
|
|
set(PACKAGES_PUBLIC asyncplusplus expected-lite fmt glm rapidjson spdlog stb uriparser)
|
2024-08-24 00:52:37 +08:00
|
|
|
# These packages are used in the code and produce binaries, but are not part of the public interface. Therefore we need
|
|
|
|
|
# to distribute the binaries for linking, but not the headers, as downstream consumers don't need them
|
|
|
|
|
# OpenSSL and abseil are both dependencies of s2geometry
|
2024-02-23 11:56:52 +08:00
|
|
|
set(PACKAGES_PRIVATE
|
2024-06-11 06:12:36 +08:00
|
|
|
abseil draco ktx modp-base64 meshoptimizer openssl s2geometry
|
2024-06-06 18:57:11 +08:00
|
|
|
libjpeg-turbo sqlite3 tinyxml2 libwebp zlib-ng picosha2
|
|
|
|
|
earcut-hpp cpp-httplib[core] libmorton zstd
|
2024-02-23 11:56:52 +08:00
|
|
|
)
|
|
|
|
|
|
2024-08-24 00:52:37 +08:00
|
|
|
# Packages only used for testing
|
2024-02-23 11:56:52 +08:00
|
|
|
set(PACKAGES_TEST catch2)
|
|
|
|
|
|
2024-11-17 22:40:54 +08:00
|
|
|
if(CESIUM_USE_EZVCPKG)
|
2024-08-24 05:56:54 +08:00
|
|
|
set(PACKAGES_ALL ${PACKAGES_PUBLIC})
|
|
|
|
|
list(APPEND PACKAGES_ALL ${PACKAGES_PRIVATE})
|
|
|
|
|
list(APPEND PACKAGES_ALL ${PACKAGES_TEST})
|
|
|
|
|
|
|
|
|
|
ezvcpkg_fetch(
|
2024-11-21 00:26:05 +08:00
|
|
|
COMMIT 2024.11.16
|
2024-08-24 05:56:54 +08:00
|
|
|
PACKAGES ${PACKAGES_ALL}
|
|
|
|
|
# Clean the build trees after building, so that we don't use a ton a disk space on the CI cache
|
|
|
|
|
CLEAN_BUILDTREES
|
|
|
|
|
# Update the cmake toolchain so it can find the above packages
|
|
|
|
|
UPDATE_TOOLCHAIN
|
|
|
|
|
# Force the installation of each package one at a time, or the Travis CI build will time out waiting for output
|
|
|
|
|
SERIALIZE
|
|
|
|
|
)
|
2024-08-24 00:31:11 +08:00
|
|
|
endif()
|
2024-02-23 11:56:52 +08:00
|
|
|
|
|
|
|
|
if (NOT CMAKE_TOOLCHAIN_FILE)
|
|
|
|
|
message(FATAL_ERROR "Specify the VCPKG toolchain on the command line as '-DCMAKE_TOOLCHAIN_FILE=<VCPKG_ROOT>/scripts/buildsystems/vcpkg.cmake'")
|
|
|
|
|
else()
|
|
|
|
|
message(STATUS "CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE}")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Set defaults that should be set BEFORE compiler / IDE detection
|
|
|
|
|
include("cmake/defaults.cmake")
|
2021-02-17 10:53:54 +08:00
|
|
|
|
2021-03-03 03:22:02 +08:00
|
|
|
project(cesium-native
|
2024-12-02 04:29:07 +08:00
|
|
|
VERSION 0.42.0
|
2021-11-22 16:10:23 +08:00
|
|
|
LANGUAGES CXX C
|
2021-02-17 10:53:54 +08:00
|
|
|
)
|
|
|
|
|
|
2024-06-06 18:57:11 +08:00
|
|
|
include(GNUInstallDirs)
|
2024-11-23 00:13:26 +08:00
|
|
|
include(CMakeDependentOption)
|
2024-06-06 18:57:11 +08:00
|
|
|
|
2024-08-24 05:56:54 +08:00
|
|
|
set(PACKAGE_BASE_DIR "${EZVCPKG_PACKAGES_DIR}")
|
2024-08-24 01:31:21 +08:00
|
|
|
set(PACKAGE_BUILD_DIR "${EZVCPKG_DIR}")
|
|
|
|
|
|
2024-11-17 22:40:54 +08:00
|
|
|
if(NOT EZVCPKG_PACKAGES_DIR)
|
2024-08-24 05:56:54 +08:00
|
|
|
set(PACKAGE_BUILD_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TRIPLET}/")
|
|
|
|
|
set(PACKAGE_BASE_DIR "$ENV{VCPKG_ROOT}/packages")
|
2024-08-24 00:31:11 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
message(STATUS "PACKAGE_BASE_DIR ${PACKAGE_BASE_DIR}")
|
2024-08-24 05:56:54 +08:00
|
|
|
message(STATUS "PACKAGE_BUILD_DIR ${PACKAGE_BUILD_DIR}")
|
|
|
|
|
|
2024-08-24 00:31:11 +08:00
|
|
|
|
2024-08-08 11:50:43 +08:00
|
|
|
option(CESIUM_INSTALL_STATIC_LIBS "Whether to install the static libraries of cesium-native and its dependencies." ON)
|
|
|
|
|
option(CESIUM_INSTALL_HEADERS "Whether to install the header files of cesium-native and its public dependencies." ON)
|
2024-11-20 04:27:39 +08:00
|
|
|
option(CESIUM_ENABLE_CLANG_TIDY "Enable clang-tidy targets for static code analysis." ON)
|
|
|
|
|
|
|
|
|
|
cmake_dependent_option(
|
|
|
|
|
CESIUM_ENABLE_CLANG_TIDY_ON_BUILD
|
|
|
|
|
"Run clang-tidy while building. Will slow down the build process. Available only if CESIUM_ENABLE_CLANG_TIDY is ON."
|
|
|
|
|
OFF
|
|
|
|
|
CESIUM_ENABLE_CLANG_TIDY
|
|
|
|
|
OFF
|
|
|
|
|
)
|
2024-08-08 11:50:43 +08:00
|
|
|
|
2024-11-17 22:40:54 +08:00
|
|
|
if(CESIUM_INSTALL_STATIC_LIBS OR CESIUM_INSTALL_HEADERS AND EZVCPKG_PACKAGES_DIR)
|
2024-08-08 11:50:43 +08:00
|
|
|
foreach(PACKAGE ${PACKAGES_PUBLIC})
|
|
|
|
|
string(REGEX REPLACE "\[.*\]" "" PACKAGE ${PACKAGE})
|
2024-08-24 00:52:37 +08:00
|
|
|
set(PACKAGE_DIR ${PACKAGE_BASE_DIR}/${PACKAGE}_${VCPKG_TRIPLET})
|
2024-08-08 11:50:43 +08:00
|
|
|
message(DEBUG "PACKAGE_DIR ${PACKAGE_DIR}")
|
|
|
|
|
|
2024-08-16 12:54:09 +08:00
|
|
|
if(CESIUM_INSTALL_HEADERS AND NOT PACKAGE IN_LIST CESIUM_EXCLUDE_INSTALL_HEADERS)
|
2024-08-08 11:50:43 +08:00
|
|
|
install(
|
|
|
|
|
DIRECTORY ${PACKAGE_DIR}/include/
|
|
|
|
|
TYPE INCLUDE
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
2024-08-16 12:54:09 +08:00
|
|
|
if (CESIUM_INSTALL_STATIC_LIBS AND NOT PACKAGE IN_LIST CESIUM_EXCLUDE_INSTALL_STATIC_LIBS AND EXISTS ${PACKAGE_DIR}/lib)
|
2024-08-08 11:50:43 +08:00
|
|
|
install(
|
2024-10-07 09:16:19 +08:00
|
|
|
DIRECTORY $<IF:$<CONFIG:Debug>,${PACKAGE_DIR}/debug/lib/,${PACKAGE_DIR}/lib/>
|
2024-08-08 11:50:43 +08:00
|
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
endforeach()
|
|
|
|
|
endif()
|
|
|
|
|
|
2024-11-13 06:57:03 +08:00
|
|
|
if(CESIUM_INSTALL_STATIC_LIBS AND NOT VCPKG_MANIFEST_MODE)
|
2024-08-08 11:50:43 +08:00
|
|
|
foreach(PACKAGE ${PACKAGES_PRIVATE})
|
2024-08-24 00:52:37 +08:00
|
|
|
set(PACKAGE_DIR ${PACKAGE_BASE_DIR}/${PACKAGE}_${VCPKG_TRIPLET})
|
2024-08-08 11:50:43 +08:00
|
|
|
message(DEBUG "PACKAGE_DIR ${PACKAGE_DIR}")
|
2024-08-16 12:54:09 +08:00
|
|
|
if (NOT PACKAGE IN_LIST CESIUM_EXCLUDE_INSTALL_STATIC_LIBS AND EXISTS ${PACKAGE_DIR}/lib)
|
2024-08-08 11:50:43 +08:00
|
|
|
install(
|
2024-10-07 09:16:19 +08:00
|
|
|
DIRECTORY $<IF:$<CONFIG:Debug>,${PACKAGE_DIR}/debug/lib/,${PACKAGE_DIR}/lib/>
|
2024-08-08 11:50:43 +08:00
|
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
endforeach()
|
|
|
|
|
endif()
|
2024-02-23 11:56:52 +08:00
|
|
|
|
2024-02-22 03:07:56 +08:00
|
|
|
if(NOT DEFINED CMAKE_C_COMPILER_LAUNCHER AND NOT DEFINED CMAKE_CXX_COMPILER_LAUNCHER)
|
|
|
|
|
find_program(CCACHE_FOUND ccache)
|
|
|
|
|
find_program(SCCACHE_FOUND sccache)
|
|
|
|
|
if (SCCACHE_FOUND)
|
|
|
|
|
message("setting SCCACHE to ${SCCACHE_FOUND}")
|
|
|
|
|
set(CMAKE_C_COMPILER_LAUNCHER ${SCCACHE_FOUND})
|
|
|
|
|
set(CMAKE_CXX_COMPILER_LAUNCHER ${SCCACHE_FOUND})
|
|
|
|
|
elseif(CCACHE_FOUND)
|
|
|
|
|
message("setting CCACHE to ${CCACHE_FOUND}")
|
|
|
|
|
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_FOUND})
|
|
|
|
|
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_FOUND})
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# ccache/sccache only works with /Z7, not /Zi, so tweak the Debug and RelWithDebInfo build flags in the presence of a compiler cache
|
|
|
|
|
if(MSVC AND (DEFINED CMAKE_C_COMPILER_LAUNCHER))
|
|
|
|
|
message(DEBUG "Setting MSVC flags to /Z7 for ccache compatibility. Current flags: ${CMAKE_CXX_FLAGS_DEBUG}")
|
|
|
|
|
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
|
|
|
|
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
|
|
|
|
|
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
|
|
|
|
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
|
|
|
|
message(DEBUG "New flags: ${CMAKE_CXX_FLAGS_DEBUG}")
|
|
|
|
|
endif()
|
|
|
|
|
|
2021-06-22 15:19:33 +08:00
|
|
|
option(CESIUM_TRACING_ENABLED "Whether to enable the Cesium performance tracing framework (CESIUM_TRACE_* macros)." OFF)
|
2021-07-24 03:13:27 +08:00
|
|
|
option(CESIUM_COVERAGE_ENABLED "Whether to enable code coverage" OFF)
|
2021-12-28 02:13:22 +08:00
|
|
|
option(CESIUM_TESTS_ENABLED "Whether to enable tests" ON)
|
2023-07-26 22:17:11 +08:00
|
|
|
option(CESIUM_GLM_STRICT_ENABLED "Whether to force strict GLM compile definitions." ON)
|
2024-06-15 03:33:47 +08:00
|
|
|
option(CESIUM_DISABLE_DEFAULT_ELLIPSOID "Whether to disable the WGS84 default value for ellipsoid parameters across cesium-native." OFF)
|
2024-06-12 03:58:43 +08:00
|
|
|
option(CESIUM_MSVC_STATIC_RUNTIME_ENABLED "Whether to enable static linking for MSVC runtimes" OFF)
|
|
|
|
|
|
|
|
|
|
if (CESIUM_MSVC_STATIC_RUNTIME_ENABLED)
|
|
|
|
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
|
|
|
|
endif()
|
2021-06-22 15:19:33 +08:00
|
|
|
|
|
|
|
|
if (CESIUM_TRACING_ENABLED)
|
|
|
|
|
add_compile_definitions(CESIUM_TRACING_ENABLED=1)
|
|
|
|
|
endif()
|
2021-05-27 14:19:38 +08:00
|
|
|
|
2024-02-23 11:56:52 +08:00
|
|
|
# Set defaults that need to be set AFTER compiler / IDE detection
|
|
|
|
|
include("cmake/compiler.cmake")
|
2024-02-23 06:08:15 +08:00
|
|
|
|
2024-11-20 04:27:39 +08:00
|
|
|
if(CESIUM_ENABLE_CLANG_TIDY)
|
|
|
|
|
setup_clang_tidy(
|
|
|
|
|
PROJECT_BUILD_DIRECTORY
|
|
|
|
|
"${PROJECT_BINARY_DIR}"
|
|
|
|
|
PROJECT_SOURCE_DIRECTORIES
|
|
|
|
|
"${PROJECT_SOURCE_DIR}"
|
|
|
|
|
ENABLE_CLANG_TIDY_ON_BUILD
|
|
|
|
|
${CESIUM_ENABLE_CLANG_TIDY_ON_BUILD}
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
2024-02-23 11:56:52 +08:00
|
|
|
# Add Modules
|
2024-11-17 17:56:29 +08:00
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules")
|
2024-02-23 11:56:52 +08:00
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/extern/cmake-modules/")
|
2021-07-24 02:58:16 +08:00
|
|
|
if (CESIUM_COVERAGE_ENABLED AND NOT MSVC)
|
2021-03-04 03:56:05 +08:00
|
|
|
include(CodeCoverage)
|
|
|
|
|
append_coverage_compiler_flags()
|
|
|
|
|
setup_target_for_coverage_gcovr_html(
|
|
|
|
|
NAME cesium-native-tests-coverage
|
|
|
|
|
EXECUTABLE ctest -j ${PROCESSOR_COUNT}
|
|
|
|
|
EXCLUDE "${PROJECT_SOURCE_DIR}/extern/*" "${PROJECT_BINARY_DIR}"
|
|
|
|
|
DEPENDENCIES cesium-native-tests
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
2021-03-03 03:22:02 +08:00
|
|
|
if (NOT DEFINED GLOB_USE_CONFIGURE_DEPENDS)
|
|
|
|
|
set(GLOB_USE_CONFIGURE_DEPENDS OFF CACHE BOOL
|
|
|
|
|
"Controls if cesium-native targets should use configure_depends or not for globbing their sources"
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
2024-02-23 11:56:52 +08:00
|
|
|
# On the CI builds, I have to do this explicitly for some reason or it fails to find the vcpkg packages.
|
|
|
|
|
# The toolchain is supposed to manage this, but I haven't figured out why it isn't yet.
|
2024-08-24 00:52:37 +08:00
|
|
|
|
|
|
|
|
list(APPEND CMAKE_PREFIX_PATH "${PACKAGE_BUILD_DIR}/share/s2")
|
|
|
|
|
list(APPEND CMAKE_PREFIX_PATH "${PACKAGE_BUILD_DIR}/share")
|
|
|
|
|
list(APPEND CMAKE_PREFIX_PATH "${PACKAGE_BUILD_DIR}")
|
|
|
|
|
|
2024-02-23 11:56:52 +08:00
|
|
|
# Find the VCPKG dependnecies
|
|
|
|
|
# Note that while we could push these into the extern/CMakeLists.txt as an organization tidy-up, that would require
|
|
|
|
|
# us to update the minimum version of CMake to 3.24 and to add the GLOBAL option to the find_package calls, otherwise
|
|
|
|
|
# they won't be visible in this scope nor any of the subdirectories for the actual libraries.
|
|
|
|
|
#
|
|
|
|
|
# However, for some of the vcpkg built libraries where they don't provide a prope cmake config file, we have to declare
|
|
|
|
|
# and imporeted library target ourselves. This is the case for modp_b64::modp_b64, picosha2::picosha2 and earcut. In
|
|
|
|
|
# these cases, we *do* have the somewhat ugly and verbose details in the extern/CMakeLists.txt file.
|
2024-11-17 17:56:29 +08:00
|
|
|
#
|
|
|
|
|
# XXX Above comment should be obsoleted by these first calls to
|
|
|
|
|
# find_package, which resolve to our own modules that provide
|
|
|
|
|
# targets. If needed, they can be installed with CMake config files
|
|
|
|
|
# etc.
|
|
|
|
|
find_package(zlib-ng REQUIRED)
|
2024-11-18 22:26:57 +08:00
|
|
|
find_package(modp_b64 REQUIRED)
|
2024-11-17 17:56:29 +08:00
|
|
|
|
2024-02-23 11:56:52 +08:00
|
|
|
find_package(Async++ CONFIG REQUIRED)
|
|
|
|
|
find_package(Catch2 CONFIG REQUIRED)
|
|
|
|
|
find_package(draco CONFIG REQUIRED)
|
|
|
|
|
find_package(expected-lite CONFIG REQUIRED)
|
|
|
|
|
find_package(glm CONFIG REQUIRED)
|
|
|
|
|
find_package(meshoptimizer CONFIG REQUIRED)
|
|
|
|
|
find_package(httplib CONFIG REQUIRED)
|
|
|
|
|
find_package(Ktx CONFIG REQUIRED)
|
|
|
|
|
find_package(libmorton CONFIG REQUIRED)
|
|
|
|
|
find_package(libjpeg-turbo CONFIG REQUIRED)
|
2024-07-03 09:01:13 +08:00
|
|
|
find_package(OpenSSL REQUIRED)
|
2024-02-23 11:56:52 +08:00
|
|
|
find_package(s2 CONFIG REQUIRED)
|
|
|
|
|
find_package(spdlog CONFIG REQUIRED)
|
|
|
|
|
find_package(tinyxml2 CONFIG REQUIRED)
|
|
|
|
|
find_package(unofficial-sqlite3 CONFIG REQUIRED)
|
|
|
|
|
find_package(uriparser CONFIG REQUIRED char wchar_t)
|
|
|
|
|
find_package(WebP CONFIG REQUIRED)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Private Library (s2geometry)
|
2021-03-05 05:09:53 +08:00
|
|
|
add_subdirectory(extern EXCLUDE_FROM_ALL)
|
2021-02-17 10:53:54 +08:00
|
|
|
|
2021-03-03 03:22:02 +08:00
|
|
|
# Public Targets
|
2021-02-17 10:53:54 +08:00
|
|
|
add_subdirectory(CesiumUtility)
|
2021-03-03 03:22:02 +08:00
|
|
|
add_subdirectory(CesiumGltf)
|
2021-02-17 10:53:54 +08:00
|
|
|
add_subdirectory(CesiumGeometry)
|
|
|
|
|
add_subdirectory(CesiumGeospatial)
|
2021-04-13 20:05:36 +08:00
|
|
|
add_subdirectory(CesiumJsonReader)
|
2021-07-09 00:47:13 +08:00
|
|
|
add_subdirectory(CesiumJsonWriter)
|
2023-11-15 14:20:08 +08:00
|
|
|
add_subdirectory(CesiumGltfContent)
|
2021-02-17 10:53:54 +08:00
|
|
|
add_subdirectory(CesiumGltfReader)
|
2021-12-03 06:45:48 +08:00
|
|
|
add_subdirectory(CesiumGltfWriter)
|
2021-02-17 10:53:54 +08:00
|
|
|
add_subdirectory(CesiumAsync)
|
2021-10-11 06:14:37 +08:00
|
|
|
add_subdirectory(Cesium3DTiles)
|
2021-10-11 07:36:26 +08:00
|
|
|
add_subdirectory(Cesium3DTilesReader)
|
2021-12-03 08:49:20 +08:00
|
|
|
add_subdirectory(Cesium3DTilesWriter)
|
2023-11-02 14:41:09 +08:00
|
|
|
add_subdirectory(Cesium3DTilesContent)
|
2023-11-14 15:29:47 +08:00
|
|
|
add_subdirectory(CesiumRasterOverlays)
|
2021-07-15 21:33:29 +08:00
|
|
|
add_subdirectory(Cesium3DTilesSelection)
|
2021-03-03 03:22:02 +08:00
|
|
|
add_subdirectory(CesiumIonClient)
|
2024-04-10 12:07:11 +08:00
|
|
|
add_subdirectory(CesiumQuantizedMeshTerrain)
|
2021-02-17 10:53:54 +08:00
|
|
|
|
2021-03-03 03:22:02 +08:00
|
|
|
# Private Targets
|
2021-12-28 02:13:22 +08:00
|
|
|
if (CESIUM_TESTS_ENABLED)
|
|
|
|
|
# enable_testing() MUST be called before add_subdirectory or no tests
|
|
|
|
|
# will be found by ctest
|
|
|
|
|
enable_testing()
|
|
|
|
|
add_subdirectory(CesiumNativeTests)
|
|
|
|
|
endif()
|
|
|
|
|
|
2024-02-23 06:08:15 +08:00
|
|
|
|
2024-02-23 11:56:52 +08:00
|
|
|
add_subdirectory(doc)
|
2024-11-07 07:46:12 +08:00
|
|
|
|
2024-11-18 00:25:30 +08:00
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
|
|
2024-11-07 07:46:12 +08:00
|
|
|
install(EXPORT CesiumExports
|
|
|
|
|
FILE cesium-nativeTargets.cmake
|
|
|
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cesium-native)
|
|
|
|
|
|
2024-11-18 00:25:30 +08:00
|
|
|
install(FILES
|
|
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/cmake/modules/Findzlib-ng.cmake"
|
2024-11-18 22:26:57 +08:00
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/cmake/modules/Findmodp_b64.cmake"
|
2024-11-18 00:25:30 +08:00
|
|
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/cesium-native")
|
2024-11-07 07:46:12 +08:00
|
|
|
|
2024-11-18 00:25:30 +08:00
|
|
|
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config/Config.cmake.in
|
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/cesium-nativeConfig.cmake"
|
|
|
|
|
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/cesium-native")
|
|
|
|
|
|
|
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cesium-nativeConfig.cmake
|
|
|
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cesium-native)
|