Skip to content

Commit

Permalink
Local linux build working
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Sep 10, 2024
1 parent 9a9b11d commit 470f6d9
Show file tree
Hide file tree
Showing 19 changed files with 274 additions and 48 deletions.
26 changes: 23 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,14 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCH
-Wconversion
-Wno-missing-field-initializers
-Wno-return-local-addr
-Wno-array-bounds # Ignore false positives in libstdc++ in GCC 13.1.1
-fstrict-aliasing
-fstrict-enums)

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CESIUM_OMNI_CXX_FLAGS ${CESIUM_OMNI_CXX_FLAGS} -Wno-stringop-overflow) # Ignore false positives in libstdc++ in GCC 13.1.1
endif()

if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
set(CESIUM_OMNI_CXX_FLAGS ${CESIUM_OMNI_CXX_FLAGS} -Wno-gnu-anonymous-struct)
endif()
Expand Down Expand Up @@ -393,7 +398,7 @@ endif()

# USD is compiled with the old C++ ABI so we need to compile our own code and external libraries
# with the old ABI. Only relevant for libraries that have std::string or std::list in their
# public interface, which includes cesium-native and cpr.
# public interface, which includes cesium-native and spdlog.
# See https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CESIUM_OMNI_CXX_DEFINES ${CESIUM_OMNI_CXX_DEFINES} _GLIBCXX_USE_CXX11_ABI=0)
Expand All @@ -418,6 +423,21 @@ set(CESIUM_OMNI_LINKER_FLAGS_DEBUG
${CESIUM_OMNI_LINKER_FLAGS_DEBUG}
CACHE STRING "Linker flags to use in debug mode." FORCE)

# vcpkg setup
set(VCPKG_OVERLAY_TRIPLETS "${CMAKE_CURRENT_LIST_DIR}/vcpkg/triplets")

include(${CMAKE_CURRENT_SOURCE_DIR}/extern/cesium-native/cmake/detect-vcpkg-triplet.cmake)

if (NOT VCPKG_TRIPLET)
if (DEFINED ENV{VCPKG_TRIPLET})
set(VCPKG_TRIPLET "$ENV{VCPKG_TRIPLET}")
elseif(DETECTED_VCPKG_TRIPLET_ERROR)
message(FATAL_ERROR "${DETECTED_VCPKG_TRIPLET_ERROR}")
else()
set(VCPKG_TRIPLET "${DETECTED_VCPKG_TRIPLET}-omniverse")
endif()
endif()

# Third party dependencies not handled by conan
add_subdirectory(extern)

Expand All @@ -428,7 +448,7 @@ set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
find_package(Threads) # System threading library

# Conan libraries
find_package(cpr)
find_package(CURL)
find_package(doctest)
find_package(stb)
find_package(ZLIB)
Expand Down Expand Up @@ -465,7 +485,7 @@ endif()

# Generate ThirdParty.json
execute_process(COMMAND "${Python3_EXECUTABLE}" "${SCRIPTS_DIRECTORY}/generate_third_party_license_json.py" --build-dir
"${PROJECT_BINARY_DIR}" --project-dir "${PROJECT_SOURCE_DIR}" --skip "doctest,strawberryperl")
"${PROJECT_BINARY_DIR}" --project-dir "${PROJECT_SOURCE_DIR}" --skip "doctest")

