[CMake] Building DOS applications with OpenWatcom

Sebastian Witt hasw at hasw.net
Fri May 8 17:24:56 EDT 2009


Hello list,

I'm using cmake for generating OpenWatcom wmake files for 32-bit DOS applications.

Currently I've modified the file Modules\Platform\Windows-wcl386.cmake:

- Removed -br -bm from CMAKE_C_FLAGS*INIT (runtime dll/multithreading)
- Commented out CMAKE_C_STANDARD_LIBRARIES_INIT

In the CMakeLists.txt of the project I'm using:

if (WATCOM)
    message ("Building for DOS")
    add_definitions ("-bt=dos")
    SET (CMAKE_C_LINK_EXECUTABLE "wlink ${CMAKE_START_TEMP_FILE}
${CMAKE_WLINK_QUIET} name <TARGET> SYS dos32a option caseexact file {<OBJECTS>}
<LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
endif (WATCOM)

The only difference in CMAKE_C_LINK_EXECUTABLE is SYS dos32a (instead of the
default value SYS nt).

It works, but I'm not sure thats the right way. Can anyone suggest a better
idea? Add a new generator...?

Regards,
Sebastian


More information about the CMake mailing list