2023-06-14 22:49:59 +10:00
|
|
|
# SPDX-FileCopyrightText: 2019 Blender Foundation
|
|
|
|
|
#
|
2022-02-11 09:07:11 +11:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2019-04-11 11:26:23 +02:00
|
|
|
|
|
|
|
|
# Build Draco library.
|
2020-12-07 15:23:55 +01:00
|
|
|
add_subdirectory(draco)
|
2019-04-11 11:26:23 +02:00
|
|
|
|
2024-07-25 11:24:11 +10:00
|
|
|
set(INC
|
|
|
|
|
draco/src
|
|
|
|
|
)
|
|
|
|
|
|
2020-12-07 15:23:55 +01:00
|
|
|
# Build Draco-Blender bridging module.
|
2020-03-01 16:16:54 +01:00
|
|
|
set(SRC
|
2020-12-07 15:23:55 +01:00
|
|
|
src/common.cpp
|
|
|
|
|
src/decoder.cpp
|
|
|
|
|
src/encoder.cpp
|
2020-03-01 16:16:54 +01:00
|
|
|
|
2024-07-25 11:24:11 +10:00
|
|
|
src/common.h
|
|
|
|
|
src/decoder.h
|
|
|
|
|
src/encoder.h
|
2020-03-01 16:16:54 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
set(LIB
|
2020-12-07 15:23:55 +01:00
|
|
|
draco
|
2020-03-01 16:16:54 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add_library(extern_draco SHARED "${SRC}")
|
|
|
|
|
target_include_directories(extern_draco PUBLIC "${INC}")
|
|
|
|
|
target_link_libraries(extern_draco PUBLIC "${LIB}")
|
|
|
|
|
|
|
|
|
|
blender_source_group(extern_draco "${SRC}")
|
2025-09-23 20:56:18 +02:00
|
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
|
# On macOS, prevent the draco library (already present in the application bundle) from being wrongly copied into the
|
|
|
|
|
# Xcode archive used for application distribution, which pollutes the archive and prevents it from being properly
|
|
|
|
|
# recognized. This effectively corrects a bad implicit CMake behavior for `SHARED` library targets on Xcode.
|
|
|
|
|
set_target_properties(extern_draco PROPERTIES
|
|
|
|
|
XCODE_ATTRIBUTE_SKIP_INSTALL "YES"
|
|
|
|
|
XCODE_ATTRIBUTE_INSTALL_PATH ""
|
|
|
|
|
)
|
|
|
|
|
endif()
|