cmake: point to correct draco_features.h location (#4410)

Fixes the following error when running the "Install Jak" option in VS:
```
  CMake Error at third-party/draco/cmake_install.cmake:841 (file):
    file INSTALL cannot find
    "C:/Users/{WindowsUsername}/Documents/Coding/jak-project/out/build/Release/draco/draco_features.h":
    No error.
  Call Stack (most recent call first):
    cmake_install.cmake:48 (include)
  
  
  FAILED: [code=1] CMakeFiles/install.util 
  C:\WINDOWS\system32\cmd.exe /C "cd /D C:\Users\Jack\Documents\Coding\jak-project\out\build\Release && "C:\Program Files\Microsoft Visual Studio\18\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -P cmake_install.cmake"
  ninja: build stopped: subcommand failed.
Install succeeded.
```

The build was still useable but the error was bugging me.

Our version of `draco_features.h` is stored in
`third-party/draco/src/draco/draco_features.h` but `draco_install.cmake`
was not updated to reflect this change. Use the already defined
`${draco_features_file_name}` from `draco_options.cmake` to point to the
right place.

Disclosure: I didn't want to spend too much time dealing with cmake so I
pointed Qwen at the problem and it found a very simple solution. Using
`${draco_features_file_name}` to avoid hardcoding is neat. I fully
understand the fix, have tested it and all the descriptions were written
by me.
(AI Assisted)

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
This commit is contained in:
BreakPoints
2026-09-17 00:23:45 +01:00
committed by GitHub
parent 78c14a9532
commit 613a8b22cd
+4 -1
View File
@@ -60,7 +60,10 @@ macro(draco_setup_install_target)
DESTINATION "${target_directory}")
endforeach()
install(FILES "${draco_build}/draco/draco_features.h"
# PRESERVE - modified because for whatever reason, some people's environments
# have problems with this (the file never ends up moved to where i assume the
# code above moves it to)
install(FILES "${draco_features_file_name}"
DESTINATION "${includes_path}/draco/")
install(TARGETS draco_decoder DESTINATION "${bin_path}")