Skip to content

Commit 7efab12

Browse files
authored
[CMAKE] Introduce set_wine_module (Retry) (reactos#7860)
Re-trial of reactos#7800. Deleting __WINESRC__ hacks. JIRA issue: CORE-5743 - Add sdk/cmake/set_wine_module.cmake. - Load set_wine_module.cmake at top-level CMakeLists.txt. - Use set_wine_module cmake function and delete __WINESRC__ as possible. - Delete many include_directories.
1 parent 125f94d commit 7efab12

File tree

182 files changed

+218
-356
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+218
-356
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ include(sdk/cmake/config.cmake)
6868
# Compiler flags handling
6969
include(sdk/cmake/compilerflags.cmake)
7070

71+
# set_wine_module function
72+
include(sdk/cmake/set_wine_module.cmake)
73+
7174
add_definitions(
7275
-D__REACTOS__
7376
# swprintf without count argument is used in most of the codebase

base/applications/cmdutils/cscript/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
add_definitions(-DCSCRIPT_BUILD -D__WINESRC__)
2+
add_definitions(-DCSCRIPT_BUILD)
33
set(wscript_folder ${REACTOS_SOURCE_DIR}/base/applications/cmdutils/wscript)
44
include_directories(${wscript_folder})
55

@@ -20,3 +20,4 @@ add_importlibs(cscript shell32 oleaut32 ole32 advapi32 user32 msvcrt kernel32 nt
2020
add_dependencies(cscript stdole2 cscript_idlheader)
2121
add_pch(cscript ${wscript_folder}/precomp.h SOURCE)
2222
add_cd_file(TARGET cscript DESTINATION reactos/system32 FOR all)
23+
set_wine_module_FIXME(cscript) # CORE-5743: No ARRAY_SIZE macro

base/applications/cmdutils/reg/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
remove_definitions(-D_WIN32_WINNT=0x502)
33
add_definitions(-D_WIN32_WINNT=0x600)
44

5-
add_definitions(-D__WINESRC__)
65
add_executable(reg add.c copy.c delete.c export.c import.c query.c reg.c reg.rc)
76
set_module_type(reg win32cui UNICODE)
87
target_link_libraries(reg wine oldnames)
98
add_importlibs(reg advapi32 advapi32_vista user32 msvcrt kernel32 ntdll)
109
add_cd_file(TARGET reg DESTINATION reactos/system32 FOR all)
10+
set_wine_module_FIXME(reg) # CORE-5743: No ARRAY_SIZE macro
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
add_definitions(-D__WINESRC__)
32
add_executable(taskkill taskkill.c taskkill.rc)
43
target_link_libraries(taskkill wine)
54
set_module_type(taskkill win32cui UNICODE)
65
add_importlibs(taskkill psapi user32 msvcrt kernel32 ntdll)
76
add_cd_file(TARGET taskkill DESTINATION reactos/system32 FOR all)
7+
set_wine_module_FIXME(taskkill) # CORE-5743: No ARRAY_SIZE macro
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
add_definitions(-D__WINESRC__)
32
add_executable(wmic main.c wmic.rc)
43
target_link_libraries(wmic wine)
54
set_module_type(wmic win32cui UNICODE)
65
add_importlibs(wmic oleaut32 ole32 user32 msvcrt kernel32 ntdll)
76
add_cd_file(TARGET wmic DESTINATION reactos/system32/wbem FOR all)
7+
set_wine_module_FIXME(wmic) # CORE-5743: No ARRAY_SIZE macro

base/applications/cmdutils/wscript/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11

2-
add_definitions(-D__WINESRC__)
3-
42
list(APPEND SOURCE
53
arguments.c
64
host.c
@@ -18,3 +16,4 @@ add_importlibs(wscript shell32 oleaut32 ole32 user32 advapi32 msvcrt kernel32 nt
1816
add_dependencies(wscript stdole2 wscript_idlheader)
1917
add_pch(wscript precomp.h SOURCE)
2018
add_cd_file(TARGET wscript DESTINATION reactos/system32 FOR all)
19+
set_wine_module_FIXME(wscript) # CORE-5743: No ARRAY_SIZE macro
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
add_definitions(-D__WINESRC__)
32
add_executable(xcopy xcopy.c xcopy.rc)
43
target_link_libraries(xcopy wine)
54
set_module_type(xcopy win32cui UNICODE)
65
add_importlibs(xcopy shell32 user32 msvcrt kernel32 ntdll)
76
add_cd_file(TARGET xcopy DESTINATION reactos/system32 FOR all)
7+
set_wine_module_FIXME(xcopy) # CORE-5743: No ARRAY_SIZE macro
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
add_definitions(-D__WINESRC__)
32
add_executable(extrac32 extrac32.c)
43
target_link_libraries(extrac32 wine)
54
set_module_type(extrac32 win32gui UNICODE)
65
add_importlibs(extrac32 shell32 setupapi shlwapi user32 msvcrt kernel32 ntdll)
76
add_cd_file(TARGET extrac32 DESTINATION reactos/system32 FOR all)
7+
set_wine_module_FIXME(extrac32) # CORE-5743: No ARRAY_SIZE macro

base/applications/winhlp32/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11

2-
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
3-
42
add_definitions(
5-
-D__WINESRC__
63
-D__ROS_LONG64__
74
-Dstrcasecmp=_stricmp
85
)
@@ -31,3 +28,4 @@ target_link_libraries(winhlp32 wine oldnames)
3128
add_importlibs(winhlp32 user32 gdi32 shell32 comctl32 comdlg32 msvcrt kernel32 ntdll)
3229
add_pch(winhlp32 precomp.h "${PCH_SKIP_SOURCE}")
3330
add_cd_file(TARGET winhlp32 DESTINATION reactos FOR all)
31+
set_wine_module_FIXME(winhlp32) # CORE-5743: No ARRAY_SIZE macro

base/system/msiexec/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11

2-
add_definitions(-D__WINESRC__)
32
remove_definitions(-D_CRT_NON_CONFORMING_SWPRINTFS)
4-
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/wine)
53

64
list(APPEND SOURCE
75
msiexec.c
@@ -15,3 +13,4 @@ target_link_libraries(msiexec uuid wine)
1513
add_importlibs(msiexec user32 advapi32 ole32 comctl32 msi msvcrt kernel32 ntdll)
1614
add_pch(msiexec precomp.h SOURCE)
1715
add_cd_file(TARGET msiexec DESTINATION reactos/system32 FOR all)
16+
set_wine_module_FIXME(msiexec) # CORE-5743: No ARRAY_SIZE macro

0 commit comments

Comments
 (0)