From 97ffc590e336b800d346bdf2f4876394bb353f97 Mon Sep 17 00:00:00 2001 From: a-maurice Date: Tue, 17 Mar 2020 13:38:29 -0700 Subject: [PATCH] Include CPack only when explictly packaging (#5817) Including CPack without the additional packaging information creates unused project files, and can potentially cause issues for projects including Flatbuffers that also use CPack. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3987eac97..913c5631a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -619,9 +619,10 @@ if(UNIX) # Use of CPack only supported on Linux systems. if(FLATBUFFERS_PACKAGE_DEBIAN) include(CMake/PackageDebian.cmake) + include(CPack) endif() if (FLATBUFFERS_PACKAGE_REDHAT) include(CMake/PackageRedhat.cmake) + include(CPack) endif() - include(CPack) endif()