mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-09-15 19:03:15 +08:00
draco_options.cmake - add DRACO_INSTALL option; draco_install.cmake - check DRACO_INSTALL before adding install rules Co-authored-by: Ondrej Stava <ondys@users.noreply.github.com>
This commit is contained in:
parent
74a1435eed
commit
a6fddf5e24
@ -23,6 +23,7 @@ include(GNUInstallDirs)
|
||||
# Sets up the draco install targets. Must be called after the static library
|
||||
# target is created.
|
||||
macro(draco_setup_install_target)
|
||||
if(DRACO_INSTALL)
|
||||
set(bin_path "${CMAKE_INSTALL_BINDIR}")
|
||||
set(data_path "${CMAKE_INSTALL_DATAROOTDIR}")
|
||||
set(includes_path "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
@ -118,4 +119,5 @@ macro(draco_setup_install_target)
|
||||
install(FILES "${draco_build}/draco-config.cmake"
|
||||
"${draco_build}/draco-config-version.cmake"
|
||||
DESTINATION "${data_path}/cmake/draco")
|
||||
endif(DRACO_INSTALL)
|
||||
endmacro()
|
||||
|
@ -131,6 +131,10 @@ macro(draco_set_default_options)
|
||||
NAME DRACO_DEBUG_COMPILER_WARNINGS
|
||||
HELPSTRING "Turn on more warnings."
|
||||
VALUE OFF)
|
||||
draco_option(
|
||||
NAME DRACO_INSTALL
|
||||
HELPSTRING "Enable installation."
|
||||
VALUE ON)
|
||||
draco_check_deprecated_options()
|
||||
endmacro()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user