-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
123 lines (106 loc) · 2.77 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# RPaint --- Independent ReactOS Paint
# CMake minimum version
cmake_minimum_required(VERSION 3.5)
# Set policy
cmake_policy(SET CMP0079 NEW)
# project name and languages
project(RPaint C CXX RC)
##############################################################################
# Architecture
if (MSVC)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
add_definitions(-D_AMD64_ -D_M_AMD64)
else()
add_definitions(-D_X86_ -D_M_IX86)
endif()
endif()
##############################################################################
# RATL
# option ENABLE_ATLTESTS
option(ENABLE_ATLTESTS "Enable ATL tests" OFF)
# RATL
add_subdirectory(RATL)
# get RATL variables
get_directory_property(RATL_DEFINITIONS DIRECTORY RATL DEFINITION RATL_DEFINITIONS)
get_directory_property(RATL_INCLUDE_DIRS DIRECTORY RATL DEFINITION RATL_INCLUDE_DIRS)
get_directory_property(RATL_LIBRARIES DIRECTORY RATL DEFINITION RATL_LIBRARIES)
##############################################################################
# mspaint.exe
add_executable(mspaint WIN32
canvas.cpp
dialogs.cpp
dib.cpp
drawing.cpp
fullscreen.cpp
history.cpp
main.cpp
miniature.cpp
mouse.cpp
palette.cpp
palettemodel.cpp
registry.cpp
selectionmodel.cpp
sizebox.cpp
textedit.cpp
toolbox.cpp
toolsettings.cpp
toolsmodel.cpp
rsrc.rc)
target_compile_definitions(mspaint PRIVATE
__RPAINT__
UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS
-DUNREACHABLE=
LANGUAGE_BG_BG
LANGUAGE_CS_CZ
LANGUAGE_DA_DK
LANGUAGE_DE_DE
LANGUAGE_EL_GR
LANGUAGE_EN_US
LANGUAGE_ES_ES
LANGUAGE_ET_EE
LANGUAGE_EU_ES
LANGUAGE_FI_FI
LANGUAGE_FR_FR
LANGUAGE_HE_IL
LANGUAGE_HI_IN
LANGUAGE_HR_HR
LANGUAGE_HU_HU
LANGUAGE_HY_AM
LANGUAGE_ID_ID
LANGUAGE_IT_IT
LANGUAGE_JA_JP
LANGUAGE_KO_KR
LANGUAGE_LT_LT
LANGUAGE_MS_MY
LANGUAGE_NB_NO
LANGUAGE_NL_NL
LANGUAGE_NO_NO
LANGUAGE_PL_PL
LANGUAGE_PT_BR
LANGUAGE_PT_PT
LANGUAGE_RO_RO
LANGUAGE_RU_RU
LANGUAGE_SK_SK
LANGUAGE_SL_SI
LANGUAGE_SQ_AL
LANGUAGE_SV_SE
LANGUAGE_TH_TH
LANGUAGE_TR_TR
LANGUAGE_UK_UA
LANGUAGE_UZ_UZ
LANGUAGE_ZH_CN
LANGUAGE_ZH_HK
LANGUAGE_ZH_TW
${RATL_DEFINITIONS})
if (NOT MSVC)
target_link_options(mspaint BEFORE PRIVATE -municode)
endif()
target_include_directories(mspaint PRIVATE ./ reactos/ ${RATL_INCLUDE_DIRS})
target_link_libraries(mspaint PRIVATE user32 gdi32 comctl32 comdlg32 advapi32 shell32 msvcrt kernel32 ${RATL_LIBRARIES})
if (MSVC)
# Use wWinMain
target_link_options(mspaint PRIVATE "/entry:wWinMainCRTStartup")
# No default manifest
target_link_options(mspaint PRIVATE /MANIFEST:NO)
endif()
##############################################################################