# Copy docs and related resources to exts folder.
execute_process(COMMAND "${Python3_EXECUTABLE}" "${SCRIPTS_DIRECTORY}/copy_to_exts.py")
Expand Down
20 changes: 2 additions & 18 deletions ThirdParty.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@
"version": "0.17.0",
"url": "https://github.com/conan-io/cmake-conan"
},
{
"name": "cpr",
"license": [
"MIT"
],
"version": "1.10.4",
"url": "https://docs.libcpr.org/"
},
{
"name": "glTF-Asset-Generator",
"license": [
Expand All @@ -41,20 +33,12 @@
"version": "8.2.1",
"url": "https://curl.se"
},
{
"name": "nasm",
"license": [
"BSD-2-Clause"
],
"version": "2.15.05",
"url": "http://www.nasm.us"
},
{
"name": "openssl",
"license": [
"OpenSSL"
"Apache-2.0"
],
"version": "1.1.1w",
"version": "3.3.1",
"url": "https://github.com/openssl/openssl"
},
{
Expand Down
10 changes: 2 additions & 8 deletions cmake/AddConanDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@
include(ConfigureConan)

set(REQUIRES
"cpr/1.10.4@#860d6cd6d8eb5f893e647c2fb016eb61"
"doctest/2.4.9@#ea6440e3cd544c9a25bf3a96bcf16f48"
"openssl/1.1.1w@#42c32b02f62aa987a58201f4c4561d3e"
"openssl/3.3.1@#279e86dc2a7dded8c1fe8512e775bdb1"
"pybind11/2.10.1@#561736204506dad955276aaab438aab4"
"stb/cci.20220909@#1c47474f095ef8cd9e4959558525b827"
"zlib/1.2.13@#13c96f538b52e1600c40b88994de240f"
"yaml-cpp/0.7.0@#85b409c274a53d226b71f1bdb9cb4f8b"
"libcurl/8.2.1@#8f62ba7135f5445e5fe6c4bd85143b53"
"nasm/2.15.05@#799d63b1672a337584b09635b0f22fc1")

if(WIN32)
set(REQUIRES ${REQUIRES} "strawberryperl/5.32.1.1@#8f83d05a60363a422f9033e52d106b47")
endif()
"libcurl/8.2.1@#8f62ba7135f5445e5fe6c4bd85143b53")

# cmake-format: off
configure_conan(
Expand Down
113 changes: 110 additions & 3 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,127 @@ add_external_project(
async++
csprng
draco
glm
jpeg
ktx
<<<<<<< Updated upstream
modp_b64
s2geometry
=======
libmodpbase64
<<<<<<< Updated upstream
s2
=======
meshoptimizer
s2
absl_cordz_sample_token
absl_die_if_null
absl_failure_signal_handler
absl_flags_parse
absl_log_flags
absl_log_initialize
absl_periodic_sampler
absl_random_internal_distribution_test_util
absl_scoped_set_env
absl_statusor
absl_bad_any_cast_impl
absl_log_internal_check_op
absl_leak_check
absl_flags_usage
absl_flags_usage_internal
absl_flags_internal
absl_flags_reflection
absl_flags_config
absl_flags_program_name
absl_flags_private_handle_accessor
absl_flags_commandlineflag
absl_flags_commandlineflag_internal
absl_flags_marshalling
absl_log_internal_conditions
absl_log_internal_message
absl_examine_stack
absl_log_internal_nullguard
absl_log_internal_format
absl_log_internal_proto
absl_log_internal_log_sink_set
absl_log_globals
absl_vlog_config_internal
absl_log_internal_fnmatch
absl_log_internal_globals
absl_log_sink
absl_log_entry
absl_raw_hash_set
absl_hash
absl_city
absl_low_level_hash
absl_hashtablez_sampler
absl_random_distributions
absl_random_seed_sequences
absl_random_internal_pool_urbg
absl_random_internal_randen
absl_random_internal_randen_hwaes
absl_random_internal_randen_hwaes_impl
absl_random_internal_randen_slow
absl_random_internal_platform
absl_random_internal_seed_material
absl_random_seed_gen_exception
absl_status
absl_cord
absl_cordz_info
absl_cordz_handle
absl_cordz_functions
absl_exponential_biased
absl_synchronization
absl_graphcycles_internal
absl_kernel_timeout_internal
absl_time
absl_civil_time
absl_time_zone
absl_cord_internal
absl_crc_cord_state
absl_crc32c
absl_crc_internal
absl_crc_cpu_detect
absl_stacktrace
absl_bad_optional_access
absl_str_format_internal
absl_strerror
absl_symbolize
absl_strings
absl_strings_internal
absl_int128
absl_string_view
absl_throw_delegate
absl_debugging_internal
absl_malloc_internal
absl_demangle_internal
absl_base
absl_spinlock_wait
absl_bad_variant_access
absl_raw_logging_internal
absl_log_severity
crypto
ssl
spdlog
fmt
sqlite3
tinyxml2
turbojpeg
uriparser
webp
webpdecoder
turbojpeg
meshoptimizer
sqlite3
webpdemux
webpmux
astcenc-avx2-static
sharpyuv
z-ng
zstd
OPTIONS
CESIUM_TESTS_ENABLED=OFF
CESIUM_COVERAGE_ENABLED=OFF
CESIUM_TRACING_ENABLED=${CESIUM_OMNI_ENABLE_TRACING}
VCPKG_TRIPLET=${VCPKG_TRIPLET}
VCPKG_OVERLAY_TRIPLETS=${VCPKG_OVERLAY_TRIPLETS}
PROJECT_EXTERN_DIRECTORY
"${PROJECT_SOURCE_DIR}/extern"
EXPECTED_DEBUG_POSTFIX "d"
Expand Down
2 changes: 1 addition & 1 deletion extern/cesium-native
Submodule cesium-native updated 130 files
113 changes: 109 additions & 4 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,122 @@ setup_lib(
async++
csprng
draco
glm
jpeg
ktx
<<<<<<< Updated upstream
modp_b64
s2geometry
=======
libmodpbase64
<<<<<<< Updated upstream
s2
=======
meshoptimizer
s2
absl_cordz_sample_token
absl_die_if_null
absl_failure_signal_handler
absl_flags_parse
absl_log_flags
absl_log_initialize
absl_periodic_sampler
absl_random_internal_distribution_test_util
absl_scoped_set_env
absl_statusor
absl_bad_any_cast_impl
absl_log_internal_check_op
absl_leak_check
absl_flags_usage
absl_flags_usage_internal
absl_flags_internal
absl_flags_reflection
absl_flags_config
absl_flags_program_name
absl_flags_private_handle_accessor
absl_flags_commandlineflag
absl_flags_commandlineflag_internal
absl_flags_marshalling
absl_log_internal_conditions
absl_log_internal_message
absl_examine_stack
absl_log_internal_nullguard
absl_log_internal_format
absl_log_internal_proto
absl_log_internal_log_sink_set
absl_log_globals
absl_vlog_config_internal
absl_log_internal_fnmatch
absl_log_internal_globals
absl_log_sink
absl_log_entry
absl_raw_hash_set
absl_hash
absl_city
absl_low_level_hash
absl_hashtablez_sampler
absl_random_distributions
absl_random_seed_sequences
absl_random_internal_pool_urbg
absl_random_internal_randen
absl_random_internal_randen_hwaes
absl_random_internal_randen_hwaes_impl
absl_random_internal_randen_slow
absl_random_internal_platform
absl_random_internal_seed_material
absl_random_seed_gen_exception
absl_status
absl_cord
absl_cordz_info
absl_cordz_handle
absl_cordz_functions
absl_exponential_biased
absl_synchronization
absl_graphcycles_internal
absl_kernel_timeout_internal
absl_time
absl_civil_time
absl_time_zone
absl_cord_internal
absl_crc_cord_state
absl_crc32c
absl_crc_internal
absl_crc_cpu_detect
absl_stacktrace
absl_bad_optional_access
absl_str_format_internal
absl_strerror
absl_symbolize
absl_strings
absl_strings_internal
absl_int128
absl_string_view
absl_throw_delegate
absl_debugging_internal
absl_malloc_internal
absl_demangle_internal
absl_base
absl_spinlock_wait
absl_bad_variant_access
absl_raw_logging_internal
absl_log_severity
crypto
ssl
spdlog
fmt
sqlite3
tinyxml2
turbojpeg
uriparser
webp
webpdecoder
turbojpeg
meshoptimizer
sqlite3
cpr::cpr
webpdemux
webpmux
astcenc-avx2-static
sharpyuv
z-ng
zstd
CURL::libcurl
stb::stb
ZLIB::ZLIB
fabric
Expand Down
2 changes: 1 addition & 1 deletion src/core/src/FabricGeometryPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "cesium/omniverse/FabricVertexAttributeDescriptor.h"
#include "cesium/omniverse/GltfUtil.h"

#include <spdlog/fmt/fmt.h>
#include <fmt/format.h>

namespace cesium::omniverse {

Expand Down
Loading

0 comments on commit 470f6d9

Please sign in to comment.