# #The main purpose of this file is to build and install all third party packages that are needed in order to #build the executables that we will debug on Windows in order to test and analyze the software in a more capable #debugger (Visual Studio). Using this file with cmake makes us independent of the UNIX-only tool LTIB when #building those particular executables on Windows (and Linux for that matter). LTIB is used only to build the #full system image for running under Embedded Linux on the device. # #This file allows us to use CMake as a portable package manager for 3rd party packages. #It is required on Windows to address the fact that Windows does not have a native package manager. # #This file can also be used on Linux to pull in all third party dependencies #so we can avoid using LTIB during the edit-compile-debug cycle, thereby minimizing #the turnaround time and maximizing developer efficiency. # # #Tools assumed to be pre-installed in order to build OSD on Windows: # #* CMake 3.9.3 or later (required in order to find all the boost libraries) #* Visual Studio 2015 Community edition (freely available from https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx) #* ActivePython 2.7.8 or later (but not 3.x) (freely available from http://www.activestate.com/activeperl) #* ActivePerl version 5.24.1 or later (freely available from http://www.activestate.com/activepython) # with the following CPAN packages: # CPAN requiremens for rdm: # cpan[1]> install XML::Simple # cpan[2]> install Parse::Lex # cpan[3]> install Convert::Binary::C # CPAN requirements for openssl: # cpan[4]> install Text::Template # cpan[5]> install Test::More # #Assuming that the above tools are in place, you can build OSD as follows: # #cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=c:\work\local c:\work\prep #cmake --build . # #The end result can be a found under c:\work\local as a fully populated #directory hierarchy organized according to FHS (Filesystem Hierachy Standard) # #https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard # #Note that FHS is just a convention, which can be followed regardless of the #host operating system. # #Note that a large part of the work that went into composing OSD is rooted in #the fact that the Microsoft tools give rise to a number of "schisms" that OSD #must treat consistently across libraries so that all those libraries can be #combined in the same program. The choice of C runtime is one such schism. All #the libraries of OSD compile to use the same variant of the C runtime #library. All the OSD libraries use the default MSVC runtime, which is #dynamically linked. Each library included in OSD has been carefuly configured #to ensure that all libraries rely on the same version of the C runtime #library. Since Visual Studio 2015, the dynamically linked runtime has been #much improved and no longer suffers from ever-returning compatibility #problems across versions of MSVC. # #From the above follows that programs that rely on OSD should use the default #(dynamically linked) C runtime library when building with MSVC. # #Note that all OSD libraries are statically linked with the notable exception #of the C runtime library. Choosing static linking over dynamic is rooted in #the fact that with Microsoft tools, symbols must be explicitly exported from #dynamically linked libraries. Due to C++ name mangling, exporting quickly #becomes challenging. Dynamically linked C++ libraries pose problems with #compatibility between the library and the programs that use them. Using #static libraries also eliminates the need for "name decoration" in header #files via the __declspec MSVC directive. Finally, bear in mind that some of #the motivation behind dynamically linked libraries is that it frees the build #process from worrying about transitive library dependencies (such #dependencies are instead resolved by the loader at runtime). CMake handles a #lot of the issues with transitive library dependencies for us at link time, #so the argument that dynamic linking simplifies the build process is reduced. # project(extlib) cmake_minimum_required(VERSION 3.9.3) #Must understand the boost library layout include(ExternalProject) if (CMAKE_CROSSCOMPILING) message (STATUS "CMake is cross compiling with CMAKE_FIND_ROOT_PATH=" ${CMAKE_FIND_ROOT_PATH}) else () message (STATUS "CMake is NOT cross compiling") endif (CMAKE_CROSSCOMPILING) if (WIN32) if (CMAKE_CL_64) message (STATUS "Will generate 64 bit code") else (CMAKE_CL_64) message (STATUS "Will generate 32 bit code") endif (CMAKE_CL_64) endif (WIN32) #Install all the build tools required to build the OSD libraries. These tools #are not for manual use from the command prompt via the PATH environment #variable, but are only invoked via a given absolute path from the build #scripts of the OSD libraries that DEPENDS on them. CMake library build #scripts should preferably use find_program() to determine the absolute path. #Packages using other build systems can use the absolute path listed below. add_subdirectory (mkisofs/3.02) #$ add_subdirectory (mkpsxiso/trunk) #$ add_subdirectory (uudecode/4.1) #$ add_subdirectory (flex/2.6.3) #$ add_subdirectory (bison/3.0.4) #$ add_subdirectory (file2c/trunk) #$ add_subdirectory (ragel/6.9) #$ add_subdirectory (yasm/1.3.0) #$ add_subdirectory (nasm/2.12.2) #$ add_subdirectory (sed/3.0.2) #$ add_subdirectory (ruby/1.9.3) #$ add_subdirectory (perl/5.25.10) #$ add_subdirectory (python/2.7.12) #$ add_subdirectory (python/3.5.2) #$ add_subdirectory (gawk/3.1.0) #$ add_subdirectory (swig/3.0.12) #$ add_subdirectory (scons/2.5.1) #$ add_subdirectory (llvm/7.0.1) #Libraries required by all LLVM tools (clang/lld) add_subdirectory (clang/7.0.1) #$ add_subdirectory (lld/7.0.1) #$ add_subdirectory (openwatcom/20191021) #To use: Specify -DCMAKE_TOOLCHAIN_FILE:PATH=${WATCOM_TOOLCHAIN_FILE} add_subdirectory (miniconda/4.5.11) #$ install -y add_subdirectory (keras/2.2.2) #$ python_code_using_keras.py add_subdirectory (posix-runtime/20180531) #$ echo hello> add_subdirectory (posix-dev/20180531) #$ gcc> add_subdirectory (bmake/20180919) #$ make> add_subdirectory (autotools/20180531) #$ ./configure add_subdirectory (yocto/dunfell) #Linux tools required for building embedded Linux kernels with Yocto #Create and install clang toolchain files for use when cross-compiling. #Creating a toolchain file relies on cmake finding the clang compiler and an #llvm linker (which must be installed above). The clang compiler must support #the target specified in the generated toolchain file, so we must take care to #build LLVM with support for the most popular CPU targets (X86/ARM/AARCH64). #AARCH64 allows us to generate code for the 64 bit Raspberry Pi3. #Two toolchain files are generated, their full paths available via two macros: #${CLANG_TOOLCHAIN_FILE} - to compile stuff that relies on a C library #${CLANG_FREESTANDING_TOOLCHAIN_FILE} - to compile stuff that does NOT rely on a C library (operating system kernels) add_subdirectory (clang-toolchain/trunk) #To use: Specify -DCMAKE_TOOLCHAIN_FILE:PATH=${CLANG_TOOLCHAIN_FILE} or ${CLANG_FREESTANDING_TOOLCHAIN_FILE} #The OSD libraries. They are built from publicly available sources using the #build tools preferred by the library creators. For details, see #http://cmake.3232098.n2.nabble.com/ExternalProject-dependency-question-td6934209.html #The configure/build step of the following packages can make use of the build #tools installed above via the given absolute path for each tool. add_subdirectory (freedos/2042) #Real mode DOS kernel without command shell add_subdirectory (fbird/2017-07-27) #$ is a PC BIOS boot sector game add_subdirectory (getopt/folklore) add_subdirectory (bsd-config/11.2) add_subdirectory (dtc/1.4.7) add_subdirectory (ogg/1.3.3) add_subdirectory (vorbis/1.3.6) add_subdirectory (stk/4.6.0) add_subdirectory (libsndfile/1.0.28) add_subdirectory (clapack/3.2.1) add_subdirectory (fftw/3.3.8) add_subdirectory (tnt/1.2.6) add_subdirectory (jama/1.2.5) add_subdirectory (zlib/1.2.7) add_subdirectory (libpng/1.6.16) add_subdirectory (openssl/1.1.0d) add_subdirectory (iconv/44) add_subdirectory (libxml/2.9.3) add_subdirectory (libxslt/1.1.29) add_subdirectory (tinyxml2/7.0.1) add_subdirectory (xerces/3.1.1) add_subdirectory (xsd/3.3.0) add_subdirectory (bzip2/1.0.6) add_subdirectory (postgresql/2018-03-06) add_subdirectory (stdint/26) add_subdirectory (expat/2.1.0) #APR is not actively maintained #add_subdirectory (apr/1.5.2) #APR is not actively maintained #add_subdirectory (apr-iconv/1.2.1) #APR is not actively maintained #add_subdirectory (apr-util/1.5.4) #BDB requires vcbuild - skip for now #add_subdirectory (bdb/4.8.30) #No longer available for download #add_subdirectory (neon/0.29.6) add_subdirectory (sqlite/3.8.8.3) #Strange compiler error with VS2013 - skip for now #add_subdirectory (libssh/0.5.2) #Serf 0.7.0 Does not compile with OpenSSL 1.1.0 #Serf 1.3.9 requires APR which has been retired from OSD #add_subdirectory (serf/0.7.0) #add_subdirectory (serf/1.3.9) add_subdirectory (pcre/8.35) #HTTPD requires APR which has been retired from OSD #add_subdirectory (httpd/2.4.25) add_subdirectory (tre/0.8.0) #No longer available for download #add_subdirectory (unix98/unknown) add_subdirectory (argtable/2.13) add_subdirectory (gflags/2.2.1) add_subdirectory (glog/0.3.5) add_subdirectory (snappy/cmake) #No longer available for download #add_subdirectory (jack/1.9.8) add_subdirectory (portaudio/v190600_20161030) #add_subdirectory (gsmlib/1.10) add_subdirectory (pthreads/2.9.1) #Patched file missing #add_subdirectory (libusb/1.0.9) #Depends on libusb #add_subdirectory (libftdi/0.20) add_subdirectory (boost/1.63.0) #Huge add_subdirectory (wt/3.3.7rc1) add_subdirectory (libjpeg/8c) add_subdirectory (libtiff/4.0.9) add_subdirectory (wxwidgets/3.1.1) add_subdirectory (pixman/0.32.6) add_subdirectory (freetype/2.5.5) add_subdirectory (libgit2/0.22.1) add_subdirectory (twit/trunk) add_subdirectory (mongoose/5.6) add_subdirectory (mxml/2.9) add_subdirectory (curl/7.62.0) #Hangs during build step #add_subdirectory (mongodb/3.4.2) add_subdirectory (node.js/4.3.0) add_subdirectory (libcsv/3.0.3) add_subdirectory (libgen/trunk) add_subdirectory (protobuf/3.1.0) add_subdirectory (onnx/1.2.2) add_subdirectory (muparser/2.2.5) add_subdirectory (libmodbus/3.0.6) add_subdirectory (libarchive/3.2.2) add_subdirectory (googletest/1.8.0) add_subdirectory (cryptopp/5.6.5) add_subdirectory (mariadb/10.1.19) add_subdirectory (mosquitto/1.4.10) add_subdirectory (harfbuzz/1.4.1) add_subdirectory (qt/5.8.0) add_subdirectory (ninja/1.7.2) add_subdirectory (c-ares/trunk) add_subdirectory (libcpuid/1.0.0) add_subdirectory (jsoncpp/1.7.7) add_subdirectory (libmicrohttpd/0.9.52) add_subdirectory (miniupnpc/1.8) add_subdirectory (catch/1.6.1) add_subdirectory (jsonrpccpp/0.7.0) add_subdirectory (leveldb/1.18) add_subdirectory (json-spirit/98) add_subdirectory (libscrypt/1.21) add_subdirectory (mpir/2.7.2) add_subdirectory (secp256k1/190) #Ethereum is no longer available from github #add_subdirectory (ethereum/develop) #add_subdirectory (evmjit/develop) add_subdirectory (shark/3.1.0) add_subdirectory (opencv/3.3.0) add_subdirectory (hdf5/1.8.16) add_subdirectory (lmdb/0.9.18) add_subdirectory (openblas/0.2.20) add_subdirectory (caffe/win) add_subdirectory (basicdsp/2.0) add_subdirectory (aquila/20150507) add_subdirectory (armadillo/9.100.5) add_subdirectory (sfml/2.5.0) add_subdirectory (sdl/2.0.8) add_subdirectory (ffmpeg/4.0.2) add_subdirectory (vtk/8.1.1) add_subdirectory (libshout/2.4.1) add_subdirectory (ices/2.0.2) add_subdirectory (icecast/2.4.3) add_subdirectory (yocto-pinger/trunk) #Yocto top layer for a Raspberry Pi to act as an embedded Linux realtime ping target add_subdirectory (zmq/4.3.4) #RDM requires perl for the configure step #add_subdirectory (rdm/14)