# #POSIX development environment. #Allows us to build programs that require a POSIX API. #NOTE: The following requires 64 bit Windows. #Should not be a problem in the year 2018. # if (WIN32) #On Windows, we rely on MSYS2 to provide a toolchain which can build #applications that rely on the POSIX API. This is done in such a way that #the resulting applications run on Windows using the MSYS2.DLL POSIX emulation #layer. ExternalProject_Add ( posix-dev PREFIX ${CMAKE_INSTALL_PREFIX} BUILD_IN_SOURCE 1 DOWNLOAD_COMMAND "" SOURCE_DIR ${POSIX_ROOT} #To make sense of the alchemy below, see https://github.com/msys2/msys2/wiki/MSYS2-installation CONFIGURE_COMMAND "" #Update the package database and then install development tools #See https://github.com/Alexpux/MSYS2-packages/issues/148 for which packages we install BUILD_COMMAND ${CMAKE_COMMAND} -E env MSYSTEM=MSYS2 CHERE_INVOKING=1 ${POSIX_ROOT}/usr/bin/bash.exe --login -c "pacman -S --noconfirm --needed base-devel gcc" INSTALL_COMMAND "" DEPENDS posix-runtime ) endif (WIN32) if (UNIX) #Define an empty posix-dev project so that dependencies on posix dev tools can #be specified indendently of WIN32 or UNIX. ExternalProject_Add ( posix-dev BUILD_IN_SOURCE 1 DOWNLOAD_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" DEPENDS posix-runtime ) endif (UNIX)