-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
52 lines (43 loc) · 1.29 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required (VERSION 3.25)
project ("UnicodeExperiments")
# Enable Hot Reload for MSVC compilers if supported.
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
add_library (DefaultCompilerSettings INTERFACE)
if (MSVC)
target_compile_options(DefaultCompilerSettings INTERFACE "/utf-8")
target_compile_definitions(DefaultCompilerSettings INTERFACE
_ENABLE_EXTENDED_ALIGNED_STORAGE
)
endif()
if(WIN32)
target_compile_definitions(DefaultCompilerSettings INTERFACE
_WIN32_WINNT=0x0A00
NOMINMAX
UNICODE
_UNICODE
)
endif()
add_executable (UTF8Everywhere)
target_sources (UTF8Everywhere
PRIVATE
"utf8everywhere.cpp"
"utils.h"
)
if(WIN32)
target_sources (UTF8Everywhere
PRIVATE
"cp-utf8.manifest"
)
endif()
target_link_libraries(UTF8Everywhere PRIVATE DefaultCompilerSettings)
set_target_properties(UTF8Everywhere PROPERTIES CXX_STANDARD 23)
if(WIN32)
add_executable (UTF8OnLegacyWindows)
target_sources (UTF8OnLegacyWindows
PRIVATE
"utf8legacywindows.cpp"
"utils.h"
)
target_link_libraries(UTF8OnLegacyWindows PRIVATE DefaultCompilerSettings)
set_target_properties(UTF8OnLegacyWindows PROPERTIES CXX_STANDARD 23)
endif()