############################################################################## # # Yocto build environment for building embedded Linx kernels with bitbake. # Bitbake is Linux specific, so the BUILD STEP must be done under Linux. In # order to set up a fully working build environment for Yocto under # ${YOCTO_ROOT}, just include this file and then # FetchContent_MakeAvailable (yocto-zeus yocto-zeus-openembedded yocto-zeus-raspberrypi) # or # FetchContent_MakeAvailable (yocto-zeus yocto-zeus-openembedded yocto-zeus-beagleboard) # ############################################################################## #Yocto layer "A" must be installed under "${YOCTO_ROOT}/A". set (YOCTO_ROOT "${CMAKE_INSTALL_PREFIX}/yocto") FetchContent_Declare ( yocto-zeus SOURCE_DIR ${YOCTO_ROOT}/poky URL http://downloads.yoctoproject.org/releases/yocto/yocto-3.0.2/poky-zeus-22.0.2.tar.bz2 URL_MD5 5a02a7114bc7e9d28d044f8a801c1f06 ) FetchContent_Declare ( yocto-zeus-openembedded SOURCE_DIR ${YOCTO_ROOT}/meta-openembedded # URL https://github.com/openembedded/meta-openembedded/archive/zeus.zip # Head of the Zeus branch per 24apr20 is URL https://github.com/openembedded/meta-openembedded/archive/9e60d30669a2ad0598e9abf0cd15ee06b523986b.zip URL_MD5 a35da1e4973b4611742f4fa2f2e38195 ) FetchContent_Declare ( yocto-zeus-raspberrypi SOURCE_DIR ${YOCTO_ROOT}/meta-raspberrypi # URL https://github.com/agherzan/meta-raspberrypi/archive/zeus.zip # Head of the Zeus branch per 24apr20 is URL https://github.com/agherzan/meta-raspberrypi/archive/0e05098853eea77032bff9cf81955679edd2f35d.zip URL_MD5 874fe5f9fd2524ccb84e6513d21c4f57 ) FetchContent_Declare ( yocto-zeus-beagleboard SOURCE_DIR ${YOCTO_ROOT}/meta-beagleboard URL https://github.com/beagleboard/meta-beagleboard/archive/1.0.0.zip URL_MD5 459344cd3f6629f707d11e4d4bc04684 ) ############################################################################## # # Tools for building desktop applications for a multitude of operating systems # which have a working CMake implementation. # ############################################################################## #Recommended options for yasm #option (BUILD_SHARED_LIBS "Build shared libs" OFF) #option (YASM_BUILD_TESTS "Build test programs" OFF) FetchContent_Declare ( yasm URL https://github.com/yasm/yasm/archive/v1.3.0.zip URL_MD5 e05124cb4b464495d2962f38bd1316a6 ) #LLVM - Low Level Virtual Machine multi-target compiler backend #Recommended options for LLVM #set (LLVM_TARGETS_TO_BUILD "X86" CACHE STRING "LLVM target architecture(s)") #option (LLVM_BUILD_EXAMPLES "Build LLVM examples" OFF) #option (LLVM_BUILD_TESTS "Build LLVM tests" OFF) #option (LLVM_INCLUDE_EXAMPLES "Include build targets for LLVM examples" OFF) #option (LLVM_INCLUDE_TESTS "Include build targets for LLVM tests" OFF) #option (LLVM_BUILD_DOCS "Build LLVM documentation" OFF) #option (BUILD_SHARED_LIBS "Build shared libs" OFF) #ON not possible with Visual Studio FetchContent_Declare ( llvm8 URL https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/llvm-8.0.1.src.tar.xz URL_MD5 9a3b63df01c52556f7afb5617934e79e ) #clang - C/C++ compiler frontend for LLVM #option (CLANG_BUILD_EXAMPLES "Build clang examples" OFF) #option (CLANG_BUILD_TESTS "Build clang tests" OFF) #option (CLANG_INCLUDE_TESTS "Build clang tests" OFF) FetchContent_Declare ( clang8 URL https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/cfe-8.0.1.src.tar.xz URL_MD5 28db72b57ca99307259773e4ac74a6d3 ) ############################################################################## # # Libraries which run on a multitude of operating systems and support CMake as # build system. Can be built on a host running any OS with CMake available. # NOTE: When using Yocto to build embedded Linux systems, these libraries are # not fetched/built based on the following declarations. They are used only in # a desktop "simulated" development environment while using debugging tools to # test out embedded applications prior to including those applications in Yocto # userland (for deployment in the real world). Yocto has its own package system # that makes the following available within the Yocto build environment for # embedded userland. # ############################################################################## #Recommended options for argtable2 #option (BUILD_SHARED_LIBS "Build shared libs" OFF) FetchContent_Declare ( argtable2 URL https://prdownloads.sourceforge.net/argtable/argtable2-13.tar.gz URL_MD5 156773989d0d6406cea36526d3926668 PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_LIST_DIR}/argtable/2.13/patch" . ) FetchContent_Declare ( argtable3 URL https://github.com/argtable/argtable3/archive/v3.2.0.7402e6e.zip URL_MD5 9736fe3ae0635f37cb2663793d7682c2 ) #Recommended options for zlib #option (BUILD_SHARED_LIBS "Build shared libs" OFF) FetchContent_Declare ( zlib URL https://zlib.net/zlib-1.2.11.tar.gz URL_MD5 1c9f62f0778697a09d36121ead88e08e ) #"Simple Open Source EtherCAT Master" #Low overhead communication over Ethernet frames. #Works on Linux and Windows. #Requires NPCAP on Windows, which comes bundled as a binary because it must be #digitally signed by Microsoft and can not be built from source even if source #is available. FetchContent_Declare ( SOEM URL https://github.com/OpenEtherCATsociety/SOEM/archive/v1.4.0.zip URL_MD5 fc09f6c13085956c3c4ba4eea8b5f096 ) #Recommended options for libpng #option (BUILD_SHARED_LIBS "Build shared libs" OFF) #DEPENDS zlib FetchContent_Declare ( libpng URL https://sourceforge.net/projects/libpng/files/libpng16/1.6.37/libpng-1.6.37.tar.xz URL_MD5 015e8e15db1eecde5f2eb9eb5b6e59e9 ) #Recommended options for libsndfile #option(BUILD_SHARED_LIBS "Build shared libs" OFF) #option(BUILD_EXAMPLES "Build examples" OFF) #option(BUILD_TESTING "Build test programs that test libs" OFF) #option(BUILD_PROGRAMS "Build utility programs" OFF) #option(ENABLE_PACKAGE_CONFIG "Generate and install CMake package config file" ON) #option(ENABLE_EXTERNAL_LIBS "Enable Ogg, Vorbis, FLAC and Opus support" ON) #option(INSTALL_MANPAGES "Install man pages" OFF) FetchContent_Declare ( libsndfile URL https://github.com/erikd/libsndfile/archive/a34dc277398683ea9b73c13d6cf760201ba4b634.zip URL_MD5 00ed834d14143fec0ab09bc1cef8da4c ) #DEPENDS zlib iconv #libssh2 libgssapi FetchContent_Declare ( libgit2 URL https://github.com/libgit2/libgit2/archive/v1.1.0.zip URL_MD5 7df771223d865721b56a34b825ae8e4b ) #Recommended options for curl7 #option(BUILD_SHARED_LIBS "Build shared libraries" OFF) #option(BUILD_CURL_EXE "Build curl executable" OFF) FetchContent_Declare ( curl7 URL https://github.com/curl/curl/archive/curl-7_75_0.zip URL_MD5 787da50c5030bf3a13af237d8a0cf15b ) #Recommended options for zmq #option(BUILD_SHARED "Whether or not to build the shared object" ON) #option(BUILD_STATIC "Whether or not to build the static archive" ON) #option(WITH_DOCS "Build html docs" OFF) #option(BUILD_TESTS "Whether or not to build the tests" OFF) FetchContent_Declare ( zmq URL https://github.com/zeromq/libzmq/archive/refs/tags/v4.3.4.zip URL_MD5 7d8adcac7c678fd3c05c1b2ac7fdb5fc ) #DEPENDS sed flex bison FetchContent_Declare ( postgresql URL https://github.com/stalkerg/postgres_cmake/archive/6426c411e89a62ad7d825e8e19fb18270ead4a74.zip URL_MD5 0f93b60db2d72ddcb2cde40fc4ee910d ) #A minimal ALSA implementation ()for embedded Linux applications) #option(BUILD_SHARED_LIBS "Build shared libraries" OFF) #option(TINYALSA_USES_PLUGINS "Whether or not to build with plugin support" OFF) #option(TINYALSA_BUILD_EXAMPLES "Build examples" OFF) #option(TINYALSA_BUILD_UTILS "Build utility tools" ON) FetchContent_Declare ( tinyalsa URL https://github.com/tinyalsa/tinyalsa/archive/refs/tags/v2.0.0.zip URL_MD5 b6b446db016a0bea296a94b5410d28a0 ) # #NPCAP SDK for Windows # #Allows us to build libpcap under Windows by configuring it to use a digitally #signed network filter driver that can be installed via #https://nmap.org/npcap/dist/npcap-1.10.exe # #To use the NPCAP SDK, do not use MakeAvailable(npcap_sdk) - there is nothing #to configure/compile. Instead use libpcap, which will load the npcap DLL #explicitly at runtime (as installed by npcap-1.10.exe). The NPCAP DLL will #load the signed filter driver. # #if (WIN32) # FetchContent_Populate (npcap_sdk) #Just download and unpack - do NOT configure/build/install via MakeAvailable() # cmake_policy (SET CMP0074 NEW) #Observe Packet_ROOT in find_path() and find_library() # set (Packet_ROOT "${npcap_sdk_SOURCE_DIR}" CACHE PATH "NPCAP SDK root directory for use by FindPacket.cmake") #endif() #FetchContent_MakeAvailabe (libpcap ...) # #Your libpcap applications can then be fully portable between Linux and #Windows, relying entirely on libpcap to capture packets on both operating #systems. The fact that libpcap on Windows relies on the NPCAP SDK is an #implementation detail which your application does not have to worry about as #long as you have remembered to install npcap-1.10.exe # FetchContent_Declare ( npcap_sdk URL https://nmap.org/npcap/dist/npcap-sdk-1.06.zip URL_MD5 5594fdc5ad2566bc7abad5334d2349e8 ) #Recommended options for libpcap #option(INET6 "Enable IPv6" ON) #option(BUILD_SHARED_LIBS "Build shared libraries" OFF) #option(ENABLE_PROFILING "Enable code profiling" OFF) #option(NO_PROTOCHAIN "Disable protochain instruction" OFF) #option(ENABLE_REMOTE "Enable remote capture" OFF) #option(BUILD_WITH_LIBNL "Build with libnl" OFF) #option(DISABLE_LINUX_USBMON "Disable Linux usbmon USB sniffing support" ON) #option(DISABLE_BLUETOOTH "Disable Bluetooth sniffing support" ON) #option(DISABLE_NETMAP "Disable netmap support" ON) #option(DISABLE_DPDK "Disable DPDK support" ON) #option(DISABLE_DBUS "Disable D-Bus sniffing support" ON) #option(DISABLE_RDMA "Disable RDMA sniffing support" ON) #option(DISABLE_DAG "Disable Endace DAG card support" ON) #option(DISABLE_SEPTEL "Disable Septel card support" ON) #option(DISABLE_SNF "Disable Myricom SNF support" ON) #option(DISABLE_TC "Disable Riverbed TurboCap support" ON) #option(BDEBUG "Build optimizer debugging code" OFF) #option(YYDEBUG "Build parser debugging code" OFF) FetchContent_Declare ( libpcap URL https://www.tcpdump.org/release/libpcap-1.10.0.tar.gz URL_MD5 8c12dc19dd7e0d02d2bb6596eb5a71c7 PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_LIST_DIR}/libpcap/1.10.0/patch" . ) #An implementation of the iconv library for WIN32. #Builds only on WIN32! #option(BUILD_STATIC "Build the static library" OFF) #option(BUILD_SHARED "Build the shared library" ON) #option(BUILD_EXECUTABLE "Build the win_iconv executable" OFF) FetchContent_Declare ( win-iconv URL https://github.com/win-iconv/win-iconv/archive/v0.0.8.zip URL_MD5 37cff44fa76bf7cf15fd3a4e2c76bdb9 )