Compare commits

...

31 Commits

Author SHA1 Message Date
Dustin L. Howett
e55957dcfd cmake: propsheet is actually a *module* 2026-02-19 12:12:48 -06:00
Dustin L. Howett
c306414273 cmake: fix propsheete console.rc dependency on strid 2026-02-19 12:12:48 -06:00
Dustin L. Howett
681b6cdc3b Merge remote-tracking branch 'origin/main' into dev/duhowett/hax/cmake 2026-02-19 11:32:46 -06:00
Dustin L. Howett
65e033687a cmake: vcpkg applocal deps, also HybridCRT 2026-02-19 11:31:43 -06:00
Dustin L. Howett
fd26214d95 cmake: include the fuzzer (as confuzz) 2026-02-18 11:43:03 -06:00
Dustin L. Howett
32b3687619 cmake: whoops, make sure the propsheet has all its resources 2026-02-18 11:43:03 -06:00
Dustin L. Howett
1af0ed0fb3 cmake: add RC/Manifest and some install rules 2026-02-18 11:43:03 -06:00
Dustin L. Howett
615f85e33c cmake: set EXTERNAL_BUILD (oops) 2026-02-18 11:43:03 -06:00
Dustin L. Howett
3e0441b47c cmake: break conhost into host lib and conhost exe 2026-02-17 14:28:58 -06:00
Dustin L. Howett
91903d7916 cmake: update for latest vcxproj build system change 2026-02-17 14:27:28 -06:00
Dustin L. Howett
14a1b1d2b1 cmake: prefer pwsh for Feature Flag header 2026-02-17 14:27:27 -06:00
Dustin L. Howett
e6dcf8f271 Merge remote-tracking branch 'origin/main' into dev/duhowett/hax/cmake 2026-02-17 14:26:31 -06:00
Dustin L. Howett
32c4dde0f1 make wil a vcpkg, read the include path properly 2024-08-25 21:19:10 -05:00
Dustin L. Howett
5070bdc0b4 Add control flow guard, LTCG and opt:ref/icf 2024-08-25 21:04:06 -05:00
Dustin L. Howett
0c60502855 Make HybridCRT work 2024-08-25 21:03:41 -05:00
Dustin L. Howett
a53b7a8ddd Try to enable Ninja Multi-Config 2024-08-25 19:08:55 -05:00
Dustin L. Howett
a6cea559b2 Build conpty.dll too 2024-08-25 18:35:40 -05:00
Dustin L. Howett
d649b50fb0 gdi: fix precomp.h to build with cmake 2024-08-25 15:03:48 -05:00
Dustin L. Howett
0179a59a4f last minute link line fixes 2024-08-25 15:02:23 -05:00
Dustin L. Howett
9b7cc69229 Generate feature staging during configure 2024-08-25 14:57:37 -05:00
Dustin L. Howett
b61a2c67b1 Use custom command properly for hlsl too 2024-08-25 14:40:01 -05:00
Dustin L. Howett
e42429333d propsheet: generate strid.h strid.rc 2024-08-25 14:34:42 -05:00
Dustin L. Howett
b973a8f647 Make the midl rules in proxy/ work better 2024-08-25 14:34:30 -05:00
Dustin L. Howett
200fca3be5 run midl in proxy/; it rebuilds more than i want it to 2024-08-24 18:46:36 -05:00
Dustin L. Howett
1a0ff53734 Update CMakeLists for all changes to main since merge - also, build atlas shaders! 2024-08-24 13:25:16 -05:00
Dustin L. Howett
af5146f973 Merge remote-tracking branch 'origin/main' into dev/duhowett/hax/cmake 2024-08-24 11:47:59 -05:00
Dustin L. Howett
8c23e74bea cmake: link ntdll 2023-03-31 23:00:07 -05:00
Dustin L. Howett
b3c8458741 cmake: update for main 2023-03-31 22:57:33 -05:00
Dustin L. Howett
cefb894861 Merge remote-tracking branch 'origin/main' into dev/duhowett/hax/cmake 2023-03-31 22:49:13 -05:00
Dustin L. Howett
3f25afdb97 HAX: CMake 2022-10-20 19:06:02 -05:00
Dustin L. Howett
5310127d3a Fix precompiled header hygiene
1. Instances of `<>` instead of `""`
2. Instances of headers including precompiled headers

(also, I don't think that headers should contain `#pragma hdrstop`? The
header is, by definition, _not stopping_ inside another header.)
2022-10-20 19:04:56 -05:00
43 changed files with 689 additions and 28 deletions

