Author: spetreolle
Date: Fri Oct 22 13:15:58 2010
New Revision: 49218
URL:
http://svn.reactos.org/svn/reactos?rev=49218&view=rev
Log:
[CMAKE]
Add mkhive to build.
Add livecd target.
Make filename optional in add_mini_target, using the target one as default.
Move MACRO_IDL_FILES to CMakeMacros.cmake.
Add rpcproxy macro.
Build interface definitions headers for epm and irot.
Added:
branches/cmake-bringup/include/reactos/wine/CMakeLists.txt (with props)
branches/cmake-bringup/tools/mkhive/CMakeLists.txt (with props)
Modified:
branches/cmake-bringup/CMakeLists.txt
branches/cmake-bringup/CMakeMacros.cmake
branches/cmake-bringup/boot/CMakeLists.txt
branches/cmake-bringup/include/reactos/idl/CMakeLists.txt
branches/cmake-bringup/tools/CMakeLists.txt
Modified: branches/cmake-bringup/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeLists.txt?re…
==============================================================================
--- branches/cmake-bringup/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/CMakeLists.txt [iso-8859-1] Fri Oct 22 13:15:58 2010
@@ -40,9 +40,9 @@
add_subdirectory(lib)
if(NOT MSVC)
-export(TARGETS widl winebuild nci buildno gendib cdmake FILE
${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
-else()
-export(TARGETS winebuild nci buildno gendib cdmake FILE
${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
+export(TARGETS widl winebuild nci buildno gendib cdmake mkhive FILE
${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
+else()
+export(TARGETS winebuild nci buildno gendib cdmake mkhive FILE
${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
endif()
else()
@@ -97,6 +97,7 @@
add_subdirectory(include/psdk)
add_subdirectory(include/dxsdk)
add_subdirectory(include/reactos/idl)
+add_subdirectory(include/reactos/wine)
add_subdirectory(include/reactos/mc)
#minicd target
@@ -113,6 +114,25 @@
DEPENDS native-cdmake)
add_custom_target(minicd DEPENDS ${REACTOS_BINARY_DIR}/minicd.iso)
add_minicd(${REACTOS_SOURCE_DIR}/boot/bootdata/bootcd.ini "" freeldr.ini)
+
+#livecd target
+set(LIVECD_DIR "${REACTOS_BINARY_DIR}/boot/livecd")
+
+file(MAKE_DIRECTORY "${LIVECD_DIR}")
+file(MAKE_DIRECTORY "${LIVECD_DIR}/loader")
+file(MAKE_DIRECTORY "${LIVECD_DIR}/reactos")
+file(MAKE_DIRECTORY "${LIVECD_DIR}/reactos/fonts")
+file(MAKE_DIRECTORY "${LIVECD_DIR}/reactos/system32")
+file(MAKE_DIRECTORY "${LIVECD_DIR}/reactos/system32/config")
+
+
+
+add_custom_command(
+ OUTPUT ${REACTOS_BINARY_DIR}/livecd.iso
+ COMMAND native-cdmake -v -j -m -b
${CMAKE_CURRENT_BINARY_DIR}/boot/freeldr/bootsect/isoboot.bin ${LIVECD_DIR} REACTOS
${REACTOS_BINARY_DIR}/livecd.iso
+ DEPENDS native-cdmake)
+add_custom_target(livecd DEPENDS ${REACTOS_BINARY_DIR}/livecd.iso)
+add_livecd(${REACTOS_SOURCE_DIR}/boot/bootdata/livecd.ini "" freeldr.ini)
add_subdirectory(base)
add_subdirectory(boot)
Modified: branches/cmake-bringup/CMakeMacros.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeMacros.cmake…
==============================================================================
--- branches/cmake-bringup/CMakeMacros.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/CMakeMacros.cmake [iso-8859-1] Fri Oct 22 13:15:58 2010
@@ -116,11 +116,17 @@
ADD_CUSTOM_TARGET(${TARGET} ALL DEPENDS ${OBJECTS})
ENDMACRO()
-MACRO(add_minicd_target _targetname _dir _nameoncd)
+MACRO(add_minicd_target _targetname _dir) # optional parameter: _nameoncd
get_target_property(FILENAME ${_targetname} LOCATION)
- add_custom_command(
- OUTPUT ${REACTOS_BINARY_DIR}/boot/bootcd/${_dir}/${_nameoncd}
+ if("${ARGN}" STREQUAL "")
+ get_filename_component(_nameoncd ${FILENAME} NAME)
+ else()
+ set(_nameoncd ${ARGN})
+ endif()
+
+ add_custom_command(
+ OUTPUT ${BOOTCD_DIR}/${_dir}/${_nameoncd}
COMMAND ${CMAKE_COMMAND} -E copy ${FILENAME} ${BOOTCD_DIR}/${_dir}/${_nameoncd})
add_custom_target(${_targetname}_minicd DEPENDS ${BOOTCD_DIR}/${_dir}/${_nameoncd})
@@ -138,9 +144,115 @@
add_custom_target(${_nameoncd}_minicd DEPENDS ${BOOTCD_DIR}/${_dir}/${_nameoncd})
add_dependencies(minicd ${_nameoncd}_minicd)
-ENDMACRO(add_minicd)
+ENDMACRO(add_minicd)
macro(set_cpp)
include_directories(BEFORE ${REACTOS_SOURCE_DIR}/lib/3rdparty/stlport/stlport)
set(IS_CPP 1)
-endmacro()
+endmacro()
+
+MACRO(add_livecd_target _targetname _dir )# optional parameter : _nameoncd
+
+ get_target_property(FILENAME ${_targetname} LOCATION)
+
+ if("${ARGN}" STREQUAL "")
+ get_filename_component(_nameoncd ${FILENAME} NAME)
+ else()
+ set(_nameoncd ${ARGN})
+ endif()
+
+ add_custom_command(
+ OUTPUT ${LIVECD_DIR}/${_dir}/${_nameoncd}
+ COMMAND ${CMAKE_COMMAND} -E copy ${FILENAME} ${LIVECD_DIR}/${_dir}/${_nameoncd})
+
+ add_custom_target(${_targetname}_livecd DEPENDS ${LIVECD_DIR}/${_dir}/${_nameoncd})
+
+ add_dependencies(${_targetname}_livecd ${_targetname})
+ add_dependencies(livecd ${_targetname}_livecd)
+ENDMACRO(add_livecd_target _targetname _dir _nameoncd)
+
+MACRO(add_livecd FILENAME _dir _nameoncd)
+ add_custom_command(
+ OUTPUT ${LIVECD_DIR}/${_dir}/${_nameoncd}
+ DEPENDS ${FILENAME}
+ COMMAND ${CMAKE_COMMAND} -E copy ${FILENAME} ${LIVECD_DIR}/${_dir}/${_nameoncd})
+
+ add_custom_target(${_nameoncd}_livecd DEPENDS ${LIVECD_DIR}/${_dir}/${_nameoncd})
+
+ add_dependencies(livecd ${_nameoncd}_livecd)
+ENDMACRO(add_livecd)
+
+macro(custom_incdefs)
+ if(NOT DEFINED result_incs) #rpc_defines
+ get_directory_property(rpc_defines COMPILE_DEFINITIONS)
+ get_directory_property(rpc_includes INCLUDE_DIRECTORIES)
+
+ foreach(arg ${rpc_defines})
+ set(result_defs ${result_defs} -D${arg})
+ endforeach(arg ${defines})
+
+ foreach(arg ${rpc_includes})
+ set(result_incs -I${arg} ${result_incs})
+ endforeach(arg ${includes})
+ endif()
+endmacro(custom_incdefs)
+
+macro(rpcproxy TARGET)
+ custom_incdefs()
+ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c)
+
+ foreach(_in_FILE ${ARGN})
+ get_filename_component(FILE ${_in_FILE} NAME_WE)
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c
+ COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.h -p -P ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c
${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl
+ DEPENDS native-widl)
+ set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c
+ PROPERTIES GENERATED TRUE)
+ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c)
+ list(APPEND IDLS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl)
+ list(APPEND PROXY_DEPENDS ${TARGET}_${FILE}_p)
+ add_custom_target(${TARGET}_${FILE}_p
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_p.c)
+ #add_dependencies(${TARGET}_proxy ${TARGET}_${FILE}_p)
+ endforeach(_in_FILE ${ARGN})
+
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c
+ COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 --dlldata-only
--dlldata=${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c ${IDLS}
+ DEPENDS native-widl)
+ set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_proxy.dlldata.c
+ PROPERTIES GENERATED TRUE)
+
+ add_library(${TARGET}_proxy ${SOURCE})
+ add_dependencies(${TARGET}_proxy psdk ${PROXY_DEPENDS})
+endmacro(rpcproxy)
+
+macro (MACRO_IDL_FILES)
+ custom_incdefs()
+ foreach(_in_FILE ${ARGN})
+ get_filename_component(FILE ${_in_FILE} NAME_WE)
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c
+ COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h -s -S ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c
${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl
+ DEPENDS native-widl)
+ set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c
+ PROPERTIES GENERATED TRUE)
+ add_library(${FILE}_server ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c)
+ add_dependencies(${FILE}_server psdk)
+
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c
+ COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h -c -C ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c
${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl
+ DEPENDS native-widl)
+ set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c
+ PROPERTIES GENERATED TRUE)
+ add_library(${FILE}_client ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c)
+ add_dependencies(${FILE}_client psdk)
+ endforeach(_in_FILE ${ARGN})
+
+endmacro (MACRO_IDL_FILES)
Modified: branches/cmake-bringup/boot/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/CMakeLists.t…
==============================================================================
--- branches/cmake-bringup/boot/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/boot/CMakeLists.txt [iso-8859-1] Fri Oct 22 13:15:58 2010
@@ -206,6 +206,23 @@
rtl
libcntpr)
+list(APPEND LIVECD_HIVES
+ ${CMAKE_CURRENT_SOURCE_DIR}/bootdata/livecd.inf
+ ${CMAKE_CURRENT_SOURCE_DIR}/bootdata/hiveinst_i386.inf)
+
+add_custom_command(
+ OUTPUT ${LIVECD_DIR}/reactos/system32/config/sam
+
+ COMMAND native-mkhive ${CMAKE_CURRENT_SOURCE_DIR}/bootdata
${LIVECD_DIR}/reactos/system32/config/ ${ARCH} ${LIVECD_HIVES}
+ DEPENDS native-mkhive)
+
+add_custom_target(livecd_hives DEPENDS ${LIVECD_DIR}/reactos/system32/config/sam)
+
+# Bootcd files
add_minicd_target(setupldr loader setupldr.sys)
add_minicd_target(freeldr loader freeldr.sys)
-add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/bootdata/txtsetup.sif reactos txtsetup.sif)
+add_minicd(${CMAKE_CURRENT_SOURCE_DIR}/bootdata/txtsetup.sif reactos txtsetup.sif)
+
+# Livecd files
+add_livecd_target(setupldr loader)
+add_dependencies(livecd livecd_hives isoboot)
Modified: branches/cmake-bringup/include/reactos/idl/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/reactos/i…
==============================================================================
--- branches/cmake-bringup/include/reactos/idl/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/include/reactos/idl/CMakeLists.txt [iso-8859-1] Fri Oct 22
13:15:58 2010
@@ -1,52 +1,13 @@
-
-remove_definitions(-DWINVER=0x502)
-add_definitions(-DWINVER=0x600)
include_directories(.)
-
-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})
-
-macro (MACRO_IDL_FILES)
-
- foreach(_in_FILE ${ARGN})
- get_filename_component(FILE ${_in_FILE} NAME_WE)
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c
- COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h -s -S ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c
${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl
- DEPENDS native-widl)
- set_source_files_properties(
- ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c
- PROPERTIES GENERATED TRUE)
- add_library(${FILE}_server ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c)
- add_dependencies(${FILE}_server psdk)
-
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c
- COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h -c -C ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c
${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl
- DEPENDS native-widl)
- set_source_files_properties(
- ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h
${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c
- PROPERTIES GENERATED TRUE)
- add_library(${FILE}_client ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c)
- add_dependencies(${FILE}_client psdk)
- endforeach(_in_FILE ${ARGN})
-
-endmacro (MACRO_IDL_FILES)
list(APPEND SOURCE
eventlogrpc.idl
lsa.idl
- pnp.idl
svcctl.idl
wlansvc.idl)
MACRO_IDL_FILES(${SOURCE})
+remove_definitions(-DWINNT=0x502)
+add_definitions(-DWINNT=0x600)
+MACRO_IDL_FILES(pnp.idl)
Added: branches/cmake-bringup/include/reactos/wine/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/reactos/w…
==============================================================================
--- branches/cmake-bringup/include/reactos/wine/CMakeLists.txt (added)
+++ branches/cmake-bringup/include/reactos/wine/CMakeLists.txt [iso-8859-1] Fri Oct 22
13:15:58 2010
@@ -1,0 +1,6 @@
+list(APPEND SOURCE
+ epm.idl
+ irot.idl)
+
+MACRO_IDL_FILES(${SOURCE})
+ADD_INTERFACE_DEFINITIONS(winesdk ${SOURCE})
Propchange: branches/cmake-bringup/include/reactos/wine/CMakeLists.txt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/cmake-bringup/tools/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/tools/CMakeLists.…
==============================================================================
--- branches/cmake-bringup/tools/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/tools/CMakeLists.txt [iso-8859-1] Fri Oct 22 13:15:58 2010
@@ -4,11 +4,12 @@
#add_executable(pefixup pefixup.c)
add_subdirectory(buildno)
+add_subdirectory(cdmake)
add_subdirectory(gendib)
+add_subdirectory(mkhive)
add_subdirectory(nci)
+add_subdirectory(unicode)
add_subdirectory(winebuild)
-add_subdirectory(unicode)
-add_subdirectory(cdmake)
if(NOT MSVC)
#add_subdirectory(rsym)
add_subdirectory(wpp)
Added: branches/cmake-bringup/tools/mkhive/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/tools/mkhive/CMak…
==============================================================================
--- branches/cmake-bringup/tools/mkhive/CMakeLists.txt (added)
+++ branches/cmake-bringup/tools/mkhive/CMakeLists.txt [iso-8859-1] Fri Oct 22 13:15:58
2010
@@ -1,0 +1,17 @@
+list(APPEND SOURCE
+ binhive.c
+ cmi.c
+ mkhive.c
+ reginf.c
+ registry.c
+ rtl.c)
+
+add_definitions(-DMKHIVE_HOST)
+add_definitions(-DWINE_UNICODE_API= )
+
+include_directories(${REACTOS_SOURCE_DIR}/lib/newinflib)
+include_directories(${REACTOS_SOURCE_DIR}/lib/cmlib)
+include_directories(${REACTOS_SOURCE_DIR}/lib/rtl)
+
+add_executable(mkhive ${SOURCE})
+target_link_libraries(mkhive unicode cmlibhost newinflibhost)
Propchange: branches/cmake-bringup/tools/mkhive/CMakeLists.txt
------------------------------------------------------------------------------
svn:eol-style = native