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.
This commit is contained in:
a-maurice
2020-03-17 13:38:29 -07:00
committed by GitHub
parent 8b52af65bc
commit 97ffc590e3

View File

@@ -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()