diff options
author | Jiri Malak <malak.jiri@gmail.com> | 2020-05-01 14:14:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-05-06 17:10:43 (GMT) |
commit | 4adfd2a3aa328b42b87a75c7178c7e8214e8d3c6 (patch) | |
tree | cb3a87f61204c96a776ec948b791e5ccbf2c0059 /Modules/Platform/Windows-OpenWatcom.cmake | |
parent | 43c3243c2d344ae0bd62307893f49019fd335b71 (diff) | |
download | CMake-4adfd2a3aa328b42b87a75c7178c7e8214e8d3c6.zip CMake-4adfd2a3aa328b42b87a75c7178c7e8214e8d3c6.tar.gz CMake-4adfd2a3aa328b42b87a75c7178c7e8214e8d3c6.tar.bz2 |
OpenWatcom: Add cross-compilation support for Windows
Add system header files directories for cross-compilation
Diffstat (limited to 'Modules/Platform/Windows-OpenWatcom.cmake')
-rw-r--r-- | Modules/Platform/Windows-OpenWatcom.cmake | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Modules/Platform/Windows-OpenWatcom.cmake b/Modules/Platform/Windows-OpenWatcom.cmake index 4c0e57e..70055da 100644 --- a/Modules/Platform/Windows-OpenWatcom.cmake +++ b/Modules/Platform/Windows-OpenWatcom.cmake @@ -4,6 +4,8 @@ # This module is shared by multiple languages; use include blocker. include_guard() +set(CMAKE_BUILD_TYPE_INIT Debug) + set(CMAKE_CREATE_WIN32_EXE "system nt_win" ) set(CMAKE_CREATE_CONSOLE_EXE "system nt" ) string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " system nt_dll") @@ -14,10 +16,17 @@ set(CMAKE_SHARED_LIBRARY_C_FLAGS "-bd") # ... while this is a space separated st set(CMAKE_RC_COMPILER "rc" ) -set(CMAKE_BUILD_TYPE_INIT Debug) - # single/multi-threaded /-bm # static/DLL run-time libraries /-br # default is setup for multi-threaded + DLL run-time libraries string(APPEND CMAKE_C_FLAGS_INIT " -bt=nt -dWIN32 -br -bm") string(APPEND CMAKE_CXX_FLAGS_INIT " -bt=nt -xs -dWIN32 -br -bm") + +if(CMAKE_CROSSCOMPILING) + if(NOT CMAKE_C_STANDARD_INCLUDE_DIRECTORIES) + set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/nt) + endif() + if(NOT CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES) + set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/nt) + endif() +endif() |