mirror of
https://github.com/reactos/reactos.git
synced 2024-08-20 02:13:29 +00:00
[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. svn path=/branches/cmake-bringup/; revision=49218
This commit is contained in:
parent
cba659a83a
commit
493475d8d2
|
@ -40,9 +40,9 @@ add_subdirectory(tools)
|
|||
add_subdirectory(lib)
|
||||
|
||||
if(NOT MSVC)
|
||||
export(TARGETS widl 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 FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
|
||||
export(TARGETS winebuild nci buildno gendib cdmake mkhive FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
@ -97,6 +97,7 @@ include_directories(include/reactos/libs)
|
|||
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
|
||||
|
@ -114,6 +115,25 @@ add_custom_command(
|
|||
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)
|
||||
add_subdirectory(dll)
|
||||
|
|
|
@ -116,11 +116,17 @@ MACRO(ADD_INTERFACE_DEFINITIONS TARGET)
|
|||
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)
|
||||
|
||||
if("${ARGN}" STREQUAL "")
|
||||
get_filename_component(_nameoncd ${FILENAME} NAME)
|
||||
else()
|
||||
set(_nameoncd ${ARGN})
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${REACTOS_BINARY_DIR}/boot/bootcd/${_dir}/${_nameoncd}
|
||||
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 @@ MACRO(add_minicd FILENAME _dir _nameoncd)
|
|||
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)
|
||||
|
|
|
@ -206,6 +206,23 @@ target_link_libraries(setupldr
|
|||
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)
|
|
@ -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)
|
||||
|
|
6
include/reactos/wine/CMakeLists.txt
Normal file
6
include/reactos/wine/CMakeLists.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
list(APPEND SOURCE
|
||||
epm.idl
|
||||
irot.idl)
|
||||
|
||||
MACRO_IDL_FILES(${SOURCE})
|
||||
ADD_INTERFACE_DEFINITIONS(winesdk ${SOURCE})
|
Loading…
Reference in a new issue