# #OpenWatcom C compiler version 2 for producing 16-bit 8086 code #The compiler can be invoked as ${CMAKE_INSTALL_PREFIX}/binnt/wcl.exe #Invoke ${CMAKE_INSTALL_PREFIX}/binnt/wcl.exe to list the compiler options. # if (WIN32) #Install for WIN32 host from the binary distribution ExternalProject_Add ( openwatcom_2_binaries PREFIX ${CMAKE_INSTALL_PREFIX} BUILD_IN_SOURCE 1 URL https://github.com/open-watcom/travis-ci-ow-builds/archive/09a49b6d9c9d4f7fa3febb8da280eeb11d25b116.zip URL_MD5 ee9db336ca67d2ad85296a57396951ad CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ) #Creates a compiler launcher in the form of a batch file. The batch file sets #up some required environment variables and then launches the compiler in that #environment. ExternalProject_Add ( openwatcom_launcher PREFIX ${CMAKE_INSTALL_PREFIX} SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/launcher CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= -DCMAKE_BUILD_TYPE:STRING=Release DEPENDS openwatcom_2_binaries ) #Creates a toolchain file containing the abolute path of the compiler launcher ExternalProject_Add ( openwatcom PREFIX ${CMAKE_INSTALL_PREFIX} SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/src CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= -DCMAKE_BUILD_TYPE:STRING=Release -DTOOLCHAIN_SYSTEM_NAME:STRING=Windows -DTOOLCHAIN_SYSTEM_VERSION:STRING=1.0 -DTOOLCHAIN_SYSTEM_PROCESSOR:STRING=8086 DEPENDS openwatcom_launcher ) #Other OSD modules can specify -DCMAKE_TOOLCHAIN_FILE:PATH=${WATCOM_TOOLCHAIN_FILE} #in order to build using the Watcom toolchain. set (WATCOM_TOOLCHAIN_FILE "${CMAKE_INSTALL_PREFIX}/share/openwatcom-toolchain.txt" PARENT_SCOPE) endif (WIN32)