Skip to content

Commit

Permalink
Local windows build in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Sep 11, 2024
1 parent 5648d72 commit 68c50c8
Show file tree
Hide file tree
Showing 3 changed files with 298 additions and 55 deletions.
168 changes: 143 additions & 25 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,120 @@
include(Macros)

# cmake-format: off
add_external_project(
PROJECT_NAME
cesium-native
LIBRARIES
Cesium3DTilesSelection
Cesium3DTilesReader
Cesium3DTilesContent
CesiumRasterOverlays
CesiumGltfReader
CesiumGltfContent
CesiumGltf
CesiumQuantizedMeshTerrain
CesiumJsonReader
CesiumGeospatial
CesiumGeometry
CesiumIonClient
CesiumAsync
CesiumUtility
if(MSVC)
set(CESIUM_NATIVE_DEPENDENCIES
async++
draco
glm
jpeg
ktx
libmodpbase64
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
libcrypto
libssl
spdlog
fmt
sqlite3
tinyxml2
turbojpeg
uriparser
libwebp
libwebpdecoder
libwebpdemux
libwebpmux
astcenc-avx2-static
libsharpyuv
zlibstatic-ng
zstd)
else()
set(CESIUM_NATIVE_DEPENDENCIES
async++
csprng
draco
glm
jpeg
Expand Down Expand Up @@ -129,7 +223,29 @@ add_external_project(
astcenc-avx2-static
sharpyuv
z-ng
zstd
zstd)
endif()

# cmake-format: off
add_external_project(
PROJECT_NAME
cesium-native
LIBRARIES
Cesium3DTilesSelection
Cesium3DTilesReader
Cesium3DTilesContent
CesiumRasterOverlays
CesiumGltfReader
CesiumGltfContent
CesiumGltf
CesiumQuantizedMeshTerrain
CesiumJsonReader
CesiumGeospatial
CesiumGeometry
CesiumIonClient
CesiumAsync
CesiumUtility
${CESIUM_NATIVE_DEPENDENCIES}
OPTIONS
CESIUM_TESTS_ENABLED=OFF
CESIUM_COVERAGE_ENABLED=OFF
Expand All @@ -138,12 +254,12 @@ add_external_project(
VCPKG_OVERLAY_TRIPLETS=${VCPKG_OVERLAY_TRIPLETS}
PROJECT_EXTERN_DIRECTORY
"${PROJECT_SOURCE_DIR}/extern"
EXPECTED_DEBUG_POSTFIX "d"
)
# cmake-format: on

if(NOT ${USE_NVIDIA_RELEASE_LIBRARIES})
execute_process(COMMAND "${Python3_EXECUTABLE}" "${SCRIPTS_DIRECTORY}/copy_from_dir.py" "*.user.xml" "${PROJECT_SOURCE_DIR}/extern/nvidia/debug-deps" "${PROJECT_SOURCE_DIR}/extern/nvidia/deps")
execute_process(COMMAND "${Python3_EXECUTABLE}" "${SCRIPTS_DIRECTORY}/copy_from_dir.py" "*.user.xml"
"${PROJECT_SOURCE_DIR}/extern/nvidia/debug-deps" "${PROJECT_SOURCE_DIR}/extern/nvidia/deps")
endif()

if(WIN32)
Expand All @@ -155,9 +271,11 @@ else()
endif()

if(UNIX)
execute_process(COMMAND bash -c "${PROJECT_SOURCE_DIR}/extern/nvidia/build.sh --platform ${NVIDIA_PLATFORM_NAME}" RESULT_VARIABLE exit_code)
execute_process(COMMAND bash -c "${PROJECT_SOURCE_DIR}/extern/nvidia/build.sh --platform ${NVIDIA_PLATFORM_NAME}"
RESULT_VARIABLE exit_code)
elseif(WIN32)
execute_process(COMMAND cmd /C "${PROJECT_SOURCE_DIR}/extern/nvidia/build.bat --platform ${NVIDIA_PLATFORM_NAME}" RESULT_VARIABLE exit_code)
execute_process(COMMAND cmd /C "${PROJECT_SOURCE_DIR}/extern/nvidia/build.bat --platform ${NVIDIA_PLATFORM_NAME}"
RESULT_VARIABLE exit_code)
endif()

# cmake-format: off
Expand Down
176 changes: 146 additions & 30 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,121 @@ glob_files(SOURCES "${CMAKE_CURRENT_LIST_DIR}/src/*.cpp")
get_property(ADDITIONAL_LIBRARIES GLOBAL PROPERTY NVIDIA_ADDITIONAL_LIBRARIES_PROPERTY)
get_property(ADDITIONAL_LINK_DIRECTORIES GLOBAL PROPERTY NVIDIA_ADDITIONAL_LINK_DIRECTORIES_PROPERTY)

# cmake-format: off
setup_lib(
TARGET_NAME
CesiumOmniverseCore
TYPE
# CesiumOmniverseCore needs to be built as a STATIC library always so that it can be tested.
# Otherwise if it was built as a shared library we would have to add dllexport attributes to almost everything.
STATIC
SOURCES
${SOURCES}
INCLUDE_DIRS
"${CMAKE_CURRENT_LIST_DIR}/include"
LIBRARIES
CesiumUsdSchemas
Cesium3DTilesSelection
Cesium3DTilesReader
Cesium3DTilesContent
CesiumRasterOverlays
CesiumGltfReader
CesiumGltfContent
CesiumGltf
CesiumQuantizedMeshTerrain
CesiumJsonReader
CesiumGeospatial
CesiumGeometry
CesiumIonClient
CesiumAsync
CesiumUtility
if(MSVC)
set(CESIUM_NATIVE_DEPENDENCIES
async++
draco
glm
jpeg
ktx
libmodpbase64
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
libcrypto
libssl
spdlog
fmt
sqlite3
tinyxml2
turbojpeg
uriparser
libwebp
libwebpdecoder
libwebpdemux
libwebpmux
astcenc-avx2-static
libsharpyuv
zlibstatic-ng
zstd)
else()
set(CESIUM_NATIVE_DEPENDENCIES
async++
csprng
draco
glm
jpeg
Expand Down Expand Up @@ -159,7 +244,38 @@ setup_lib(
astcenc-avx2-static
sharpyuv
z-ng
zstd
zstd)
endif()

# cmake-format: off
setup_lib(
TARGET_NAME
CesiumOmniverseCore
TYPE
# CesiumOmniverseCore needs to be built as a STATIC library always so that it can be tested.
# Otherwise if it was built as a shared library we would have to add dllexport attributes to almost everything.
STATIC
SOURCES
${SOURCES}
INCLUDE_DIRS
"${CMAKE_CURRENT_LIST_DIR}/include"
LIBRARIES
CesiumUsdSchemas
Cesium3DTilesSelection
Cesium3DTilesReader
Cesium3DTilesContent
CesiumRasterOverlays
CesiumGltfReader
CesiumGltfContent
CesiumGltf
CesiumQuantizedMeshTerrain
CesiumJsonReader
CesiumGeospatial
CesiumGeometry
CesiumIonClient
CesiumAsync
CesiumUtility
${CESIUM_NATIVE_DEPENDENCIES}
CURL::libcurl
stb::stb
ZLIB::ZLIB
Expand Down
Loading

0 comments on commit 68c50c8

Please sign in to comment.