73
CMakeLists.txt Normal file
View File

@@ -0,0 +1,73 @@
cmake_minimum_required(VERSION 3.20)
# We use the BYPRODUCTS feature for improved Ninja integration
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
cmake_policy(SET CMP0092 NEW)
project(conhost
VERSION 1.0.0
DESCRIPTION "Windows Console Host"
LANGUAGES C CXX)
# Some projects (like the COM proxy) generate C files.
list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS c)
set(CMAKE_CXX_STANDARD 20)
set(X_VCPKG_APPLOCAL_DEPS_INSTALL ON)
# Hybrid CRT (runtime library is static, crt is dynamic)
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$<CONFIG:Debug>:Debug>)
execute_process(
COMMAND pwsh -NoProfile -Command "${CMAKE_SOURCE_DIR}/tools/Generate-FeatureStagingHeader.ps1" -Branding Dev -Path "${CMAKE_CURRENT_LIST_DIR}\\src\\features.xml" -OutputPath "${CMAKE_BINARY_DIR}\\features.h"
)
add_compile_definitions(
UNICODE
_UNICODE
EXTERNAL_BUILD
)
add_compile_options(
/W3 /WX /utf-8
/wd4201 /wd4702
/permissive-
/Zc:preprocessor
/Zc:__cplusplus /Zc:__STDC__ /Zc:enumTypes /Zc:externConstexpr /Zc:templateScope /Zc:throwingNew
/guard:cf
/FI${CMAKE_BINARY_DIR}\\features.h
$<$<NOT:$<CONFIG:DEBUG>>:/GL>
)
add_link_options(
$<$<NOT:$<CONFIG:DEBUG>>:/LTCG>
$<$<NOT:$<CONFIG:DEBUG>>:/OPT:REF>
$<$<NOT:$<CONFIG:DEBUG>>:/OPT:ICF>
# Hybrid CRT (switch the static crt for the dynaimc one)
/nodefaultlib:libucrt$<$<CONFIG:Debug>:d>.lib
/defaultlib:ucrt$<$<CONFIG:Debug>:d>.lib
/guard:cf
)
add_compile_definitions(
"$<$<CONFIG:DEBUG>:DEBUG>"
"$<$<CONFIG:DEBUG>:_DEBUG>"
"$<$<CONFIG:DEBUG>:DBG>"
)
cmake_policy(SET CMP0091 NEW)
set(
CMAKE_MSVC_RUNTIME_LIBRARY
# Statically link the C++ runtime libraries, but partially override this below
"MultiThreaded$<$<CONFIG:Debug>:Debug>"
)
add_link_options(
"/DEFAULTLIB:ucrt$<$<CONFIG:Debug>:d>.lib" # include the dynamic UCRT
"/NODEFAULTLIB:libucrt$<$<CONFIG:Debug>:d>.lib" # ignore the static UCRT
)
add_subdirectory(src)

34
src/CMakeLists.txt Normal file
View File

