[CMake] Building DOS applications with OpenWatcom
Alexander Neundorf
a.neundorf-work at gmx.net
Fri May 8 18:19:28 EDT 2009
Hello Sebastian,
On Friday 08 May 2009, Sebastian Witt wrote:
> 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...?
You are doing this on Windows, right ?
And you are compiling for DOS, basically this would be cross compiling. OTOH
you can execute DOS programs under Windows (this is still possible, isn't
it ?)
Then you would need a Modules/DOS.cmake and a Modules/DOS-wcl386.cmake and
adjust the settings there. Or a cmake variable which switches the settings in
Windows-wcl386.cmake.
Alex
More information about the CMake
mailing list