[cmake] add project version (#4929)

* use an older version for better compatibility
* add version to project
* only use cpack when OpenThread is the top-level project
* exclude posix apps when BUILD_EXECUTABLES is OFF
* exclude all third_party
This commit is contained in:
Yakun Xu
2020-05-06 17:46:13 -07:00
committed by GitHub
parent eb4125c97d
commit f7a4d05219
5 changed files with 29 additions and 15 deletions
+7 -5
View File
@@ -98,8 +98,10 @@ target_include_directories(openthread-simulation PRIVATE
${PROJECT_SOURCE_DIR}/src/core
)
set(CPACK_PACKAGE_NAME "openthread-simulation")
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "OpenThread Authors <[email protected]")
set(CPACK_PACKAGE_CONTACT "OpenThread Authors <[email protected]")
include(CPack)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set(CPACK_PACKAGE_NAME "openthread-simulation")
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "OpenThread Authors <[email protected]")
set(CPACK_PACKAGE_CONTACT "OpenThread Authors <[email protected]")
include(CPack)
endif()