@@ -0,0 +1,34 @@
find_package(Microsoft.GSL CONFIG REQUIRED)
find_package(wil CONFIG REQUIRED)
get_target_property(WIL_INCLUDE_DIR WIL::WIL INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(GSL_INCLUDE_DIR Microsoft.GSL::GSL INTERFACE_INCLUDE_DIRECTORIES)
find_path(FMT_INCLUDE_DIR NAMES format.h)
include_directories(
inc
${WIL_INCLUDE_DIR}
../oss/stb
../oss/chromium
../oss/interval_tree
../dep/Console
../dep/NT
../dep/Win32K
../dep
)
add_subdirectory(audio)
add_subdirectory(buffer)
add_subdirectory(host)
add_subdirectory(interactivity)
add_subdirectory(propsheet)
add_subdirectory(propslib)
add_subdirectory(renderer)
add_subdirectory(server)
add_subdirectory(terminal)
#add_subdirectory(til)
add_subdirectory(tsf)
add_subdirectory(types)
add_subdirectory(internal)
add_subdirectory(winconpty)

1
src/audio/CMakeLists.txt Normal file
View File

@@ -0,0 +1 @@
add_subdirectory(midi)

View File

@@ -0,0 +1,10 @@
add_library(ConAudioMidi)
target_sources(ConAudioMidi
PRIVATE
MidiAudio.cpp
)
target_precompile_headers(ConAudioMidi
PRIVATE
precomp.h
)

View File

@@ -0,0 +1 @@
add_subdirectory(out)

View File

@@ -0,0 +1,23 @@
add_library(ConBufferOut)
target_sources(ConBufferOut
PRIVATE
cursor.cpp
ImageSlice.cpp
OutputCell.cpp
OutputCellIterator.cpp
OutputCellRect.cpp
OutputCellView.cpp
Row.cpp
search.cpp
TextAttribute.cpp
textBuffer.cpp
textBufferCellIterator.cpp
textBufferTextIterator.cpp
TextColor.cpp
UTextAdapter.cpp
)
target_precompile_headers(ConBufferOut
PRIVATE
precomp.h
)

94
src/host/CMakeLists.txt Normal file
View File

@@ -0,0 +1,94 @@
add_library(ConHostLib)
target_sources(ConHostLib
PRIVATE
_output.cpp
_stream.cpp
AccessibilityNotifier.cpp
alias.cpp
cmdline.cpp
ConsoleArguments.cpp
consoleInformation.cpp
dbcs.cpp
directio.cpp
getset.cpp
globals.cpp
handle.cpp
history.cpp
init.cpp
input.cpp
inputBuffer.cpp
inputKeyInfo.cpp
inputReadHandleData.cpp
misc.cpp
ntprivapi.cpp
output.cpp
outputStream.cpp
PtySignalInputThread.cpp
readData.cpp
readDataCooked.cpp
readDataDirect.cpp
readDataRaw.cpp
registry.cpp
renderData.cpp
renderFontDefaults.cpp
screenInfo.cpp
scrolling.cpp
selection.cpp
selectionInput.cpp
selectionState.cpp
settings.cpp
srvinit.cpp
stream.cpp
tracing.cpp
utils.cpp
VtInputThread.cpp
VtIo.cpp
writeData.cpp
)
target_include_directories(ConHostLib
PRIVATE
.
"$<TARGET_PROPERTY:ConCOMProxy,INTERFACE_INCLUDE_DIRECTORIES>"
)
target_precompile_headers(ConHostLib
PRIVATE
precomp.h
)
find_package(fmt CONFIG REQUIRED)
target_link_libraries(ConHostLib
INTERFACE
ConCOMProxy
ConAudioMidi
ConBufferOut
ConInteractivityBase
ConInteractivityWin32
ConInternalStubs
ConPropsLib
ConTermInput
ConTermParser
ConTermAdapt
ConTSF
ConServer
ConRenderBase
ConRenderGdi
ConRenderAtlas
ConTypes
fmt::fmt
onecoreuap_apiset.lib
usp10.lib
imm32.lib
winmm.lib
ntdll.lib
)
add_subdirectory(proxy)
add_subdirectory(exe)
add_subdirectory(ft_fuzzer)

View File

@@ -0,0 +1,34 @@
add_executable(conhost WIN32)
target_sources(conhost
PRIVATE
CConsoleHandoff.cpp
exemain.cpp
Host.EXE.rc
OpenConsole.exe.manifest
)
target_include_directories(conhost
PRIVATE
.
..
)
target_link_libraries(conhost
PRIVATE
ConHostLib
ConCOMProxy
)
target_link_options(conhost PRIVATE /entry:wWinMainCRTStartup)
target_precompile_headers(conhost
PRIVATE
../precomp.h
)
install(
TARGETS
conhost
DESTINATION bin
)

View File

@@ -0,0 +1,25 @@
add_executable(confuzz)
target_sources(confuzz
PRIVATE
fuzzmain.cpp
../exe/Host.EXE.rc
../exe/openconsole.exe.manifest
)
target_include_directories(confuzz
PRIVATE
.
..
)
target_link_libraries(confuzz
PRIVATE
ConHostLib
)
install(
TARGETS
confuzz
DESTINATION bin
)

View File

@@ -3,7 +3,5 @@
#pragma once
#include "precomp.h"
void InitSideBySide(_Out_writes_(ScratchBufferSize) PWSTR ScratchBuffer, __range(MAX_PATH, MAX_PATH) DWORD ScratchBufferSize);
void InitEnvironmentVariables();

View File

@@ -0,0 +1,39 @@
set(IDL_FILES IConsoleHandoff.idl ITerminalHandoff.idl)
foreach(FILE ${IDL_FILES})
get_filename_component(FILE_WE ${FILE} NAME_WE)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${FILE_WE}_p.c
BYPRODUCTS
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${FILE_WE}_i.c
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${FILE_WE}.h
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/dlldata.c
MAIN_DEPENDENCY ${FILE}
COMMAND midl.exe /nologo /target NT100 /x64 /out "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>" /h "${FILE_WE}.h" ${FILE}
COMMENT "MIDL ${FILE}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
VERBATIM)
endforeach(FILE)
set_source_files_properties(
${CMAKE_CURRENT_BINARY_DIR}/Debug/dlldata.c
${CMAKE_CURRENT_BINARY_DIR}/Release/dlldata.c
${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/dlldata.c
PROPERTIES GENERATED TRUE
)
add_library(ConCOMProxy STATIC)
set_target_properties(ConCOMProxy PROPERTIES LINKER_LANGUAGE CXX)
target_sources(ConCOMProxy
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/ITerminalHandoff_p.c
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/ITerminalHandoff_i.c
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/IConsoleHandoff_p.c
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/IConsoleHandoff_i.c
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/dlldata.c
)
target_include_directories(ConCOMProxy
INTERFACE
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>
)

View File

@@ -18,8 +18,6 @@ Revision History:
#pragma once
#include "precomp.h"
class Registry
{
public:

View File

@@ -0,0 +1,2 @@
add_subdirectory(base)
add_subdirectory(win32)

View File

@@ -1,10 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include "precomp.h"
#pragma hdrstop
namespace Microsoft::Console::Interactivity
{
enum class ApiLevel

View File

@@ -0,0 +1,17 @@
add_library(ConInteractivityBase)
target_sources(ConInteractivityBase
PRIVATE
ApiDetector.cpp
EventSynthesis.cpp
HostSignalInputThread.cpp
InteractivityFactory.cpp
RemoteConsoleControl.cpp
ServiceLocator.cpp
VtApiRedirection.cpp
PseudoConsoleWindowAccessibilityProvider.cpp
)
target_precompile_headers(ConInteractivityBase
PRIVATE
precomp.h
)

View File

@@ -3,8 +3,6 @@
#pragma once
#include "precomp.h"
#include "ApiDetector.hpp"
#include "../inc/IInteractivityFactory.hpp"
@@ -12,8 +10,6 @@
#include <map>
#pragma hdrstop
namespace Microsoft::Console::Interactivity
{
class InteractivityFactory final : public IInteractivityFactory

View File

@@ -0,0 +1,25 @@
add_library(ConInteractivityWin32)
target_sources(ConInteractivityWin32
PRIVATE
Clipboard.cpp
ConsoleControl.cpp
ConsoleInputThread.cpp
consoleKeyInfo.cpp
find.cpp
icon.cpp
menu.cpp
screenInfoUiaProvider.cpp
SystemConfigurationProvider.cpp
uiaTextRange.cpp
window.cpp
windowdpiapi.cpp
windowio.cpp
WindowMetrics.cpp
windowproc.cpp
windowUiaProvider.cpp
)
target_precompile_headers(ConInteractivityWin32
PRIVATE
precomp.h
)

View File

@@ -12,8 +12,6 @@ Author(s):
- Hernan Gatta (HeGatta) 29-Mar-2017
--*/
#include "precomp.h"
#include "../inc/IConsoleInputThread.hpp"
namespace Microsoft::Console::Interactivity::Win32

View File

@@ -14,8 +14,6 @@ Author(s):
#pragma once
#include "precomp.h"
#include "../inc/ISystemConfigurationProvider.hpp"
namespace Microsoft::Console::Interactivity::Win32

View File

@@ -18,8 +18,6 @@ Revision History:
#pragma once
#include "precomp.h"
#include "../../host/screenInfo.hpp"
namespace Microsoft::Console::Interactivity::Win32

View File

@@ -16,8 +16,6 @@ Revision History:
#pragma once
#include "precomp.h"
#include "resource.h"
namespace Microsoft::Console::Interactivity::Win32

View File

@@ -16,7 +16,6 @@ Author(s):
#pragma once
#include "precomp.h"
#include "../types/UiaTextRangeBase.hpp"
namespace Microsoft::Console::Interactivity::Win32

View File

@@ -19,8 +19,6 @@ Author(s):
#pragma once
#include "precomp.h"
#include <UIAutomationCore.h>
#include <wrl/implements.h>

View File

@@ -3,8 +3,6 @@
#pragma once
#include "precomp.h"
#include "../../server/ProcessHandle.h"
#pragma hdrstop

View File

@@ -0,0 +1,10 @@
add_library(ConInternalStubs)
target_sources(ConInternalStubs
PRIVATE
stubs.cpp
)
target_precompile_headers(ConInternalStubs
PRIVATE
precomp.h
)

View File

@@ -0,0 +1,62 @@
add_library(console MODULE)
target_sources(console
PRIVATE
ColorControl.cpp
ColorsPage.cpp
console.cpp
dbcs.cpp
dll.cpp
fontdlg.cpp
globals.cpp
init.cpp
LayoutPage.cpp
misc.cpp
OptionsPage.cpp
preview.cpp
PropSheetHandler.cpp
registry.cpp
TerminalPropsheetPage.cpp
util.cpp
${CMAKE_CURRENT_BINARY_DIR}/strid.h
console.rc
console.def
)
set_property(SOURCE console.rc APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/strid.rc)
target_include_directories(console
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}
../host
)
target_link_libraries(console
PRIVATE
ConInternalStubs
ConPropsLib
ConTypes
onecoreuap_apiset.lib
shlwapi.lib
)
target_precompile_headers(console
PRIVATE
precomp.h
)
add_custom_command(
DEPENDS strid.mc
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/strid.rc
BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/strid.h
COMMAND mc.exe -r "${CMAKE_CURRENT_BINARY_DIR}" -h "${CMAKE_CURRENT_BINARY_DIR}" strid.mc
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
install(
TARGETS
console
DESTINATION bin
)

View File

@@ -0,0 +1,13 @@
add_library(ConPropsLib)
target_sources(ConPropsLib
PRIVATE
DelegationConfig.cpp
RegistrySerialization.cpp
ShortcutSerialization.cpp
TrueTypeFontList.cpp
)
target_precompile_headers(ConPropsLib
PRIVATE
precomp.h
)

View File

@@ -1,6 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#pragma once
#define DEFINE_CONSOLEV2_PROPERTIES
#define INC_OLE2

View File

@@ -0,0 +1,3 @@
add_subdirectory(base)
add_subdirectory(gdi)
add_subdirectory(atlas)

View File

@@ -0,0 +1,52 @@
add_library(ConRenderAtlas)
target_include_directories(ConRenderAtlas
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>
)
target_sources(ConRenderAtlas
PRIVATE
AtlasEngine.api.cpp
AtlasEngine.cpp
AtlasEngine.r.cpp
Backend.cpp
BackendD2D.cpp
BackendD3D.cpp
BuiltinGlyphs.cpp
dwrite_helpers.cpp
DWriteTextAnalysis.cpp
stb_rect_pack.cpp
wic.cpp
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/shader_vs.h
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/shader_ps.h
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/custom_shader_vs.h
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/custom_shader_ps.h
)
target_precompile_headers(ConRenderAtlas
PRIVATE
pch.h
)
set(HLSL_SHADER_FILES shader_vs.hlsl shader_ps.hlsl custom_shader_ps.hlsl custom_shader_vs.hlsl)
set_source_files_properties(shader_vs.hlsl PROPERTIES ShaderType "vs")
set_source_files_properties(shader_ps.hlsl PROPERTIES ShaderType "ps")
set_source_files_properties(custom_shader_vs.hlsl PROPERTIES ShaderType "vs")
set_source_files_properties(custom_shader_ps.hlsl PROPERTIES ShaderType "ps")
set_source_files_properties(${HLSL_SHADER_FILES} PROPERTIES ShaderModel "4_0")
foreach(FILE ${HLSL_SHADER_FILES})
get_filename_component(FILE_WE ${FILE} NAME_WE)
get_source_file_property(shadertype ${FILE} ShaderType)
get_source_file_property(shadermodel ${FILE} ShaderModel)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${FILE_WE}.h
COMMAND fxc.exe /nologo /Emain /Vn${FILE_WE} /Zi /T${shadertype}_${shadermodel} $<IF:$<CONFIG:DEBUG>,/Od,/O3> /Zsb /Fh ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${FILE_WE}.h /Fd ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${FILE_WE}.pdb ${FILE}
MAIN_DEPENDENCY ${FILE}
COMMENT "HLSL ${FILE}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
VERBATIM
)
endforeach(FILE)

View File

@@ -0,0 +1,17 @@
add_library(ConRenderBase)
target_sources(ConRenderBase
PRIVATE
CSSLengthPercentage.cpp
fontinfo.cpp
FontInfoBase.cpp
FontInfoDesired.cpp
FontResource.cpp
RenderEngineBase.cpp
renderer.cpp
RenderSettings.cpp
)
target_precompile_headers(ConRenderBase
PRIVATE
precomp.h
)

View File

@@ -0,0 +1,13 @@
add_library(ConRenderGdi)
target_sources(ConRenderGdi
PRIVATE
invalidate.cpp
math.cpp
paint.cpp
state.cpp
)
target_precompile_headers(ConRenderGdi
PRIVATE
precomp.h
)

View File

@@ -10,6 +10,7 @@ Abstract:
- Avoid including internal project headers. Instead include them only in the classes that need them (helps with test project building).
--*/
#pragma once
#include <cwchar>
#include <sal.h>

34
src/server/CMakeLists.txt Normal file
View File

@@ -0,0 +1,34 @@
add_library(ConServer)
target_sources(ConServer
PRIVATE
ApiDispatchers.cpp
ApiDispatchersInternal.cpp
ApiMessage.cpp
ApiMessageState.cpp
ApiSorter.cpp
ConDrvDeviceComm.cpp
ConsoleShimPolicy.cpp
DeviceHandle.cpp
Entrypoints.cpp
IoDispatchers.cpp
IoSorter.cpp
ObjectHandle.cpp
ObjectHeader.cpp
ProcessHandle.cpp
ProcessList.cpp
ProcessPolicy.cpp
WaitBlock.cpp
WaitQueue.cpp
WinNTControl.cpp
)
target_precompile_headers(ConServer
PRIVATE
precomp.h
)
# We need the interface import for ConCOMProxy to get the MIDL header path
target_link_libraries(ConServer
PRIVATE
ConCOMProxy
)

View File

@@ -0,0 +1,3 @@
add_subdirectory(adapter)
add_subdirectory(input)
add_subdirectory(parser)

View File

@@ -0,0 +1,17 @@
add_library(ConTermAdapt)
target_sources(ConTermAdapt
PRIVATE
adaptDispatch.cpp
adaptDispatchGraphics.cpp
FontBuffer.cpp
MacroBuffer.cpp
InteractDispatch.cpp
PageManager.cpp
SixelParser.cpp
terminalOutput.cpp
)
target_precompile_headers(ConTermAdapt
PRIVATE
precomp.h
)

View File

@@ -0,0 +1,11 @@
add_library(ConTermInput)
target_sources(ConTermInput
PRIVATE
mouseInput.cpp
terminalInput.cpp
)
target_precompile_headers(ConTermInput
PRIVATE
precomp.h
)

View File

@@ -0,0 +1,14 @@
add_library(ConTermParser)
target_sources(ConTermParser
PRIVATE
base64.cpp
InputStateMachineEngine.cpp
OutputStateMachineEngine.cpp
stateMachine.cpp
tracing.cpp
)
target_precompile_headers(ConTermParser
PRIVATE
precomp.h
)

11
src/tsf/CMakeLists.txt Normal file
View File

@@ -0,0 +1,11 @@
add_library(ConTSF)
target_sources(ConTSF
PRIVATE
Handle.cpp
Implementation.cpp
)
target_precompile_headers(ConTSF
PRIVATE
precomp.h
)

23
src/types/CMakeLists.txt Normal file
View File

@@ -0,0 +1,23 @@
add_library(ConTypes)
target_sources(ConTypes
PRIVATE
CodepointWidthDetector.cpp
ColorFix.cpp
colorTable.cpp
convert.cpp
GlyphWidth.cpp
ScreenInfoUiaProviderBase.cpp
sgrStack.cpp
TermControlUiaProvider.cpp
TermControlUiaTextRange.cpp
ThemeUtils.cpp
UiaTextRangeBase.cpp
UiaTracing.cpp
utils.cpp
viewport.cpp
)
target_precompile_headers(ConTypes
PRIVATE
precomp.h
)

View File

@@ -0,0 +1,23 @@
add_library(conpty SHARED)
target_sources(conpty
PRIVATE
winconpty.cpp
../server/DeviceHandle.cpp
../server/WinNTControl.cpp
)
target_link_libraries(conpty
PRIVATE
onecoreuap_apiset.lib
)
target_precompile_headers(conpty
PRIVATE
precomp.h
)
install(
TARGETS
conpty
DESTINATION lib
)

View File

@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include "precomp.h"
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -2,7 +2,8 @@
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"dependencies": [
"fmt",
"ms-gsl"
"ms-gsl",
"wil"
],
"features": {
"terminal": {