diff --git a/CMakeLists.txt b/CMakeLists.txt index ae1774a..ecd545a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,9 +2,25 @@ cmake_minimum_required(VERSION 3.10) include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/get-version.cmake") -project(wiringPi_Main VERSION ${VERSION}) +project(wiringPi_lib VERSION ${VERSION}) add_subdirectory(wiringPi) add_subdirectory(devLib) add_subdirectory(wiringPiD) add_subdirectory(gpio) + +# CPack +set(CPACK_PACKAGE_NAME "wiringPi") +set(CPACK_PACKAGE_DESCRIPTION "WiringPi Library for RaspberryPi") +set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/WiringPi/WiringPi") +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.LESSER") +set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") + +set(CPACK_GENERATOR "DEB") +set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "WiringPi") +set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "armhf") + +set(CPACK_SOURCE_GENERATOR "TGZ;ZIP") + +include(CPack) \ No newline at end of file diff --git a/cmake/toolchain-rpi.cmake b/cmake/toolchain-rpi.cmake index ba7ceb9..a0a73d0 100644 --- a/cmake/toolchain-rpi.cmake +++ b/cmake/toolchain-rpi.cmake @@ -1,4 +1,5 @@ set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR arm) if (NOT DEFINED ENV{TOOLCHAIN_PATH}) message(SEND_ERROR "Missing environment variable 'TOOLCHAIN_PATH'")