mirror of
https://github.com/reactos/reactos.git
synced 2025-01-10 16:18:16 +00:00
[CMAKE]
Add a set_rc_compiler macro, its a workaround for lack of mingw RC support in cmake. Enable winemine build. Improve user32 CMakeLists.txt. Thanks to AmineKhaldi for initial support of resources in user32. svn path=/branches/cmake-bringup/; revision=48906
This commit is contained in:
parent
3b92867c2a
commit
c0c597d9c6
5 changed files with 76 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
|||
|
||||
add_subdirectory(solitaire)
|
||||
#add_subdirectory(spider)
|
||||
#add_subdirectory(winemine)
|
||||
add_subdirectory(winemine)
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
|
||||
|
||||
add_executable(winemine
|
||||
main.c
|
||||
dialog.c
|
||||
rsrc.rc)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set_unicode(winemine yes)
|
||||
|
||||
set_module_type(winemine win32gui)
|
||||
set_rc_compiler()
|
||||
|
||||
add_importlibs(winemine user32 gdi32 advapi32 shell32 msvcrt)
|
|
@ -8,20 +8,61 @@ include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/reactos/wine)
|
|||
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys)
|
||||
include_directories(include)
|
||||
|
||||
get_directory_property(defines COMPILE_DEFINITIONS)
|
||||
get_directory_property(includes INCLUDE_DIRECTORIES)
|
||||
set_rc_compiler()
|
||||
|
||||
foreach(arg ${defines})
|
||||
set(result_defs "${result_defs} -D${arg}")
|
||||
endforeach(arg ${defines})
|
||||
|
||||
foreach(arg ${includes})
|
||||
set(result_incs "-I${arg} ${result_incs}")
|
||||
endforeach(arg ${includes})
|
||||
|
||||
SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> ${result_defs} ${result_incs} -i <SOURCE> -O coff -o <OBJECT>")
|
||||
|
||||
file(GLOB_RECURSE SOURCE *.c)
|
||||
list(APPEND SOURCE
|
||||
user32_stubs.c
|
||||
controls/button.c
|
||||
controls/combo.c
|
||||
controls/edit.c
|
||||
controls/icontitle.c
|
||||
controls/listbox.c
|
||||
controls/regcontrol.c
|
||||
controls/scrollbar.c
|
||||
controls/static.c
|
||||
misc/dde.c
|
||||
misc/ddeclient.c
|
||||
misc/ddeserver.c
|
||||
misc/desktop.c
|
||||
misc/display.c
|
||||
misc/dllmain.c
|
||||
misc/exit.c
|
||||
misc/exticon.c
|
||||
misc/imm.c
|
||||
misc/misc.c
|
||||
misc/object.c
|
||||
misc/resources.c
|
||||
misc/rtlstr.c
|
||||
misc/stubs.c
|
||||
misc/timer.c
|
||||
misc/usrapihk.c
|
||||
misc/winhelp.c
|
||||
misc/winsta.c
|
||||
misc/wsprintf.c
|
||||
windows/accel.c
|
||||
windows/caret.c
|
||||
windows/class.c
|
||||
windows/clipboard.c
|
||||
windows/cursoricon.c
|
||||
windows/dc.c
|
||||
windows/defwnd.c
|
||||
windows/dialog.c
|
||||
windows/draw.c
|
||||
windows/font.c
|
||||
windows/hook.c
|
||||
windows/input.c
|
||||
windows/mdi.c
|
||||
windows/menu.c
|
||||
windows/messagebox.c
|
||||
windows/message.c
|
||||
windows/nonclient.c
|
||||
windows/paint.c
|
||||
windows/prop.c
|
||||
windows/rect.c
|
||||
windows/spy.c
|
||||
windows/text.c
|
||||
windows/window.c
|
||||
windows/winpos.c)
|
||||
|
||||
add_library(user32 SHARED
|
||||
${SOURCE}
|
||||
|
|
16
gcc.cmake
16
gcc.cmake
|
@ -93,4 +93,18 @@ macro(set_unicode MODULE STATE)
|
|||
target_link_libraries(${MODULE} mingw_common)
|
||||
endmacro()
|
||||
|
||||
|
||||
# Workaround lack of mingw RC support in cmake
|
||||
macro(set_rc_compiler)
|
||||
get_directory_property(defines COMPILE_DEFINITIONS)
|
||||
get_directory_property(includes INCLUDE_DIRECTORIES)
|
||||
|
||||
foreach(arg ${defines})
|
||||
set(result_defs "${result_defs} -D${arg}")
|
||||
endforeach(arg ${defines})
|
||||
|
||||
foreach(arg ${includes})
|
||||
set(result_incs "-I${arg} ${result_incs}")
|
||||
endforeach(arg ${includes})
|
||||
|
||||
SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> ${result_defs} ${result_incs} -i <SOURCE> -O coff -o <OBJECT>")
|
||||
endmacro()
|
||||
|
|
|
@ -62,3 +62,6 @@ endif()
|
|||
set(CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od")
|
||||
|
||||
macro(set_rc_compiler)
|
||||
# dummy, this workaround is only needed in mingw due to lack of RC support in cmake
|
||||
endmacro()
|
Loading…
Reference in a new issue