1# Distributed under the OSI-approved BSD 3-Clause License. See accompanying 2# file Copyright.txt or https://cmake.org/licensing for details. 3 4# This module is shared by multiple languages; use include blocker. 5include_guard() 6 7set(CMAKE_BUILD_TYPE_INIT Debug) 8 9string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " system nt_dll") 10string(APPEND CMAKE_MODULE_LINKER_FLAGS_INIT " system nt_dll") 11 12set(CMAKE_C_COMPILE_OPTIONS_DLL "-bd") # Note: This variable is a ';' separated list 13set(CMAKE_SHARED_LIBRARY_C_FLAGS "-bd") # ... while this is a space separated string. 14 15set(CMAKE_RC_COMPILER "rc" ) 16 17# single/multi-threaded /-bm 18# static/DLL run-time libraries /-br 19# default is setup for multi-threaded + DLL run-time libraries 20string(APPEND CMAKE_C_FLAGS_INIT " -bt=nt -dWIN32 -br -bm") 21string(APPEND CMAKE_CXX_FLAGS_INIT " -bt=nt -xs -dWIN32 -br -bm") 22 23if(CMAKE_CROSSCOMPILING) 24 if(NOT CMAKE_C_STANDARD_INCLUDE_DIRECTORIES) 25 set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/nt) 26 endif() 27 if(NOT CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES) 28 set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES $ENV{WATCOM}/h $ENV{WATCOM}/h/nt) 29 endif() 30endif() 31 32macro(__windows_open_watcom lang) 33 set(CMAKE_${lang}_CREATE_WIN32_EXE "system nt_win") 34 set(CMAKE_${lang}_CREATE_CONSOLE_EXE "system nt") 35endmacro() 36