summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authora-maurice <amaurice@google.com>2020-03-17 13:38:29 -0700
committerGitHub <noreply@github.com>2020-03-17 13:38:29 -0700
commit97ffc590e336b800d346bdf2f4876394bb353f97 (patch)
treee3c992fd9fc9f07be92a455a6be53469ba1d2860 /CMakeLists.txt
parent8b52af65bc066fb36761ebc1f950454c5e5ef548 (diff)
downloadflatbuffers-97ffc590e336b800d346bdf2f4876394bb353f97.tar.gz
flatbuffers-97ffc590e336b800d346bdf2f4876394bb353f97.tar.bz2
flatbuffers-97ffc590e336b800d346bdf2f4876394bb353f97.zip
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3987eac9..913c5631 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()