From: =?utf-8?q?Timo_R=C3=B6hling?= <timo@gaussglocke.de>
Date: Wed, 2 Dec 2020 00:35:48 +0100
Subject: Do not add gltfpack to CMake config

---
 CMakeLists.txt | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ddf9b88..339a2dc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -77,8 +77,6 @@ if(MESHOPT_BUILD_SHARED_LIBS)
     endif()
 endif()
 
-set(TARGETS meshoptimizer)
-
 if(MESHOPT_BUILD_DEMO)
     add_executable(demo demo/main.cpp demo/miniz.cpp demo/tests.cpp tools/meshloader.cpp)
     target_link_libraries(demo meshoptimizer)
@@ -87,7 +85,7 @@ endif()
 if(MESHOPT_BUILD_GLTFPACK)
     add_executable(gltfpack ${GLTF_SOURCES} tools/meshloader.cpp)
     target_link_libraries(gltfpack meshoptimizer)
-    list(APPEND TARGETS gltfpack)
+    install(TARGETS gltfpack RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
 
     if(MESHOPT_BUILD_SHARED_LIBS)
         string(CONCAT RPATH "$ORIGIN/../" ${CMAKE_INSTALL_LIBDIR})
@@ -97,7 +95,7 @@ endif()
 
 include(GNUInstallDirs)
 
-install(TARGETS ${TARGETS} EXPORT meshoptimizerTargets
+install(TARGETS meshoptimizer EXPORT meshoptimizerTargets
     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
