Fixup install rules

Explicitly build and install the draco shared library _only_
pull/3614/head
RichardTea 2021-02-03 11:38:20 +00:00
parent aa10b56bc2
commit 42d47c7f0b
1 changed files with 8 additions and 1 deletions

View File

@ -608,7 +608,8 @@ ELSE()
)
ENDIF()
ADD_SUBDIRECTORY( "contrib/draco" )
# Don't build or install all of Draco by default
ADD_SUBDIRECTORY( "contrib/draco" EXCLUDE_FROM_ALL )
if(MSVC OR WIN32)
set(draco_LIBRARIES "draco")
@ -626,6 +627,12 @@ ELSE()
EXCLUDE_FROM_DEFAULT_BUILD TRUE
)
# Do build the draco shared library
set_target_properties(${draco_LIBRARIES} PROPERTIES
EXCLUDE_FROM_ALL FALSE
EXCLUDE_FROM_DEFAULT_BUILD FALSE
)
TARGET_USE_COMMON_OUTPUT_DIRECTORY(${draco_LIBRARIES})
TARGET_USE_COMMON_OUTPUT_DIRECTORY(draco_encoder)
TARGET_USE_COMMON_OUTPUT_DIRECTORY(draco_decoder)