Author: akhaldi
Date: Mon Jun 13 10:36:40 2011
New Revision: 52210
URL:
http://svn.reactos.org/svn/reactos?rev=52210&view=rev
Log:
[CMAKE]
* Move cmake files to the cmake folder.
* Rename msc.cmake to msvc.cmake and toolchain-mingw32.cmake to toolchain-gcc.cmake.
* Add compilerflags.cmake to group macros that handle different compiler flags.
* Move add_linkerflag and set_unicode macros to compilerflags.cmake. They were duplicated
in gcc.cmake and msvc.cmake.
* Add add_compiler_flags macro to handle CMAKE_C_FLAGS and CMAKE_CXX_FLAGS properly, and
replace add_definitions calls with add_compiler_flags calls when we're adding compiler
flags, not definitions.
* Reorganize gcc.cmake to have compiler flags then linking and compiling rules.
* Move CMAKE_ASM_COMPILE_OBJECT out of toolchain-gcc.cmake into gcc.cmake and add
${CMAKE_C_FLAGS} to it, now that flags are properly set.
* Don't pass <FLAGS> (compiler flags) when linking.
* Without the (commented out) linker script flag, CMAKE_SHARED_LINKER_FLAGS_INIT is the
same for both i386 and amd64. Deduplicate it.
* Fix CMAKE_C_STANDARD_LIBRARIES comment.
* Use <FLAGS> in msvc CMAKE_ASM_COMPILE_OBJECT instead of manual includes.
* Don't set ntdllsys linker language to C, it's an asm lib.
* Remove ros_cd.cmake as it's not needed anymore.
* Define _CRT_SECURE_NO_WARNINGS when compiling host tools with msvc.
Added:
trunk/reactos/cmake/CMakeMacros.cmake
- copied, changed from r52200, trunk/reactos/CMakeMacros.cmake
trunk/reactos/cmake/baseaddress.cmake
- copied unchanged from r52200, trunk/reactos/baseaddress.cmake
trunk/reactos/cmake/compilerflags.cmake (with props)
trunk/reactos/cmake/config-amd64.cmake
- copied unchanged from r52200, trunk/reactos/config-amd64.cmake
trunk/reactos/cmake/config-arm.cmake
- copied unchanged from r52200, trunk/reactos/config-arm.cmake
trunk/reactos/cmake/config.cmake
- copied unchanged from r52200, trunk/reactos/config.cmake
trunk/reactos/cmake/gcc.cmake
- copied, changed from r52200, trunk/reactos/gcc.cmake
trunk/reactos/cmake/msvc.cmake
- copied, changed from r52200, trunk/reactos/msc.cmake
trunk/reactos/toolchain-gcc.cmake
- copied, changed from r52200, trunk/reactos/toolchain-mingw32.cmake
Removed:
trunk/reactos/CMakeMacros.cmake
trunk/reactos/baseaddress.cmake
trunk/reactos/config-amd64.cmake
trunk/reactos/config-arm.cmake
trunk/reactos/config.cmake
trunk/reactos/gcc.cmake
trunk/reactos/msc.cmake
trunk/reactos/ros_cd.cmake
trunk/reactos/toolchain-mingw32.cmake
Modified:
trunk/reactos/CMakeLists.txt
trunk/reactos/configure.cmd
trunk/reactos/configure.sh
trunk/reactos/ntoskrnl/CMakeLists.txt
trunk/reactos/tools/CMakeLists.txt
Modified: trunk/reactos/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/CMakeLists.txt?rev=52210&a…
==============================================================================
--- trunk/reactos/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/CMakeLists.txt [iso-8859-1] Mon Jun 13 10:36:40 2011
@@ -8,7 +8,7 @@
project(REACTOS)
-#versioning
+# Versioning
include(include/reactos/version.cmake)
# Don't escape preprocessor definition values added via add_definitions
@@ -30,12 +30,15 @@
# Compile options
if(ARCH MATCHES i386)
- include(config.cmake)
+ include(cmake/config.cmake)
elseif(ARCH MATCHES amd64)
- include(config-amd64.cmake)
+ include(cmake/config-amd64.cmake)
elseif(ARCH MATCHES arm)
- include(config-arm.cmake)
-endif()
+ include(cmake/config-arm.cmake)
+endif()
+
+# Compiler flags handling
+include(cmake/compilerflags.cmake)
add_definitions(-D__REACTOS__ -D__ROS_CMAKE__)
@@ -46,7 +49,7 @@
if(MSVC)
add_definitions(-Dinline=__inline)
else()
- add_definitions(-fshort-wchar)
+ add_compiler_flags(-fshort-wchar)
endif()
include_directories(
@@ -133,13 +136,13 @@
# Compiler specific definitions and macros
if(MSVC)
- include(msc.cmake)
- else()
- include(gcc.cmake)
+ include(cmake/msvc.cmake)
+ else()
+ include(cmake/gcc.cmake)
endif()
# Generic macros
- include(CMakeMacros.cmake)
+ include(cmake/CMakeMacros.cmake)
# IDL macros for widl/midl
include(cmake/idl-support.cmake)
@@ -183,7 +186,7 @@
add_subdirectory(include/reactos/mc)
add_subdirectory(include/asm)
- include(baseaddress.cmake)
+ include(cmake/baseaddress.cmake)
#begin with boot so reactos_cab target is defined before all other modules
add_subdirectory(boot)
Removed: trunk/reactos/CMakeMacros.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/CMakeMacros.cmake?rev=5220…
==============================================================================
--- trunk/reactos/CMakeMacros.cmake [iso-8859-1] (original)
+++ trunk/reactos/CMakeMacros.cmake (removed)
@@ -1,228 +1,0 @@
-
-macro(set_cpp)
- include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/c++/stlport)
- set(IS_CPP 1)
- add_definitions(
- -DNATIVE_CPP_INCLUDE=${REACTOS_SOURCE_DIR}/include/c++
- -DNATIVE_C_INCLUDE=${REACTOS_SOURCE_DIR}/include/crt)
-endmacro()
-
-macro(add_dependency_node _node)
- if(GENERATE_DEPENDENCY_GRAPH)
- get_target_property(_type ${_node} TYPE)
- if(_type MATCHES SHARED_LIBRARY OR ${_node} MATCHES ntoskrnl)
- file(APPEND ${REACTOS_BINARY_DIR}/dependencies.graphml " <node
id=\"${_node}\"/>\n")
- endif()
- endif()
-endmacro()
-
-macro(add_dependency_edge _source _target)
- if(GENERATE_DEPENDENCY_GRAPH)
- get_target_property(_type ${_source} TYPE)
- if(_type MATCHES SHARED_LIBRARY)
- file(APPEND ${REACTOS_BINARY_DIR}/dependencies.graphml " <edge
source=\"${_source}\" target=\"${_target}\"/>\n")
- endif()
- endif()
-endmacro()
-
-macro(add_dependency_header)
- file(APPEND ${REACTOS_BINARY_DIR}/dependencies.graphml "<?xml
version=\"1.0\" encoding=\"UTF-8\"?>\n<graphml>\n <graph
id=\"ReactOS dependencies\" edgedefault=\"directed\">\n")
-endmacro()
-
-macro(add_dependency_footer)
- add_dependency_node(ntdll)
- file(APPEND ${REACTOS_BINARY_DIR}/dependencies.graphml "
</graph>\n</graphml>\n")
-endmacro()
-
-macro(add_message_headers)
- foreach(_in_FILE ${ARGN})
- get_filename_component(FILE ${_in_FILE} NAME_WE)
- macro_mc(${FILE})
- add_custom_command(
- OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc
${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h
- COMMAND ${COMMAND_MC}
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc)
- set_source_files_properties(
- ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h
${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc
- PROPERTIES GENERATED TRUE)
- add_custom_target(${FILE} ALL DEPENDS
${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h
${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc)
- endforeach()
-endmacro()
-
-macro(dir_to_num dir var)
- if(${dir} STREQUAL reactos/system32)
- set(${var} 1)
- elseif(${dir} STREQUAL reactos/system32/drivers)
- set(${var} 2)
- elseif(${dir} STREQUAL reactos/Fonts)
- set(${var} 3)
- elseif(${dir} STREQUAL reactos)
- set(${var} 4)
- elseif(${dir} STREQUAL reactos/system32/drivers/etc)
- set(${var} 5)
- elseif(${dir} STREQUAL reactos/inf)
- set(${var} 6)
- elseif(${dir} STREQUAL reactos/bin)
- set(${var} 7)
- elseif(${dir} STREQUAL reactos/media)
- set(${var} 8)
- else()
- message(ERROR "Wrong destination: ${dir}")
- endif()
-endmacro()
-
-function(add_cd_file)
- cmake_parse_arguments(_CD "NO_CAB"
"DESTINATION;NAME_ON_CD;TARGET" "FILE;FOR" ${ARGN})
- if(NOT (_CD_TARGET OR _CD_FILE))
- message(FATAL_ERROR "You must provide a target or a file to install!")
- endif()
-
- if(NOT _CD_DESTINATION)
- message(FATAL_ERROR "You must provide a destination")
- elseif(${_CD_DESTINATION} STREQUAL root)
- set(_CD_DESTINATION "")
- endif()
-
- if(NOT _CD_FOR)
- message(FATAL_ERROR "You must provide a cd name (or "all" for all
of them) to install the file on!")
- endif()
-
- #get file if we need to
- if(NOT _CD_FILE)
- get_target_property(_CD_FILE ${_CD_TARGET} LOCATION)
- endif()
-
- #do we add it to all CDs?
- if(_CD_FOR STREQUAL all)
- set(_CD_FOR "bootcd;livecd;regtest")
- endif()
-
- #do we add it to bootcd?
- list(FIND _CD_FOR bootcd __cd)
- if(NOT __cd EQUAL -1)
- #whether or not we should put it in reactos.cab or directly on cd
- if(_CD_NO_CAB)
- #directly on cd
- foreach(item ${_CD_FILE})
- file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcd.cmake "file(COPY
\"${item}\" DESTINATION \"\${CD_DIR}/${_CD_DESTINATION}\")\n")
- endforeach()
- if(_CD_NAME_ON_CD)
- get_filename_component(__file ${_CD_FILE} NAME)
- #rename it in the cd tree
- file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcd.cmake "file(RENAME
\${CD_DIR}/${_CD_DESTINATION}/${__file}
\${CD_DIR}/${_CD_DESTINATION}/${_CD_NAME_ON_CD})\n")
- endif()
- if(_CD_TARGET)
- #manage dependency
- add_dependencies(bootcd ${_CD_TARGET})
- endif()
- else()
- #add it in reactos.cab
- dir_to_num(${_CD_DESTINATION} _num)
- if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
- file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn
"${_CD_FILE} ${_num}\n")
- else()
- file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn
"\"${_CD_FILE}\" ${_num}\n")
- endif()
- if(_CD_TARGET)
- #manage dependency
- add_dependencies(reactos_cab ${_CD_TARGET})
- endif()
- endif()
- endif() #end bootcd
-
- #do we add it to livecd?
- list(FIND _CD_FOR livecd __cd)
- if(NOT __cd EQUAL -1)
- #manage dependency
- if(_CD_TARGET)
- add_dependencies(livecd ${_CD_TARGET})
- endif()
- foreach(item ${_CD_FILE})
- file(APPEND ${REACTOS_BINARY_DIR}/boot/livecd.cmake "file(COPY
\"${item}\" DESTINATION \"\${CD_DIR}/${_CD_DESTINATION}\")\n")
- endforeach()
- if(_CD_NAME_ON_CD)
- get_filename_component(__file ${_CD_FILE} NAME)
- #rename it in the cd tree
- file(APPEND ${REACTOS_BINARY_DIR}/boot/livecd.cmake "file(RENAME
\${CD_DIR}/${_CD_DESTINATION}/${__file}
\${CD_DIR}/${_CD_DESTINATION}/${_CD_NAME_ON_CD})\n")
- endif()
- endif() #end livecd
-
- #do we add it to regtest?
- list(FIND _CD_FOR regtest __cd)
- if(NOT __cd EQUAL -1)
- #whether or not we should put it in reactos.cab or directly on cd
- if(_CD_NO_CAB)
- #directly on cd
- foreach(item ${_CD_FILE})
- file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcdregtest.cmake
"file(COPY \"${item}\" DESTINATION
\"\${CD_DIR}/${_CD_DESTINATION}\")\n")
- endforeach()
- if(_CD_NAME_ON_CD)
- get_filename_component(__file ${_CD_FILE} NAME)
- #rename it in the cd tree
- file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcdregtest.cmake
"file(RENAME \${CD_DIR}/${_CD_DESTINATION}/${__file}
\${CD_DIR}/${_CD_DESTINATION}/${_CD_NAME_ON_CD})\n")
- endif()
- if(_CD_TARGET)
- #manage dependency
- add_dependencies(bootcdregtest ${_CD_TARGET})
- endif()
- else()
- #add it in reactos.cab
- #dir_to_num(${_CD_DESTINATION} _num)
- #file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn
"${_CD_FILE} ${_num}\n")
- #if(_CD_TARGET)
- # #manage dependency
- # add_dependencies(reactos_cab ${_CD_TARGET})
- #endif()
- endif()
- endif() #end bootcd
-endfunction()
-
-# Create module_clean targets
-function(add_clean_target target)
- if(CMAKE_GENERATOR MATCHES "Unix Makefiles" OR CMAKE_GENERATOR MATCHES
"MinGW Makefiles")
- set(CLEAN_COMMAND make clean)
- elseif(CMAKE_GENERATOR MATCHES "NMake Makefiles")
- set(CLEAN_COMMAND nmake clean)
- endif()
- add_custom_target(${target}_clean
- COMMAND ${CLEAN_COMMAND}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMENT "Cleaning ${target}")
-endfunction()
-
-if(NOT MSVC_IDE)
- function(add_library name)
- _add_library(${name} ${ARGN})
- add_clean_target(${name})
- endfunction()
-
- function(add_executable name)
- _add_executable(${name} ${ARGN})
- add_clean_target(${name})
- endfunction()
-endif()
-
-if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
- macro(to_win_path _cmake_path _native_path)
- string(REPLACE "/" "\\" ${_native_path}
"${_cmake_path}")
- endmacro()
-
- macro(concatenate_files _file1 _file2 _output)
- to_win_path("${_file1}" _real_file1)
- to_win_path("${_file2}" _real_file2)
- to_win_path("${_output}" _real_output)
- add_custom_command(
- OUTPUT ${_output}
- COMMAND cmd.exe /C "copy /Y /B ${_real_file1} + ${_real_file2}
${_real_output} > nul"
- DEPENDS ${_file1}
- DEPENDS ${_file2})
- endmacro()
-else()
- macro(concatenate_files _file1 _file2 _output)
- add_custom_command(
- OUTPUT ${_output}
- COMMAND cat ${_file1} ${_file2} > ${_output}
- DEPENDS ${_file1}
- DEPENDS ${_file2})
- endmacro()
-endif()
Removed: trunk/reactos/baseaddress.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/baseaddress.cmake?rev=5220…
==============================================================================
--- trunk/reactos/baseaddress.cmake [iso-8859-1] (original)
+++ trunk/reactos/baseaddress.cmake (removed)
@@ -1,262 +1,0 @@
-set(baseaddress_regtests 0x07000000)
-set(baseaddress_notifyhook 0x08000000)
-set(baseaddress_faultrep 0x107a0000)
-set(baseaddress_qmgrprxy 0x1f710000)
-set(baseaddress_cryptdlg 0x209c0000)
-set(baseaddress_comcat 0x20a50000)
-set(baseaddress_windowscodecs 0x26c40000)
-set(baseaddress_devenum 0x35670000)
-set(baseaddress_rsabase 0x35700000)
-set(baseaddress_rsaenh 0x35780000)
-set(baseaddress_url 0x42ea0000)
-set(baseaddress_wlanapi 0x470f0000)
-set(baseaddress_pidgen 0x473e0000)
-set(baseaddress_dwmapi 0x4a3f0000)
-set(baseaddress_t2embed 0x4b310000)
-set(baseaddress_msftedit 0x4b460000)
-set(baseaddress_loadperf 0x4b920000)
-set(baseaddress_mprapi 0x4c400000)
-set(baseaddress_wuapi 0x506a0000)
-set(baseaddress_srclient 0x512c0000)
-set(baseaddress_pstorec 0x513d0000)
-set(baseaddress_lpk 0x516c0000)
-set(baseaddress_msgsm32acm 0x56db0000)
-set(baseaddress_msdvbnp 0x58280000)
-set(baseaddress_msg711acm 0x584f0000)
-set(baseaddress_imaadp32acm 0x585e0000)
-set(baseaddress_bdaplgin 0x58600000)
-set(baseaddress_telephon 0x58750000)
-set(baseaddress_pwrcfg 0x587e0000)
-set(baseaddress_mmsys 0x588a0000)
-set(baseaddress_joy 0x589b0000)
-set(baseaddress_qmgr 0x59620000)
-set(baseaddress_msvidctl 0x59660000)
-set(baseaddress_uxtheme 0x5ad70000)
-set(baseaddress_vdmdbg 0x5b0d0000)
-set(baseaddress_untfs 0x5b340000)
-set(baseaddress_objsel 0x5b400000)
-set(baseaddress_ufat 0x5b570000)
-set(baseaddress_tapiui 0x5b770000)
-set(baseaddress_uext2 0x5b7a0000)
-set(baseaddress_slayer 0x5c7e0000)
-set(baseaddress_usrmgr 0x5c900000)
-set(baseaddress_shimgvw 0x5cb00000)
-set(baseaddress_commctrl 0x5d090000)
-set(baseaddress_dplayx 0x5e080000)
-set(baseaddress_input 0x5e400000)
-set(baseaddress_ntlanman 0x5f380000)
-set(baseaddress_dinput 0x5f580000)
-set(baseaddress_netid 0x5f660000)
-set(baseaddress_ntprint 0x5f6a0000)
-set(baseaddress_mssip32 0x60430000)
-set(baseaddress_msports 0x60450000)
-set(baseaddress_msisip 0x60b10000)
-set(baseaddress_inseng 0x61000000)
-set(baseaddress_qedit 0x611c0000)
-set(baseaddress_modemui 0x61650000)
-set(baseaddress_mapi32 0x62250000)
-set(baseaddress_mciwave 0x622a0000)
-set(baseaddress_mciseq 0x622b0000)
-set(baseaddress_mciqtz32 0x622c0000)
-set(baseaddress_mcicda 0x622e0000)
-set(baseaddress_localui 0x62f70000)
-set(baseaddress_hdwwiz 0x64d40000)
-set(baseaddress_timedate 0x64da0000)
-set(baseaddress_sysdm 0x64dd0000)
-set(baseaddress_ncpl 0x64ea0000)
-set(baseaddress_main 0x64f40000)
-set(baseaddress_intl 0x64fb0000)
-set(baseaddress_desk 0x65080000)
-set(baseaddress_appwiz 0x65100000)
-set(baseaddress_mlang 0x65140000)
-set(baseaddress_access 0x65180000)
-set(baseaddress_itss 0x66370000)
-set(baseaddress_itircl 0x663a0000)
-set(baseaddress_inetmib1 0x666f0000)
-set(baseaddress_initpki 0x66b00000)
-set(baseaddress_wshtcpip 0x677b0000)
-set(baseaddress_crypt32 0x67ab0000)
-set(baseaddress_httpapi 0x67ae0000)
-set(baseaddress_hid 0x688f0000)
-set(baseaddress_psxdll 0x68eb0000)
-set(baseaddress_psapi 0x68f70000)
-set(baseaddress_ksproxy 0x68f90000)
-set(baseaddress_getuname 0x69110000)
-set(baseaddress_oleacc 0x69640000)
-set(baseaddress_winmm 0x697d0000)
-set(baseaddress_msimg32 0x69cc0000)
-
-set(baseaddress_netplwiz 0x6a240000)
-set(baseaddress_shell32 0x6a360000)
-set(baseaddress_unicode 0x6b200000)
-set(baseaddress_advpack 0x6b300000)
-set(baseaddress_control 0x6b310000)
-set(baseaddress_ncpa 0x6b320000)
-set(baseaddress_dbghelp 0x6b330000)
-set(baseaddress_dinput8 0x6b340000)
-set(baseaddress_dxdiagn 0x6b350000)
-set(baseaddress_glu32 0x6b370000)
-set(baseaddress_mesa32 0x6b380000)
-set(baseaddress_opengl32 0x6b390000)
-set(baseaddress_secur32 0x6b3a0000)
-set(baseaddress_smdll 0x6b3b0000)
-set(baseaddress_serialui 0x6b3d0000)
-set(baseaddress_hlink 0x6c6e0000)
-set(baseaddress_deskmon 0x6d400000)
-set(baseaddress_deskadp 0x6d410000)
-set(baseaddress_wldap32 0x6e130000)
-set(baseaddress_sxs 0x6e160000)
-set(baseaddress_schannel 0x6e360000)
-set(baseaddress_console 0x6e4d0000)
-set(baseaddress_compstui 0x6ec10000)
-set(baseaddress_hnetcfg 0x6edb0000)
-set(baseaddress_clb 0x6f2b0000)
-set(baseaddress_fontext 0x6f7b0000)
-set(baseaddress_jscript 0x6fe80000)
-set(baseaddress_cards 0x701a0000)
-set(baseaddress_wininet 0x70200000)
-set(baseaddress_winhttp 0x70c60000)
-set(baseaddress_batt 0x70cb0000)
-set(baseaddress_amstream 0x71030000)
-set(baseaddress_aclui 0x71550000)
-set(baseaddress_dhcpcsvc 0x71650000)
-set(baseaddress_shdocvw 0x71700000)
-set(baseaddress_actxprxy 0x71800000)
-set(baseaddress_mswsock 0x71a30000)
-set(baseaddress_wsock32 0x71ab0000)
-set(baseaddress_acledit 0x71b70000)
-set(baseaddress_netapi32 0x71c00000)
-set(baseaddress_olesvr32 0x71dd0000)
-set(baseaddress_olecli32 0x71df0000)
-set(baseaddress_olethk32 0x71e10000)
-set(baseaddress_netevent 0x71e70000)
-set(baseaddress_dplay 0x71e80000)
-set(baseaddress_security 0x71f10000)
-set(baseaddress_mssign32 0x720c0000)
-set(baseaddress_cryptui 0x720d0000)
-set(baseaddress_winfax 0x722c0000)
-set(baseaddress_winscard 0x723d0000)
-set(baseaddress_devmgr 0x72a90000)
-set(baseaddress_msadp32acm 0x72cb0000)
-set(baseaddress_wdmaud.drv 0x72d20000)
-set(baseaddress_winspool 0x72f50000)
-set(baseaddress_softpub 0x73290000)
-set(baseaddress_mscat32 0x732b0000)
-set(baseaddress_mstask 0x73520000)
-set(baseaddress_traffic 0x73550000)
-set(baseaddress_mciavi32 0x73610000)
-set(baseaddress_msvidc32 0x73650000)
-set(baseaddress_msrle32 0x73660000)
-set(baseaddress_msdmo 0x73670000)
-set(baseaddress_avicap32 0x739e0000)
-set(baseaddress_avifil32 0x73ac0000)
-set(baseaddress_mscms 0x73af0000)
-set(baseaddress_dciman32 0x73b10000)
-set(baseaddress_sti 0x73b60000)
-set(baseaddress_iccvid 0x73bc0000)
-set(baseaddress_coredll 0x73d80000)
-set(baseaddress_lz32 0x73d80000)
-set(baseaddress_ksuser 0x73ea0000)
-set(baseaddress_icmp 0x741f0000)
-set(baseaddress_spoolss 0x742a0000)
-set(baseaddress_msimtf 0x746b0000)
-set(baseaddress_msctf 0x746e0000)
-set(baseaddress_kbsdll 0x74720000)
-set(baseaddress_userenv 0x74850000)
-set(baseaddress_powrprof 0x74ad0000)
-set(baseaddress_msxml3 0x74ae0000)
-set(baseaddress_printui 0x74b40000)
-set(baseaddress_sndblst 0x74c30000)
-set(baseaddress_pdh 0x74c70000)
-set(baseaddress_oledlg 0x74d00000)
-set(baseaddress_samsrv 0x74f30000)
-set(baseaddress_resutils 0x75070000)
-set(baseaddress_samlib 0x750c0000)
-set(baseaddress_cabinet 0x75120000)
-set(baseaddress_netcfgx 0x755f0000)
-set(baseaddress_iphlpapi 0x75700000)
-set(baseaddress_nddeapi 0x75940000)
-set(baseaddress_msgina 0x75970000)
-set(baseaddress_localspl 0x75b80000)
-set(baseaddress_cryptnet 0x75e60000)
-set(baseaddress_rpcrt4 0x76000000)
-set(baseaddress_inetcomm 0x76140000)
-set(baseaddress_winsta 0x762f0000)
-set(baseaddress_imm32 0x76320000)
-set(baseaddress_d3d8thk 0x76340000)
-set(baseaddress_riched32 0x76340000)
-set(baseaddress_riched20 0x76360000)
-set(baseaddress_odbccp32 0x76380000)
-set(baseaddress_twain_32 0x76380000)
-set(baseaddress_netshell 0x76390000)
-set(baseaddress_lsasrv 0x76540000)
-set(baseaddress_midimap 0x76600000)
-set(baseaddress_wavemap 0x76610000)
-set(baseaddress_mpr 0x76620000)
-set(baseaddress_odbc32 0x76710000)
-set(baseaddress_setupapi 0x76730000)
-set(baseaddress_cryptdll 0x768f0000)
-set(baseaddress_shfolder 0x76900000)
-set(baseaddress_ntdsapi 0x76910000)
-set(baseaddress_rasdlg 0x76930000)
-set(baseaddress_gdiplus 0x76a70000)
-set(baseaddress_atl 0x76ac0000)
-set(baseaddress_sfc 0x76b50000)
-set(baseaddress_credui 0x76bf0000)
-set(baseaddress_sfc_os 0x76c10000)
-set(baseaddress_wintrust 0x76c30000)
-set(baseaddress_imagehlp 0x76c90000)
-set(baseaddress_clusapi 0x76d10000)
-set(baseaddress_wmi 0x76d20000)
-set(baseaddress_dhcpcsvc 0x76d80000)
-set(baseaddress_fmifs 0x76df0000)
-set(baseaddress_oleaut32 0x76e00000)
-set(baseaddress_tapi32 0x76e60000)
-set(baseaddress_rasman 0x76e90000)
-set(baseaddress_rasapi32 0x76ee0000)
-set(baseaddress_wtsapi32 0x76f50000)
-set(baseaddress_msacm32 0x77400000)
-set(baseaddress_crtdll 0x77630000)
-set(baseaddress_authz 0x77690000)
-set(baseaddress_cfgmgr32 0x77700000)
-set(baseaddress_sensapi 0x77700000)
-set(baseaddress_msafd 0x77780000)
-set(baseaddress_packet 0x77780000)
-set(baseaddress_msi 0x77790000)
-set(baseaddress_snmpapi 0x777a0000)
-set(baseaddress_usp10 0x777b0000)
-set(baseaddress_iprtprio 0x777c0000)
-set(baseaddress_ws2help 0x777e0000)
-set(baseaddress_wshirda 0x777f0000)
-set(baseaddress_version 0x77a40000)
-set(baseaddress_ole32 0x77a50000)
-set(baseaddress_olepro32 0x77b20000)
-set(baseaddress_activeds 0x77cb0000)
-set(baseaddress_advapi32 0x77dc0000)
-set(baseaddress_dnsapi 0x77fb0000)
-set(baseaddress_msvcrt 0x78000000)
-set(baseaddress_msvcrt20 0x78500000)
-set(baseaddress_msvcrt40 0x78700000)
-set(baseaddress_mscoree 0x79000000)
-set(baseaddress_fusion 0x79040000)
-set(baseaddress_ntdll 0x7c900000)
-set(baseaddress_kernel32 0x7cb10000)
-set(baseaddress_user32 0x7ccf0000)
-set(baseaddress_gdi32 0x7ced0000)
-set(baseaddress_comctl32 0x7cf60000)
-set(baseaddress_comdlg32 0x7d110000)
-set(baseaddress_shlwapi 0x7d210000)
-set(baseaddress_urlmon 0x7d2e0000)
-set(baseaddress_ws2_32 0x7d3f0000)
-set(baseaddress_syssetup 0x7d440000)
-set(baseaddress_browseui 0x7d510000)
-set(baseaddress_dsound 0x7d630000)
-set(baseaddress_quartz 0x7d6e0000)
-set(baseaddress_msvfw32 0x7d8a0000)
-set(baseaddress_mshtml 0x7d8f0000)
-set(baseaddress_query 0x7db30000)
-set(baseaddress_hhctrl 0x7db60000)
-set(baseaddress_sxs 0x7dbd0000)
-set(baseaddress_beepmidi 0x7dc00000)
-set(baseaddress_ntmarta 0x7dc20000)
-set(baseaddress_ftfd 0x7f000000)
Copied: trunk/reactos/cmake/CMakeMacros.cmake (from r52200,
trunk/reactos/CMakeMacros.cmake)
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/CMakeMacros.cmake?p2…
==============================================================================
--- trunk/reactos/CMakeMacros.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] Mon Jun 13 10:36:40 2011
@@ -202,7 +202,7 @@
endfunction()
endif()
-if(WIN32)
+if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
macro(to_win_path _cmake_path _native_path)
string(REPLACE "/" "\\" ${_native_path}
"${_cmake_path}")
endmacro()
@@ -218,5 +218,11 @@
DEPENDS ${_file2})
endmacro()
else()
-
+ macro(concatenate_files _file1 _file2 _output)
+ add_custom_command(
+ OUTPUT ${_output}
+ COMMAND cat ${_file1} ${_file2} > ${_output}
+ DEPENDS ${_file1}
+ DEPENDS ${_file2})
+ endmacro()
endif()
Added: trunk/reactos/cmake/compilerflags.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/compilerflags.cmake?…
==============================================================================
--- trunk/reactos/cmake/compilerflags.cmake (added)
+++ trunk/reactos/cmake/compilerflags.cmake [iso-8859-1] Mon Jun 13 10:36:40 2011
@@ -1,0 +1,23 @@
+
+macro(add_compiler_flags)
+ # Adds the compiler flag to both CMAKE_C_FLAGS and CMAKE_CXX_FLAGS
+ foreach(flag ${ARGN})
+ set(flags_list "${flags_list} ${flag}")
+ endforeach()
+ set(CMAKE_C_FLAGS ${flags_list})
+ set(CMAKE_CXX_FLAGS ${flags_list})
+endmacro()
+
+macro(add_linkerflag MODULE _flag)
+ set(NEW_LINKER_FLAGS ${_flag})
+ get_target_property(LINKER_FLAGS ${MODULE} LINK_FLAGS)
+ if(LINKER_FLAGS)
+ set(NEW_LINKER_FLAGS "${LINKER_FLAGS} ${NEW_LINKER_FLAGS}")
+ endif()
+ set_target_properties(${MODULE} PROPERTIES LINK_FLAGS ${NEW_LINKER_FLAGS})
+endmacro()
+
+macro(set_unicode)
+ add_definitions(-DUNICODE -D_UNICODE)
+ set(IS_UNICODE 1)
+endmacro()
Propchange: trunk/reactos/cmake/compilerflags.cmake
------------------------------------------------------------------------------
svn:eol-style = native
Copied: trunk/reactos/cmake/gcc.cmake (from r52200, trunk/reactos/gcc.cmake)
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?p2=trunk/r…
==============================================================================
--- trunk/reactos/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Mon Jun 13 10:36:40 2011
@@ -1,14 +1,92 @@
+
+# Compiler Core
+add_compiler_flags(-pipe -fms-extensions)
+
+# Debugging (Note: DWARF-4 on 4.5.1 when we ship)
+add_compiler_flags(-gdwarf-2 -g2 -femit-struct-debug-detailed=none
-feliminate-unused-debug-types)
+
+# Tuning
+if(ARCH MATCHES i386)
+ add_compiler_flags(-march=${OARCH} -mtune=${TUNE})
+else()
+ add_compiler_flags(-march=${OARCH})
+endif()
+
+# Warnings
+add_compiler_flags(-Wall -Wno-char-subscripts -Wpointer-arith -Wno-multichar
-Wno-error=uninitialized -Wno-unused-value -Winvalid-pch)
+
+if(ARCH MATCHES amd64)
+ add_compiler_flags(-Wno-format)
+elseif(ARCH MATCHES arm)
+ add_compiler_flags(-Wno-attributes)
+endif()
+
+# Optimizations
+if(OPTIMIZE STREQUAL "1")
+ add_compiler_flags(-Os)
+elseif(OPTIMIZE STREQUAL "2")
+ add_compiler_flags(-Os)
+elseif(OPTIMIZE STREQUAL "3")
+ add_compiler_flags(-O1)
+elseif(OPTIMIZE STREQUAL "4")
+ add_compiler_flags(-O2)
+elseif(OPTIMIZE STREQUAL "5")
+ add_compiler_flags(-O3)
+endif()
+
+add_compiler_flags(-fno-strict-aliasing)
+
+if(ARCH MATCHES i386)
+ add_compiler_flags(-mpreferred-stack-boundary=2 -fno-set-stack-executable
-fno-optimize-sibling-calls)
+ if(OPTIMIZE STREQUAL "1")
+ add_compiler_flags(-ftracer -momit-leaf-frame-pointer)
+ endif()
+elseif(ARCH MATCHES amd64)
+ add_compiler_flags(-mpreferred-stack-boundary=4)
+ if(OPTIMIZE STREQUAL "1")
+ add_compiler_flags(-ftracer -momit-leaf-frame-pointer)
+ endif()
+elseif(ARCH MATCHES arm)
+ if(OPTIMIZE STREQUAL "1")
+ add_compiler_flags(-ftracer)
+ endif()
+endif()
+
+# Other
+if(ARCH MATCHES amd64)
+ add_definitions(-U_X86_ -UWIN32)
+elseif(ARCH MATCHES arm)
+ add_definitions(-U_UNICODE -UUNICODE)
+ add_definitions(-D__MSVCRT__) # DUBIOUS
+endif()
+
+# alternative arch name
+if(ARCH MATCHES amd64)
+ set(ARCH2 x86_64)
+else()
+ set(ARCH2 ${ARCH})
+endif()
# Linking
if(ARCH MATCHES i386)
-link_directories("${REACTOS_SOURCE_DIR}/importlibs")
-endif()
+ link_directories(${REACTOS_SOURCE_DIR}/importlibs)
+endif()
+
link_directories(${REACTOS_BINARY_DIR}/lib/sdk/crt)
-set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS>
<CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET>
<LINK_LIBRARIES>")
-set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> <FLAGS>
<CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET>
<LINK_LIBRARIES>")
+
+set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS>
<LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+
+set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER>
<CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET>
<LINK_LIBRARIES>")
+
set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-base
-Wl,--disable-auto-import")
-# -Wl,-T,${REACTOS_SOURCE_DIR}/global.lds
+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT}
-Wl,--disable-stdcall-fixup")
+
+set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER>
<CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
+set(CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_CXX_COMPILER>
<CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
+set(CMAKE_RC_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER>
<CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
+
+set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp -o
<OBJECT> -I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm
<FLAGS> ${CMAKE_C_FLAGS} <DEFINES> -D__ASM__ -c <SOURCE>")
#set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -i <SOURCE>
<CMAKE_C_LINK_FLAGS> <DEFINES> -I${REACTOS_SOURCE_DIR}/include/psdk
-I${REACTOS_BINARY_DIR}/include/psdk -I${REACTOS_SOURCE_DIR}/include/
-I${REACTOS_SOURCE_DIR}/include/reactos -I${REACTOS_BINARY_DIR}/include/reactos
-I${REACTOS_SOURCE_DIR}/include/reactos/wine -I${REACTOS_SOURCE_DIR}/include/crt
-I${REACTOS_SOURCE_DIR}/include/crt/mingw32 -O coff -o <OBJECT>")
@@ -18,89 +96,6 @@
"<CMAKE_C_COMPILER> -DRC_INVOKED -D__WIN32__=1 -D__FLAT__=1
<DEFINES> -I${REACTOS_SOURCE_DIR}/include/psdk -I${REACTOS_BINARY_DIR}/include/psdk
-I${REACTOS_SOURCE_DIR}/include/ -I${REACTOS_SOURCE_DIR}/include/reactos
-I${REACTOS_BINARY_DIR}/include/reactos -I${REACTOS_SOURCE_DIR}/include/reactos/wine
-I${REACTOS_SOURCE_DIR}/include/crt -I${REACTOS_SOURCE_DIR}/include/crt/mingw32 -xc -E
<SOURCE> -o <OBJECT>"
"${WRC} -i <OBJECT> -o <OBJECT>"
"<CMAKE_RC_COMPILER> -i <OBJECT> -J res -O coff -o
<OBJECT>")
-
-# Compiler Core
-add_definitions(-pipe -fms-extensions)
-
-set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER>
<CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
-set(CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_CXX_COMPILER>
<CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
-set(CMAKE_RC_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER>
<CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
-
-# Debugging (Note: DWARF-4 on 4.5.1 when we ship)
-add_definitions(-gdwarf-2 -g2 -femit-struct-debug-detailed=none
-feliminate-unused-debug-types)
-
-# Tuning
-if(ARCH MATCHES i386)
- add_definitions(-march=${OARCH} -mtune=${TUNE})
-else()
- add_definitions(-march=${OARCH})
-endif()
-
-# Warnings
-
-add_definitions(-Wall -Wno-char-subscripts -Wpointer-arith -Wno-multichar
-Wno-error=uninitialized -Wno-unused-value -Winvalid-pch)
-
-if(ARCH MATCHES amd64)
- add_definitions(-Wno-format)
-elseif(ARCH MATCHES arm)
- add_definitions(-Wno-attributes)
-endif()
-
-# Optimizations
-
-if(OPTIMIZE STREQUAL "1")
- add_definitions(-Os)
-elseif(OPTIMIZE STREQUAL "2")
- add_definitions(-Os)
-elseif(OPTIMIZE STREQUAL "3")
- add_definitions(-O1)
-elseif(OPTIMIZE STREQUAL "4")
- add_definitions(-O2)
-elseif(OPTIMIZE STREQUAL "5")
- add_definitions(-O3)
-endif()
-
-add_definitions(-fno-strict-aliasing)
-
-if(ARCH MATCHES i386)
- add_definitions(-mpreferred-stack-boundary=2 -fno-set-stack-executable
-fno-optimize-sibling-calls)
- if(OPTIMIZE STREQUAL "1")
- add_definitions(-ftracer -momit-leaf-frame-pointer)
- endif()
-elseif(ARCH MATCHES amd64)
- add_definitions(-mpreferred-stack-boundary=4)
- if(OPTIMIZE STREQUAL "1")
- add_definitions(-ftracer -momit-leaf-frame-pointer)
- endif()
-elseif(ARCH MATCHES arm)
- if(OPTIMIZE STREQUAL "1")
- add_definitions(-ftracer)
- endif()
-endif()
-
-# Other
-if(ARCH MATCHES amd64)
- add_definitions(-U_X86_ -UWIN32)
-elseif(ARCH MATCHES arm)
- add_definitions(-U_UNICODE -UUNICODE)
- add_definitions(-D__MSVCRT__) # DUBIOUS
-endif()
-
-# alternative arch name
-if(ARCH MATCHES amd64)
- set(ARCH2 x86_64)
-else()
- set(ARCH2 ${ARCH})
-endif()
-
-macro(add_linkerflag MODULE _flag)
- set(NEW_LINKER_FLAGS ${_flag})
- get_target_property(LINKER_FLAGS ${MODULE} LINK_FLAGS)
- if(LINKER_FLAGS)
- set(NEW_LINKER_FLAGS "${LINKER_FLAGS} ${NEW_LINKER_FLAGS}")
- endif()
- set_target_properties(${MODULE} PROPERTIES LINK_FLAGS ${NEW_LINKER_FLAGS})
-endmacro()
# Optional 3rd parameter: stdcall stack bytes
macro(set_entrypoint MODULE ENTRYPOINT)
@@ -150,7 +145,7 @@
set_entrypoint(${MODULE} mainCRTStartup)
endif(IS_UNICODE)
elseif(${TYPE} MATCHES win32dll)
- set_entrypoint(${MODULE} DllMain 12)
+ set_entrypoint(${MODULE} DllMain 12)
if(DEFINED baseaddress_${MODULE})
set_image_base(${MODULE} ${baseaddress_${MODULE}})
else()
@@ -175,11 +170,6 @@
endif()
endmacro()
-macro(set_unicode)
- add_definitions(-DUNICODE -D_UNICODE)
- set(IS_UNICODE 1)
-endmacro()
-
# Workaround lack of mingw RC support in cmake
macro(set_rc_compiler)
get_directory_property(defines COMPILE_DEFINITIONS)
Copied: trunk/reactos/cmake/msvc.cmake (from r52200, trunk/reactos/msc.cmake)
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?p2=trunk/…
==============================================================================
--- trunk/reactos/msc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Mon Jun 13 10:36:40 2011
@@ -36,7 +36,7 @@
get_directory_property(definitions DEFINITIONS)
set(CMAKE_ASM_COMPILE_OBJECT
- "<CMAKE_C_COMPILER> /nologo /X /I${REACTOS_SOURCE_DIR}/include/asm
/I${REACTOS_BINARY_DIR}/include/asm /I${REACTOS_SOURCE_DIR}/include
/I${REACTOS_SOURCE_DIR}/include/psdk /I${REACTOS_SOURCE_DIR}/include/dxsdk
/I${REACTOS_BINARY_DIR}/include /I${REACTOS_BINARY_DIR}/include/dxsdk
/I${REACTOS_BINARY_DIR}/include/psdk /I${REACTOS_BINARY_DIR}/include/reactos
/I${REACTOS_SOURCE_DIR}/include/crt /I${REACTOS_SOURCE_DIR}/include/ddk
/I${REACTOS_SOURCE_DIR}/include/ndk /I${REACTOS_SOURCE_DIR}/include/reactos
/I${REACTOS_SOURCE_DIR}/include/reactos/libs /I${REACTOS_SOURCE_DIR}/include/crt/msc
${definitions} /D__ASM__ /D_USE_ML /EP /c <SOURCE> > <OBJECT>.tmp"
+ "<CMAKE_C_COMPILER> /nologo /X /I${REACTOS_SOURCE_DIR}/include/asm
/I${REACTOS_BINARY_DIR}/include/asm <FLAGS> ${definitions} /D__ASM__ /D_USE_ML /EP
/c <SOURCE> > <OBJECT>.tmp"
"<CMAKE_ASM_COMPILER> /nologo /Cp /Fo<OBJECT> /c /Ta
<OBJECT>.tmp")
set(CMAKE_RC_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY})
@@ -44,15 +44,6 @@
set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
macro(add_pch _target_name _FILE)
-endmacro()
-
-macro(add_linkerflag MODULE _flag)
- set(NEW_LINKER_FLAGS ${_flag})
- get_target_property(LINKER_FLAGS ${MODULE} LINK_FLAGS)
- if(LINKER_FLAGS)
- set(NEW_LINKER_FLAGS "${LINKER_FLAGS} ${NEW_LINKER_FLAGS}")
- endif()
- set_target_properties(${MODULE} PROPERTIES LINK_FLAGS ${NEW_LINKER_FLAGS})
endmacro()
macro(set_entrypoint MODULE ENTRYPOINT)
@@ -117,11 +108,6 @@
endif()
endmacro()
-macro(set_unicode)
- add_definitions(-DUNICODE -D_UNICODE)
- set(IS_UNICODE 1)
-endmacro()
-
macro(set_rc_compiler)
# dummy, this workaround is only needed in mingw due to lack of RC support in cmake
endmacro()
Removed: trunk/reactos/config-amd64.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/config-amd64.cmake?rev=522…
==============================================================================
--- trunk/reactos/config-amd64.cmake [iso-8859-1] (original)
+++ trunk/reactos/config-amd64.cmake (removed)
@@ -1,43 +1,0 @@
-
-set(SARCH "" CACHE STRING
-"Sub-architecture to build for.")
-
-set(OARCH "athlon64" CACHE STRING
-"Generate instructions for this CPU type. Specify one of:
- k8 opteron athlon64 athlon-fx")
-
-set (OPTIMIZE "1" CACHE STRING
-"What level of optimisation to use.
- 0 = off
- 1 = Default option, optimize for size (-Os) with some additional options
- 2 = -Os
- 3 = -O1
- 4 = -O2
- 5 = -O3")
-
-set(DBG TRUE CACHE BOOL
-"Whether to compile for debugging.")
-
-set(KDBG FALSE CACHE BOOL
-"Whether to compile in the integrated kernel debugger.")
-
-set(GDB FALSE CACHE BOOL
-"Whether to compile for debugging with GDB.
-If you don't use GDB, don't enable this.")
-
-set(_WINKD_ TRUE CACHE BOOL
-"Whether to compile with the KD protocol.")
-
-set(_ELF_ FALSE CACHE BOOL
-"Whether to compile support for ELF files.
-Do not enable unless you know what you're doing.")
-
-set(NSWPAT FALSE CACHE BOOL
-"Whether to compile apps/libs with features covered software patents or not.
-If you live in a country where software patents are valid/apply, don't
-enable this (except they/you purchased a license from the patent owner).
-This settings is disabled (0) by default.")
-
-set(USERMODE TRUE CACHE BOOL
-"Whether to compile any usermode parts. This is while kernel mode is under
- heavy development and usermode part not relevant for bootcd.")
Removed: trunk/reactos/config-arm.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/config-arm.cmake?rev=52209…
==============================================================================
--- trunk/reactos/config-arm.cmake [iso-8859-1] (original)
+++ trunk/reactos/config-arm.cmake (removed)
@@ -1,46 +1,0 @@
-
-set(SARCH "omap3-zoom2" CACHE STRING
-"Sub-architecture (board) to build for. Specify one of:
- kurobox versatile omap3-zoom2 omap3-beagle")
-
-set(OARCH "armv7-a" CACHE STRING
-"Generate instructions for this CPU type. Specify one of:
- armv5te armv7-a")
-
-set (OPTIMIZE "1" CACHE STRING
-"What level of optimisation to use.
- 0 = off
- 1 = Default option, optimize for size (-Os) with some additional options
- 2 = -Os
- 3 = -O1
- 4 = -O2
- 5 = -O3")
-
-set(DBG TRUE CACHE BOOL
-"Whether to compile for debugging.")
-
-set(KDBG FALSE CACHE BOOL
-"Whether to compile in the integrated kernel debugger.")
-
-set(GDB FALSE CACHE BOOL
-"Whether to compile for debugging with GDB.
-If you don't use GDB, don't enable this.")
-
-set(_WINKD_ TRUE CACHE BOOL
-"Whether to compile with the KD protocol.")
-
-set(_ELF_ FALSE CACHE BOOL
-"Whether to compile support for ELF files.
-Do not enable unless you know what you're doing.")
-
-set(NSWPAT FALSE CACHE BOOL
-"Whether to compile apps/libs with features covered software patents or not.
-If you live in a country where software patents are valid/apply, don't
-enable this (except they/you purchased a license from the patent owner).
-This settings is disabled (0) by default.")
-
-set(BUILD_MP TRUE CACHE BOOL
-"Whether to compile the multi processor versions for ntoskrnl and hal.")
-
-set(NEWSPRINTF FALSE CACHE BOOL
-"Whether to compile the new sprintf.")
Removed: trunk/reactos/config.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/config.cmake?rev=52209&…
==============================================================================
--- trunk/reactos/config.cmake [iso-8859-1] (original)
+++ trunk/reactos/config.cmake (removed)
@@ -1,51 +1,0 @@
-
-set(SARCH "pc" CACHE STRING
-"Sub-architecture to build for. Specify one of: xbox")
-
-set(OARCH "pentium" CACHE STRING
-"Generate instructions for this CPU type. Specify one of:
- native, i386, i486, pentium, pentium-mmx, pentiumpro, i686,
- pentium2, pentium3, pentium-m, pentium4, prescott, nocona,
- core2, k6, k6-2, athlon, athlon-xp, opteron, opteron-sse3,
- barcelona, winchip-c6, winchip2, c3, c3-2, geode")
-
-set(TUNE "i686" CACHE STRING
-"Which CPU ReactOS should be optimized for.")
-
-set(OPTIMIZE "1" CACHE STRING
-"What level of optimisation to use.
- 0 = off
- 1 = Default option, optimize for size (-Os) with some additional options
- 2 = -Os
- 3 = -O1
- 4 = -O2
- 5 = -O3")
-
-set(DBG TRUE CACHE BOOL
-"Whether to compile for debugging.")
-
-set(KDBG TRUE CACHE BOOL
-"Whether to compile in the integrated kernel debugger.")
-
-set(GDB FALSE CACHE BOOL
-"Whether to compile for debugging with GDB.
-If you don't use GDB, don't enable this.")
-
-set(_WINKD_ FALSE CACHE BOOL
-"Whether to compile with the KD protocol.")
-
-set(_ELF_ FALSE CACHE BOOL
-"Whether to compile support for ELF files.
-Do not enable unless you know what you're doing.")
-
-set(NSWPAT FALSE CACHE BOOL
-"Whether to compile apps/libs with features covered software patents or not.
-If you live in a country where software patents are valid/apply, don't
-enable this (except they/you purchased a license from the patent owner).
-This settings is disabled (0) by default.")
-
-set(BUILD_MP TRUE CACHE BOOL
-"Whether to compile the multi processor versions for ntoskrnl and hal.")
-
-set(GENERATE_DEPENDENCY_GRAPH FALSE CACHE BOOL
-"Whether to create a graphml dependency of dlls.")
Modified: trunk/reactos/configure.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/configure.cmd?rev=52210&am…
==============================================================================
--- trunk/reactos/configure.cmd [iso-8859-1] (original)
+++ trunk/reactos/configure.cmd [iso-8859-1] Mon Jun 13 10:36:40 2011
@@ -116,7 +116,7 @@
)
if "%BUILD_ENVIRONMENT%" == "MinGW" (
- cmake -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw32.cmake
-DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%"
%REACTOS_SOURCE_DIR%
+ cmake -G "MinGW Makefiles" -DENABLE_CCACHE=1
-DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake -DARCH=%ARCH%
-DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" %REACTOS_SOURCE_DIR%
) else if defined USE_NMAKE (
cmake -G "NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-msvc.cmake
-DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%"
%REACTOS_SOURCE_DIR%
) else if "%BUILD_ENVIRONMENT%" == "VS8" (
Modified: trunk/reactos/configure.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/configure.sh?rev=52210&…
==============================================================================
--- trunk/reactos/configure.sh [iso-8859-1] (original)
+++ trunk/reactos/configure.sh [iso-8859-1] Mon Jun 13 10:36:40 2011
@@ -37,7 +37,7 @@
rm -f CMakeCache.txt
fi
-cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw32.cmake
-DARCH=$ARCH -DREACTOS_BUILD_TOOLS_DIR="$REACTOS_BUILD_TOOLS_DIR"
"$REACTOS_SOURCE_DIR"
+cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake
-DARCH=$ARCH -DREACTOS_BUILD_TOOLS_DIR="$REACTOS_BUILD_TOOLS_DIR"
"$REACTOS_SOURCE_DIR"
echo Configure script complete! Enter directories and execute appropriate build
commands\(ex: make, makex, etc...\).
Removed: trunk/reactos/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/gcc.cmake?rev=52209&vi…
==============================================================================
--- trunk/reactos/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/gcc.cmake (removed)
@@ -1,399 +1,0 @@
-
-# Linking
-if(ARCH MATCHES i386)
-link_directories("${REACTOS_SOURCE_DIR}/importlibs")
-endif()
-link_directories(${REACTOS_BINARY_DIR}/lib/sdk/crt)
-set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS>
<CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET>
<LINK_LIBRARIES>")
-set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> <FLAGS>
<CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET>
<LINK_LIBRARIES>")
-set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-base
-Wl,--disable-auto-import")
-# -Wl,-T,${REACTOS_SOURCE_DIR}/global.lds
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT}
-Wl,--disable-stdcall-fixup")
-
-#set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -i <SOURCE>
<CMAKE_C_LINK_FLAGS> <DEFINES> -I${REACTOS_SOURCE_DIR}/include/psdk
-I${REACTOS_BINARY_DIR}/include/psdk -I${REACTOS_SOURCE_DIR}/include/
-I${REACTOS_SOURCE_DIR}/include/reactos -I${REACTOS_BINARY_DIR}/include/reactos
-I${REACTOS_SOURCE_DIR}/include/reactos/wine -I${REACTOS_SOURCE_DIR}/include/crt
-I${REACTOS_SOURCE_DIR}/include/crt/mingw32 -O coff -o <OBJECT>")
-
-# Temporary, until windres issues are fixed
-get_target_property(WRC native-wrc IMPORTED_LOCATION_NOCONFIG)
-set(CMAKE_RC_COMPILE_OBJECT
- "<CMAKE_C_COMPILER> -DRC_INVOKED -D__WIN32__=1 -D__FLAT__=1
<DEFINES> -I${REACTOS_SOURCE_DIR}/include/psdk -I${REACTOS_BINARY_DIR}/include/psdk
-I${REACTOS_SOURCE_DIR}/include/ -I${REACTOS_SOURCE_DIR}/include/reactos
-I${REACTOS_BINARY_DIR}/include/reactos -I${REACTOS_SOURCE_DIR}/include/reactos/wine
-I${REACTOS_SOURCE_DIR}/include/crt -I${REACTOS_SOURCE_DIR}/include/crt/mingw32 -xc -E
<SOURCE> -o <OBJECT>"
- "${WRC} -i <OBJECT> -o <OBJECT>"
- "<CMAKE_RC_COMPILER> -i <OBJECT> -J res -O coff -o
<OBJECT>")
-
-# Compiler Core
-add_definitions(-pipe -fms-extensions)
-
-set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER>
<CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
-set(CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_CXX_COMPILER>
<CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
-set(CMAKE_RC_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER>
<CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
-
-# Debugging (Note: DWARF-4 on 4.5.1 when we ship)
-add_definitions(-gdwarf-2 -g2 -femit-struct-debug-detailed=none
-feliminate-unused-debug-types)
-
-# Tuning
-if(ARCH MATCHES i386)
- add_definitions(-march=${OARCH} -mtune=${TUNE})
-else()
- add_definitions(-march=${OARCH})
-endif()
-
-# Warnings
-
-add_definitions(-Wall -Wno-char-subscripts -Wpointer-arith -Wno-multichar
-Wno-error=uninitialized -Wno-unused-value -Winvalid-pch)
-
-if(ARCH MATCHES amd64)
- add_definitions(-Wno-format)
-elseif(ARCH MATCHES arm)
- add_definitions(-Wno-attributes)
-endif()
-
-# Optimizations
-
-if(OPTIMIZE STREQUAL "1")
- add_definitions(-Os)
-elseif(OPTIMIZE STREQUAL "2")
- add_definitions(-Os)
-elseif(OPTIMIZE STREQUAL "3")
- add_definitions(-O1)
-elseif(OPTIMIZE STREQUAL "4")
- add_definitions(-O2)
-elseif(OPTIMIZE STREQUAL "5")
- add_definitions(-O3)
-endif()
-
-add_definitions(-fno-strict-aliasing)
-
-if(ARCH MATCHES i386)
- add_definitions(-mpreferred-stack-boundary=2 -fno-set-stack-executable
-fno-optimize-sibling-calls)
- if(OPTIMIZE STREQUAL "1")
- add_definitions(-ftracer -momit-leaf-frame-pointer)
- endif()
-elseif(ARCH MATCHES amd64)
- add_definitions(-mpreferred-stack-boundary=4)
- if(OPTIMIZE STREQUAL "1")
- add_definitions(-ftracer -momit-leaf-frame-pointer)
- endif()
-elseif(ARCH MATCHES arm)
- if(OPTIMIZE STREQUAL "1")
- add_definitions(-ftracer)
- endif()
-endif()
-
-# Other
-if(ARCH MATCHES amd64)
- add_definitions(-U_X86_ -UWIN32)
-elseif(ARCH MATCHES arm)
- add_definitions(-U_UNICODE -UUNICODE)
- add_definitions(-D__MSVCRT__) # DUBIOUS
-endif()
-
-# alternative arch name
-if(ARCH MATCHES amd64)
- set(ARCH2 x86_64)
-else()
- set(ARCH2 ${ARCH})
-endif()
-
-macro(add_linkerflag MODULE _flag)
- set(NEW_LINKER_FLAGS ${_flag})
- get_target_property(LINKER_FLAGS ${MODULE} LINK_FLAGS)
- if(LINKER_FLAGS)
- set(NEW_LINKER_FLAGS "${LINKER_FLAGS} ${NEW_LINKER_FLAGS}")
- endif()
- set_target_properties(${MODULE} PROPERTIES LINK_FLAGS ${NEW_LINKER_FLAGS})
-endmacro()
-
-# Optional 3rd parameter: stdcall stack bytes
-macro(set_entrypoint MODULE ENTRYPOINT)
- if(${ENTRYPOINT} STREQUAL "0")
- add_linkerflag(${MODULE} "-Wl,-entry,0")
- elseif(ARCH MATCHES i386)
- set(_entrysymbol _${ENTRYPOINT})
- if (${ARGC} GREATER 2)
- set(_entrysymbol ${_entrysymbol}@${ARGV2})
- endif()
- add_linkerflag(${MODULE} "-Wl,-entry,${_entrysymbol}")
- else()
- add_linkerflag(${MODULE} "-Wl,-entry,${ENTRYPOINT}")
- endif()
-endmacro()
-
-macro(set_subsystem MODULE SUBSYSTEM)
- add_linkerflag(${MODULE} "-Wl,--subsystem,${SUBSYSTEM}")
-endmacro()
-
-macro(set_image_base MODULE IMAGE_BASE)
- add_linkerflag(${MODULE} "-Wl,--image-base,${IMAGE_BASE}")
-endmacro()
-
-macro(set_module_type MODULE TYPE)
-
- add_dependencies(${MODULE} psdk)
- if(${IS_CPP})
- target_link_libraries(${MODULE} stlport -lsupc++ -lgcc)
- endif()
-
- if(${TYPE} MATCHES nativecui)
- set_subsystem(${MODULE} native)
- set_entrypoint(${MODULE} NtProcessStartup 4)
- elseif(${TYPE} MATCHES win32gui)
- set_subsystem(${MODULE} windows)
- if(IS_UNICODE)
- set_entrypoint(${MODULE} wWinMainCRTStartup)
- else()
- set_entrypoint(${MODULE} WinMainCRTStartup)
- endif(IS_UNICODE)
- elseif(${TYPE} MATCHES win32cui)
- set_subsystem(${MODULE} console)
- if(IS_UNICODE)
- set_entrypoint(${MODULE} wmainCRTStartup)
- else()
- set_entrypoint(${MODULE} mainCRTStartup)
- endif(IS_UNICODE)
- elseif(${TYPE} MATCHES win32dll)
- set_entrypoint(${MODULE} DllMain 12)
- if(DEFINED baseaddress_${MODULE})
- set_image_base(${MODULE} ${baseaddress_${MODULE}})
- else()
- message(STATUS "${MODULE} has no base address")
- endif()
- elseif(${TYPE} MATCHES win32ocx)
- set_entrypoint(${MODULE} DllMain 12)
- set_target_properties(${MODULE} PROPERTIES SUFFIX ".ocx")
- elseif(${TYPE} MATCHES cpl)
- set_entrypoint(${MODULE} DllMain 12)
- set_target_properties(${MODULE} PROPERTIES SUFFIX ".cpl")
- elseif(${TYPE} MATCHES kernelmodedriver)
- set_target_properties(${MODULE} PROPERTIES LINK_FLAGS
"-Wl,--exclude-all-symbols -Wl,-file-alignment=0x1000
-Wl,-section-alignment=0x1000" SUFFIX ".sys")
- set_entrypoint(${MODULE} DriverEntry 8)
- set_subsystem(${MODULE} native)
- set_image_base(${MODULE} 0x00010000)
- add_dependencies(${MODULE} bugcodes)
- elseif(${TYPE} MATCHES nativedll)
- set_subsystem(${MODULE} native)
- else()
- message(FATAL_ERROR "Unknown module type : ${TYPE}")
- endif()
-endmacro()
-
-macro(set_unicode)
- add_definitions(-DUNICODE -D_UNICODE)
- set(IS_UNICODE 1)
-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(rc_result_defs "${rc_result_defs} -D${arg}")
- endforeach()
-
- foreach(arg ${includes})
- set(rc_result_incs "-I${arg} ${rc_result_incs}")
- endforeach()
-
- #set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> ${rc_result_defs}
${rc_result_incs} -i <SOURCE> -O coff -o <OBJECT>")
- set(CMAKE_RC_COMPILE_OBJECT
- "<CMAKE_C_COMPILER> -DRC_INVOKED -D__WIN32__=1 -D__FLAT__=1
${rc_result_defs} -I${CMAKE_CURRENT_SOURCE_DIR} ${rc_result_incs} -xc -E <SOURCE> -o
<OBJECT>"
- "${WRC} -I${CMAKE_CURRENT_SOURCE_DIR} -i <OBJECT> -o <OBJECT>"
- "<CMAKE_RC_COMPILER> -i <OBJECT> -J res -O coff -o
<OBJECT>")
-endmacro()
-
-#idl files support
-set(IDL_COMPILER native-widl)
-
-if(ARCH MATCHES i386)
- set(IDL_FLAGS -m32 --win32)
-elseif(ARCH MATCHES amd64)
- set(IDL_FLAGS -m64 --win64)
-endif()
-
-set(IDL_HEADER_ARG -h -o) #.h
-set(IDL_TYPELIB_ARG -t -o) #.tlb
-set(IDL_SERVER_ARG -s -S) #.c for server library
-set(IDL_CLIENT_ARG -c -C) #.c for stub client library
-set(IDL_PROXY_ARG -p -P)
-set(IDL_INTERFACE_ARG -u -o)
-set(IDL_DLLDATA_ARG --dlldata-only -o)
-
-
-macro(add_importlibs MODULE)
- add_dependency_node(${MODULE})
- foreach(LIB ${ARGN})
- if ("${LIB}" MATCHES "msvcrt")
- target_link_libraries(${MODULE} msvcrtex)
- endif()
- target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}.a)
- add_dependencies(${MODULE} lib${LIB})
- add_dependency_edge(${MODULE} ${LIB})
- endforeach()
-endmacro()
-
-macro(add_delay_importlibs MODULE)
- foreach(LIB ${ARGN})
- target_link_libraries(${MODULE}
${CMAKE_BINARY_DIR}/importlibs/lib${LIB}_delayed.a)
- add_dependencies(${MODULE} lib${LIB}_delayed)
- endforeach()
- target_link_libraries(${MODULE} delayimp)
-endmacro()
-
-if(NOT ARCH MATCHES i386)
- set(DECO_OPTION "-@")
-endif()
-
-macro(add_importlib_target _exports_file)
-
- get_filename_component(_name ${_exports_file} NAME_WE)
- get_filename_component(_extension ${_exports_file} EXT)
- get_target_property(_suffix ${_name} SUFFIX)
- if(${_suffix} STREQUAL "_suffix-NOTFOUND")
- get_target_property(_type ${_name} TYPE)
- if(${_type} MATCHES EXECUTABLE)
- set(_suffix ".exe")
- else()
- set(_suffix ".dll")
- endif()
- endif()
-
- if (${_extension} STREQUAL ".spec")
-
- # Normal importlib creation
- add_custom_command(
- OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a
- COMMAND native-spec2def -n=${_name}${_suffix} -a=${ARCH2}
-d=${CMAKE_CURRENT_BINARY_DIR}/${_name}_implib.def
${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file}
- COMMAND ${MINGW_PREFIX}dlltool --def
${CMAKE_CURRENT_BINARY_DIR}/${_name}_implib.def --kill-at
--output-lib=${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file})
-
- # Delayed importlib creation
- add_custom_command(
- OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_delayed.a
- COMMAND native-spec2def -n=${_name}${_suffix} -a=${ARCH2}
-d=${CMAKE_CURRENT_BINARY_DIR}/${_name}_delayed_implib.def
${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file}
- COMMAND ${MINGW_PREFIX}dlltool --def
${CMAKE_CURRENT_BINARY_DIR}/${_name}_delayed_implib.def --kill-at --output-delaylib
${CMAKE_BINARY_DIR}/importlibs/lib${_name}_delayed.a
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file})
-
- elseif(${_extension} STREQUAL ".def")
- message("Use of def files for import libs is deprecated:
${_exports_file}")
- add_custom_command(
- OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a
- COMMAND ${MINGW_PREFIX}dlltool --def
${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file} --kill-at
--output-lib=${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file})
- add_custom_command(
- OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_delayed.a
- COMMAND ${MINGW_PREFIX}dlltool --def
${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file} --kill-at --output-delaylib
${CMAKE_BINARY_DIR}/importlibs/lib${_name}_delayed.a
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file})
- else()
- message(FATAL_ERROR "Unsupported exports file extension:
${_extension}")
- endif()
-
- # Normal importlib target
- add_custom_target(
- lib${_name}
- DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a)
- # Delayed importlib target
- add_custom_target(
- lib${_name}_delayed
- DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_delayed.a)
-
-endmacro()
-
-macro(spec2def _dllname _spec_file)
- get_filename_component(_file ${_spec_file} NAME_WE)
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c
- COMMAND native-spec2def -n=${_dllname} --kill-at -a=${ARCH2}
-d=${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
-s=${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file})
- set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
- PROPERTIES GENERATED TRUE EXTERNAL_OBJECT TRUE)
- set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c PROPERTIES
GENERATED TRUE)
-endmacro()
-
-macro(macro_mc FILE)
- set(COMMAND_MC ${MINGW_PREFIX}windmc -A -b ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc -r
${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos)
-endmacro()
-
-#pseh lib, needed with mingw
-set(PSEH_LIB "pseh")
-
-# Macros
-macro(_PCH_GET_COMPILE_FLAGS _target_name _out_compile_flags _header_filename)
- # Add the precompiled header to the build
- get_filename_component(_FILE ${_header_filename} NAME)
- set(_gch_filename "${_FILE}.gch")
- list(APPEND ${_out_compile_flags} -c ${_header_filename} -o ${_gch_filename})
-
- # This gets us our includes
- get_directory_property(DIRINC INCLUDE_DIRECTORIES)
- foreach(item ${DIRINC})
- list(APPEND ${_out_compile_flags} -I${item})
- endforeach()
-
- # This our definitions
- get_directory_property(_compiler_flags DEFINITIONS)
- list(APPEND ${_out_compile_flags} ${_compiler_flags})
-
- # This gets any specific definitions that were added with set-target-property
- get_target_property(_target_defs ${_target_name} COMPILE_DEFINITIONS)
- if (_target_defs)
- foreach(item ${_target_defs})
- list(APPEND ${_out_compile_flags} -D${item})
- endforeach()
- endif()
-
- separate_arguments(${_out_compile_flags})
-endmacro()
-
-macro(add_pch _target_name _FILE)
- #set(_header_filename ${CMAKE_CURRENT_SOURCE_DIR}/${_FILE})
- #get_filename_component(_basename ${_FILE} NAME)
- #set(_gch_filename ${_basename}.gch)
- #_PCH_GET_COMPILE_FLAGS(${_target_name} _args ${_header_filename})
-
- #add_custom_command(OUTPUT ${_gch_filename} COMMAND ${CMAKE_C_COMPILER}
${CMAKE_C_COMPILER_ARG1} ${_args} DEPENDS ${_header_filename})
- #get_target_property(_src_files ${_target_name} SOURCES)
- #set_source_files_properties(${_src_files} PROPERTIES COMPILE_FLAGS "-Winvalid-pch
-fpch-preprocess" #OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_gch_filename})
- #add_linkerflag(${_target_name} "${_gch_filename}")
-endmacro()
-
-macro(CreateBootSectorTarget _target_name _asm_file _object_file _base_address)
- get_filename_component(OBJECT_PATH ${_object_file} PATH)
- get_filename_component(OBJECT_NAME ${_object_file} NAME)
- file(MAKE_DIRECTORY ${OBJECT_PATH})
- get_directory_property(defines COMPILE_DEFINITIONS)
- get_directory_property(includes INCLUDE_DIRECTORIES)
-
- foreach(arg ${defines})
- set(result_defs ${result_defs} -D${arg})
- endforeach()
-
- foreach(arg ${includes})
- set(result_incs -I${arg} ${result_incs})
- endforeach()
-
- add_custom_command(
- OUTPUT ${_object_file}
- COMMAND nasm -o ${_object_file} ${result_incs} ${result_defs} -f bin
${_asm_file}
- DEPENDS ${_asm_file})
- set_source_files_properties(${_object_file} PROPERTIES GENERATED TRUE)
- add_custom_target(${_target_name} ALL DEPENDS ${_object_file})
-endmacro()
-
-macro(CreateBootSectorTarget2 _target_name _asm_file _binary_file _base_address)
- set(_object_file ${_binary_file}.o)
-
- add_custom_command(
- OUTPUT ${_object_file}
- COMMAND ${CMAKE_ASM_COMPILER} -x assembler-with-cpp -o ${_object_file}
-I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm -D__ASM__ -c
${_asm_file}
- DEPENDS ${_asm_file})
-
- add_custom_command(
- OUTPUT ${_binary_file}
- COMMAND native-obj2bin ${_object_file} ${_binary_file} ${_base_address}
- # COMMAND objcopy --output-target binary --image-base 0x${_base_address}
${_object_file} ${_binary_file}
- DEPENDS ${_object_file})
-
- set_source_files_properties(${_object_file} ${_binary_file} PROPERTIES GENERATED
TRUE)
-
- add_custom_target(${_target_name} ALL DEPENDS ${_binary_file})
-
-endmacro()
Removed: trunk/reactos/msc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/msc.cmake?rev=52209&vi…
==============================================================================
--- trunk/reactos/msc.cmake [iso-8859-1] (original)
+++ trunk/reactos/msc.cmake (removed)
@@ -1,231 +1,0 @@
-
-if(${CMAKE_BUILD_TYPE} MATCHES Debug)
- # no optimitation
-elseif(OPTIMIZE STREQUAL "1")
- add_definitions(/O1)
-elseif(OPTIMIZE STREQUAL "2")
- add_definitions(/O2)
-elseif(OPTIMIZE STREQUAL "3")
- add_definitions(/Ot /Ox /GS-)
-elseif(OPTIMIZE STREQUAL "4")
- add_definitions(/Os /Ox /GS-)
-elseif(OPTIMIZE STREQUAL "5")
- add_definitions(/GF /Gy /Ob2 /Os /Ox /GS-)
-endif()
-
-add_definitions(/X /GR- /GS- /Zl)
-add_definitions(-Dinline=__inline -D__STDC__=1)
-
-if(${_MACHINE_ARCH_FLAG} MATCHES X86)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
- set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
-endif()
-
-if(${ARCH} MATCHES amd64)
- add_definitions(-D__x86_64)
- set(SPEC2DEF_ARCH x86_64)
-else()
- set(SPEC2DEF_ARCH i386)
-endif()
-
-link_directories("${REACTOS_BINARY_DIR}/importlibs"
${REACTOS_BINARY_DIR}/lib/sdk/crt)
-
-set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <DEFINES>
/I${REACTOS_SOURCE_DIR}/include/psdk /I${REACTOS_BINARY_DIR}/include/psdk
/I${REACTOS_SOURCE_DIR}/include /I${REACTOS_SOURCE_DIR}/include/reactos
/I${REACTOS_BINARY_DIR}/include/reactos /I${REACTOS_SOURCE_DIR}/include/reactos/wine
/I${REACTOS_SOURCE_DIR}/include/crt /I${REACTOS_SOURCE_DIR}/include/crt/mingw32 /fo
<OBJECT> <SOURCE>")
-
-get_directory_property(definitions DEFINITIONS)
-
-set(CMAKE_ASM_COMPILE_OBJECT
- "<CMAKE_C_COMPILER> /nologo /X /I${REACTOS_SOURCE_DIR}/include/asm
/I${REACTOS_BINARY_DIR}/include/asm /I${REACTOS_SOURCE_DIR}/include
/I${REACTOS_SOURCE_DIR}/include/psdk /I${REACTOS_SOURCE_DIR}/include/dxsdk
/I${REACTOS_BINARY_DIR}/include /I${REACTOS_BINARY_DIR}/include/dxsdk
/I${REACTOS_BINARY_DIR}/include/psdk /I${REACTOS_BINARY_DIR}/include/reactos
/I${REACTOS_SOURCE_DIR}/include/crt /I${REACTOS_SOURCE_DIR}/include/ddk
/I${REACTOS_SOURCE_DIR}/include/ndk /I${REACTOS_SOURCE_DIR}/include/reactos
/I${REACTOS_SOURCE_DIR}/include/reactos/libs /I${REACTOS_SOURCE_DIR}/include/crt/msc
${definitions} /D__ASM__ /D_USE_ML /EP /c <SOURCE> > <OBJECT>.tmp"
- "<CMAKE_ASM_COMPILER> /nologo /Cp /Fo<OBJECT> /c /Ta
<OBJECT>.tmp")
-
-set(CMAKE_RC_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY})
-set(CMAKE_ASM_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY})
-set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
-
-macro(add_pch _target_name _FILE)
-endmacro()
-
-macro(add_linkerflag MODULE _flag)
- set(NEW_LINKER_FLAGS ${_flag})
- get_target_property(LINKER_FLAGS ${MODULE} LINK_FLAGS)
- if(LINKER_FLAGS)
- set(NEW_LINKER_FLAGS "${LINKER_FLAGS} ${NEW_LINKER_FLAGS}")
- endif()
- set_target_properties(${MODULE} PROPERTIES LINK_FLAGS ${NEW_LINKER_FLAGS})
-endmacro()
-
-macro(set_entrypoint MODULE ENTRYPOINT)
- if(${ENTRYPOINT} STREQUAL "0")
- add_linkerflag(${MODULE} "/NOENTRY")
- else()
- add_linkerflag(${MODULE} "/ENTRY:${ENTRYPOINT}")
- endif()
-endmacro()
-
-macro(set_subsystem MODULE SUBSYSTEM)
- add_linkerflag(${MODULE} "/subsystem:${SUBSYSTEM}")
-endmacro()
-
-macro(set_image_base MODULE IMAGE_BASE)
- add_linkerflag(${MODULE} "/BASE:${IMAGE_BASE}")
-endmacro()
-
-macro(set_module_type MODULE TYPE)
- add_dependencies(${MODULE} psdk)
- if(${TYPE} MATCHES nativecui)
- set_subsystem(${MODULE} native)
- set_entrypoint(${MODULE} NtProcessStartup@4)
- elseif (${TYPE} MATCHES win32gui)
- set_subsystem(${MODULE} windows)
- if(IS_UNICODE)
- set_entrypoint(${MODULE} wWinMainCRTStartup)
- else()
- set_entrypoint(${MODULE} WinMainCRTStartup)
- endif(IS_UNICODE)
- elseif (${TYPE} MATCHES win32cui)
- set_subsystem(${MODULE} console)
- if(IS_UNICODE)
- set_entrypoint(${MODULE} wmainCRTStartup)
- else()
- set_entrypoint(${MODULE} mainCRTStartup)
- endif(IS_UNICODE)
- elseif(${TYPE} MATCHES win32dll)
- # Need this only because mingw library is broken
- set_entrypoint(${MODULE} DllMainCRTStartup@12)
- if(DEFINED baseaddress_${MODULE})
- set_image_base(${MODULE} ${baseaddress_${MODULE}})
- else()
- message(STATUS "${MODULE} has no base address")
- endif()
- add_linkerflag(${MODULE} "/DLL")
- elseif(${TYPE} MATCHES win32ocx)
- set_entrypoint(${MODULE} DllMainCRTStartup@12)
- set_target_properties(${MODULE} PROPERTIES SUFFIX ".ocx")
- add_linkerflag(${MODULE} "/DLL")
- elseif(${TYPE} MATCHES cpl)
- set_entrypoint(${MODULE} DllMainCRTStartup@12)
- set_target_properties(${MODULE} PROPERTIES SUFFIX ".cpl")
- add_linkerflag(${MODULE} "/DLL")
- elseif(${TYPE} MATCHES kernelmodedriver)
- set_target_properties(${MODULE} PROPERTIES SUFFIX ".sys")
- set_entrypoint(${MODULE} DriverEntry@8)
- set_subsystem(${MODULE} native)
- set_image_base(${MODULE} 0x00010000)
- add_linkerflag(${MODULE} "/DRIVER")
- add_dependencies(${MODULE} bugcodes)
- endif()
-endmacro()
-
-macro(set_unicode)
- add_definitions(-DUNICODE -D_UNICODE)
- set(IS_UNICODE 1)
-endmacro()
-
-macro(set_rc_compiler)
-# dummy, this workaround is only needed in mingw due to lack of RC support in cmake
-endmacro()
-
-# Thanks MS for creating a stupid linker
-macro(add_importlib_target _exports_file)
- get_filename_component(_name ${_exports_file} NAME_WE)
- get_target_property(_suffix ${_name} SUFFIX)
- if(${_suffix} STREQUAL "_suffix-NOTFOUND")
- get_target_property(_type ${_name} TYPE)
- if(${_type} MATCHES EXECUTABLE)
- set(_suffix ".exe")
- else()
- set(_suffix ".dll")
- endif()
- endif()
-
- # Generate the asm stub file and the export def file
- add_custom_command(
- OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm
${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def
- COMMAND native-spec2def --ms --kill-at -a=${SPEC2DEF_ARCH} -r
-n=${_name}${_suffix} -d=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def
-l=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm
${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file}
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file})
-
- # Assemble the stub file
- add_custom_command(
- OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj
- COMMAND ${CMAKE_ASM_COMPILER} /nologo /Cp
/Fo${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj /c /Ta
${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm
- DEPENDS "${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm")
-
- # Add neccessary importlibs for redirections
- set(_libraries "")
- foreach(_lib ${ARGN})
- list(APPEND _libraries "${CMAKE_BINARY_DIR}/importlibs/${_lib}.lib")
- list(APPEND _dependencies ${_lib})
- endforeach()
-
- # Build the importlib
- add_custom_command(
- OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib
- COMMAND LINK /LIB /NOLOGO /DEF:${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def
/OUT:${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib
${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj ${_libraries}
- DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj
${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def)
-
- # Add the importlib target
- add_custom_target(
- lib${_name}
- DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib)
-
- add_dependencies(lib${_name} asm ${_dependencies})
-endmacro()
-
-macro(add_importlibs MODULE)
- foreach(LIB ${ARGN})
- if ("${LIB}" MATCHES "msvcrt")
- target_link_libraries(${MODULE} msvcrtex)
- endif()
- target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}.lib)
- add_dependencies(${MODULE} lib${LIB})
- endforeach()
-endmacro()
-
-macro(add_delay_importlibs MODULE)
-# TODO
-endmacro()
-
-macro(spec2def _dllname _spec_file)
- get_filename_component(_file ${_spec_file} NAME_WE)
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c
- COMMAND native-spec2def --ms --kill-at -a=${SPEC2DEF_ARCH} -n=${_dllname}
-d=${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
-s=${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file})
- set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c
- PROPERTIES GENERATED TRUE)
-endmacro()
-
-macro(macro_mc FILE)
- set(COMMAND_MC mc -r ${REACTOS_BINARY_DIR}/include/reactos -h
${REACTOS_BINARY_DIR}/include/reactos ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc)
-endmacro()
-
-file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/importlibs)
-
-#pseh workaround
-set(PSEH_LIB "pseh")
-
-macro(CreateBootSectorTarget2 _target_name _asm_file _binary_file _base_address)
-
- set(_object_file ${_binary_file}.obj)
- set(_temp_file ${_binary_file}.tmp)
-
- add_custom_command(
- OUTPUT ${_temp_file}
- COMMAND ${CMAKE_C_COMPILER} /nologo /X /I${REACTOS_SOURCE_DIR}/include/asm
/I${REACTOS_BINARY_DIR}/include/asm /D__ASM__ /D_USE_ML /EP /c ${_asm_file} >
${_temp_file}
- DEPENDS ${_asm_file})
-
- add_custom_command(
- OUTPUT ${_object_file}
- COMMAND ml /nologo /Cp /Fo${_object_file} /c /Ta ${_temp_file}
- DEPENDS ${_temp_file})
-
- add_custom_command(
- OUTPUT ${_binary_file}
- COMMAND native-obj2bin ${_object_file} ${_binary_file} ${_base_address}
- DEPENDS ${_object_file})
-
- set_source_files_properties(${_object_file} ${_temp_file} ${_binary_file} PROPERTIES
GENERATED TRUE)
-
- add_custom_target(${_target_name} ALL DEPENDS ${_binary_file})
-endmacro()
Modified: trunk/reactos/ntoskrnl/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/CMakeLists.txt?re…
==============================================================================
--- trunk/reactos/ntoskrnl/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/CMakeLists.txt [iso-8859-1] Mon Jun 13 10:36:40 2011
@@ -456,4 +456,3 @@
add_importlib_target(ntoskrnl.spec)
add_library(ntdllsys ntdll.S)
-set_target_properties(ntdllsys PROPERTIES LINKER_LANGUAGE C)
Removed: trunk/reactos/ros_cd.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ros_cd.cmake?rev=52209&…
==============================================================================
--- trunk/reactos/ros_cd.cmake [iso-8859-1] (original)
+++ trunk/reactos/ros_cd.cmake (removed)
@@ -1,159 +1,0 @@
-#reactos.dff
-add_custom_command(
- OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.dff
- COMMAND ${CMAKE_COMMAND} -E copy
${REACTOS_SOURCE_DIR}/boot/bootdata/packages/reactos.dff.in
${REACTOS_BINARY_DIR}/boot/reactos.dff
- DEPENDS ${REACTOS_SOURCE_DIR}/boot/bootdata/packages/reactos.dff.in)
-
-file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_cab_target.txt CAB_TARGET_ENTRIES)
-foreach(ENTRY ${CAB_TARGET_ENTRIES})
- string(REGEX REPLACE "^(.*)\t.*" "\\1" _targetname ${ENTRY})
- string(REGEX REPLACE "^.*\t(.)" "\\1" _dir_num ${ENTRY})
- get_target_property(_FILENAME ${_targetname} LOCATION)
- if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
- set(_FILENAME '\"${_FILENAME}\"')
- endif()
- add_custom_command(
- OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.dff
- COMMAND ${CMAKE_COMMAND} -E echo ${_FILENAME} ${_dir_num} >>
${REACTOS_BINARY_DIR}/boot/reactos.dff
- DEPENDS ${_targetname}
- APPEND)
-endforeach()
-
-file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_cab.txt CAB_TARGET_ENTRIES)
-foreach(ENTRY ${CAB_TARGET_ENTRIES})
- string(REGEX REPLACE "^(.*)\t.*" "\\1" _FILENAME ${ENTRY})
- string(REGEX REPLACE "^.*\t(.)" "\\1" _dir_num ${ENTRY})
- if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
- set(QUOTED_FILENAME '\"${_FILENAME}\"')
- else()
- set(QUOTED_FILENAME ${_FILENAME})
- endif()
- add_custom_command(
- OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.dff
- COMMAND ${CMAKE_COMMAND} -E echo ${QUOTED_FILENAME} ${_dir_num} >>
${REACTOS_BINARY_DIR}/boot/reactos.dff
- DEPENDS ${_FILENAME}
- APPEND)
-endforeach()
-
-#reactos.cab
-add_custom_command(
- OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.inf
- COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/reactos.dff -L
${REACTOS_BINARY_DIR}/boot -I -P ${REACTOS_SOURCE_DIR}
- DEPENDS ${REACTOS_BINARY_DIR}/boot/reactos.dff)
-add_custom_command(
- OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.cab
- COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/reactos.dff -RC
${REACTOS_BINARY_DIR}/boot/reactos.inf -L ${REACTOS_BINARY_DIR}/boot -N -P
${REACTOS_SOURCE_DIR}
- DEPENDS ${REACTOS_BINARY_DIR}/boot/reactos.inf)
-
-#bootcd target
-macro(create_bootcd_dir BOOTCD_DIR _target)
-
- file(MAKE_DIRECTORY
- "${BOOTCD_DIR}"
- "${BOOTCD_DIR}/loader"
- "${BOOTCD_DIR}/reactos"
- "${BOOTCD_DIR}/reactos/system32")
-
- file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_minicd_target.txt MINICD_TARGET_ENTRIES)
- foreach(ENTRY ${MINICD_TARGET_ENTRIES})
- string(REGEX REPLACE "^(.*)\t.*\t.*" "\\1" _targetname
${ENTRY})
- string(REGEX REPLACE "^.*\t(.*)\t.*" "\\1" _DIR ${ENTRY})
- string(REGEX REPLACE "^.*\t.*\t(.*)" "\\1"_NAMEONCD
${ENTRY})
- get_target_property(_FILENAME ${_targetname} LOCATION)
- set(filename ${BOOTCD_DIR}/${_DIR}/${_NAMEONCD})
- list(APPEND ${_target}_FILES ${filename})
- add_custom_command(
- OUTPUT ${filename}
- COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${filename}
- DEPENDS ${_targetname})
- endforeach()
-
- file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_minicd.txt MINICD_ENTRIES)
- foreach(ENTRY ${MINICD_ENTRIES})
- string(REGEX REPLACE "^(.*)\t.*\t.*" "\\1" _FILENAME
${ENTRY})
- string(REGEX REPLACE "^.*\t(.*)\t.*" "\\1" _DIR ${ENTRY})
- string(REGEX REPLACE "^.*\t.*\t(.*)" "\\1"_NAMEONCD
${ENTRY})
- set(filename ${BOOTCD_DIR}/${_DIR}/${_NAMEONCD})
- list(APPEND ${_target}_FILES ${filename})
- add_custom_command(
- OUTPUT ${filename}
- COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${filename}
- DEPENDS ${_FILENAME})
- endforeach()
-
- add_custom_command(
- OUTPUT ${BOOTCD_DIR}/reactos/reactos.inf ${BOOTCD_DIR}/reactos/reactos.cab
- COMMAND ${CMAKE_COMMAND} -E copy ${REACTOS_BINARY_DIR}/boot/reactos.inf
${BOOTCD_DIR}/reactos/reactos.inf
- COMMAND ${CMAKE_COMMAND} -E copy ${REACTOS_BINARY_DIR}/boot/reactos.cab
${BOOTCD_DIR}/reactos/reactos.cab
- DEPENDS ${REACTOS_BINARY_DIR}/boot/reactos.cab)
- list(APPEND ${_target}_FILES ${filename} ${BOOTCD_DIR}/reactos/reactos.inf
${BOOTCD_DIR}/reactos/reactos.cab)
-endmacro()
-
-create_bootcd_dir(${REACTOS_BINARY_DIR}/boot/bootcd bootcd)
-add_custom_target(bootcd
- COMMAND native-cdmake -v -j -m -b
${CMAKE_CURRENT_BINARY_DIR}/boot/freeldr/bootsect/isoboot.bin ${BOOTCD_DIR} REACTOS
${REACTOS_BINARY_DIR}/bootcd.iso
- DEPENDS ${bootcd_FILES})
-add_dependencies(bootcd dosmbr ext2 fat32 fat isoboot isobtrt vgafonts)
-set_directory_properties(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
${REACTOS_BINARY_DIR}/bootcd.iso)
-
-#bootcdregtest target
-create_bootcd_dir(${REACTOS_BINARY_DIR}/boot/bootcdregtest bootcdregtest)
-add_custom_command(
- OUTPUT ${REACTOS_BINARY_DIR}/boot/bootcdregtest/reactos/unattend.inf
- COMMAND ${CMAKE_COMMAND} -E copy
${REACTOS_SOURCE_DIR}/boot/bootdata/bootcdregtest/unattend.inf
${REACTOS_BINARY_DIR}/boot/bootcdregtest/reactos/unattend.inf
- DEPENDS ${REACTOS_SOURCE_DIR}/boot/bootdata/bootcdregtest/unattend.inf
${REACTOS_BINARY_DIR}/boot/bootcdregtest)
-add_custom_target(bootcdregtest
- COMMAND native-cdmake -v -j -m -b
${CMAKE_CURRENT_BINARY_DIR}/boot/freeldr/bootsect/isoboot.bin
${REACTOS_BINARY_DIR}/boot/bootcdregtest REACTOS ${REACTOS_BINARY_DIR}/bootcdregtest.iso
- DEPENDS ${REACTOS_BINARY_DIR}/boot/bootcdregtest/reactos/unattend.inf
${bootcdregtest_FILES})
-add_dependencies(bootcdregtest dosmbr ext2 fat32 fat isoboot isobtrt vgafonts)
-
-
-#livecd target
-file(MAKE_DIRECTORY
- "${LIVECD_DIR}"
- "${LIVECD_DIR}/loader"
- "${LIVECD_DIR}/Profiles"
- "${LIVECD_DIR}/Profiles/All Users"
- "${LIVECD_DIR}/Profiles/All Users/Desktop"
- "${LIVECD_DIR}/Profiles/Default User"
- "${LIVECD_DIR}/Profiles/Default User/Desktop"
- "${LIVECD_DIR}/Profiles/Default User/My Documents"
- "${LIVECD_DIR}/reactos"
- "${LIVECD_DIR}/reactos/inf"
- "${LIVECD_DIR}/reactos/fonts"
- "${LIVECD_DIR}/reactos/system32"
- "${LIVECD_DIR}/reactos/system32/config")
-
-file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_livecd_target.txt LIVECD_TARGET_ENTRIES)
-foreach(ENTRY ${LIVECD_TARGET_ENTRIES})
- string(REGEX REPLACE "^(.*)\t.*\t.*" "\\1" _targetname ${ENTRY})
- string(REGEX REPLACE "^.*\t(.*)\t.*" "\\1" _DIR ${ENTRY})
- string(REGEX REPLACE "^.*\t.*\t(.*)" "\\1"_NAMEONCD ${ENTRY})
- get_target_property(_FILENAME ${_targetname} LOCATION)
- set(filename ${LIVECD_DIR}/${_DIR}/${_NAMEONCD})
- list(APPEND LIVECD_FILES ${filename})
- add_custom_command(
- OUTPUT ${filename}
- COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${LIVECD_DIR}/${_DIR}/${_NAMEONCD}
- DEPENDS ${_targetname})
-endforeach()
-file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_livecd.txt LIVECD_ENTRIES)
-
-foreach(ENTRY ${LIVECD_ENTRIES})
- string(REGEX REPLACE "^(.*)\t.*\t.*" "\\1" _FILENAME ${ENTRY})
- string(REGEX REPLACE "^.*\t(.*)\t.*" "\\1" _DIR ${ENTRY})
- string(REGEX REPLACE "^.*\t.*\t(.*)" "\\1"_NAMEONCD ${ENTRY})
- set(filename ${LIVECD_DIR}/${_DIR}/${_NAMEONCD})
- list(APPEND LIVECD_FILES ${filename})
- add_custom_command(
- OUTPUT ${filename}
- COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${LIVECD_DIR}/${_DIR}/${_NAMEONCD}
- DEPENDS ${_FILENAME})
-endforeach()
-
-add_custom_target(livecd
- 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 ${LIVECD_FILES})
-add_dependencies(livecd isoboot livecd_hives vgafonts)
-
-set_directory_properties(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
${REACTOS_BINARY_DIR}/livecd.iso)
Copied: trunk/reactos/toolchain-gcc.cmake (from r52200,
trunk/reactos/toolchain-mingw32.cmake)
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/toolchain-gcc.cmake?p2=tru…
==============================================================================
--- trunk/reactos/toolchain-mingw32.cmake [iso-8859-1] (original)
+++ trunk/reactos/toolchain-gcc.cmake [iso-8859-1] Mon Jun 13 10:36:40 2011
@@ -24,16 +24,15 @@
set(CCACHE "" CACHE STRING "ccache")
endif()
-# the name of the target operating system
+# The name of the target operating system
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR i686)
-# which compilers to use for C and C++
+# Which compilers to use for C and C++
set(CMAKE_C_COMPILER ${CCACHE} ${MINGW_PREFIX}gcc)
set(CMAKE_CXX_COMPILER ${CCACHE} ${MINGW_PREFIX}g++)
set(CMAKE_RC_COMPILER ${MINGW_PREFIX}windres)
set(CMAKE_ASM_COMPILER ${MINGW_PREFIX}gcc)
-set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp -o
<OBJECT> -I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm
<FLAGS> <DEFINES> -D__ASM__ -c <SOURCE>")
if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
set(CMAKE_AR ${MINGW_PREFIX}ar)
@@ -42,15 +41,10 @@
set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
endif()
-# Use stdcall fixups, and don't link with anything by default unless we say so
+# Don't link with anything by default unless we say so
set(CMAKE_C_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C
Libraries")
#MARK_AS_ADVANCED(CLEAR CMAKE_CXX_STANDARD_LIBRARIES)
set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "Standard C++
Libraries")
-if(ARCH MATCHES i386)
- set(CMAKE_SHARED_LINKER_FLAGS_INIT "-nodefaultlibs -nostdlib
-Wl,--enable-auto-image-base -Wl,--disable-auto-import")
-#-Wl,-T,${REACTOS_SOURCE_DIR}/global.lds
-elseif(ARCH MATCHES amd64)
- set(CMAKE_SHARED_LINKER_FLAGS_INIT "-nodefaultlibs -nostdlib
-Wl,--enable-auto-image-base -Wl,--disable-auto-import")
-endif()
+set(CMAKE_SHARED_LINKER_FLAGS_INIT "-nodefaultlibs -nostdlib
-Wl,--enable-auto-image-base -Wl,--disable-auto-import")
Removed: trunk/reactos/toolchain-mingw32.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/toolchain-mingw32.cmake?re…
==============================================================================
--- trunk/reactos/toolchain-mingw32.cmake [iso-8859-1] (original)
+++ trunk/reactos/toolchain-mingw32.cmake (removed)
@@ -1,56 +1,0 @@
-
-if(NOT ARCH)
- set(ARCH i386)
-endif()
-
-# Choose the right MinGW prefix
-if(ARCH MATCHES i386)
-
- if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
- set(MINGW_PREFIX "" CACHE STRING "MinGW Prefix")
- else()
- set(MINGW_PREFIX "mingw32-" CACHE STRING "MinGW Prefix")
- endif(CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
-
-elseif(ARCH MATCHES amd64)
- set(MINGW_PREFIX "x86_64-w64-mingw32-" CACHE STRING "MinGW
Prefix")
-elseif(ARCH MATCHES arm)
- set(MINGW_PREFIX "arm-mingw32ce-" CACHE STRING "MinGW Prefix")
-endif()
-
-if(ENABLE_CCACHE)
- set(CCACHE "ccache" CACHE STRING "ccache")
-else()
- set(CCACHE "" CACHE STRING "ccache")
-endif()
-
-# the name of the target operating system
-set(CMAKE_SYSTEM_NAME Windows)
-set(CMAKE_SYSTEM_PROCESSOR i686)
-
-# which compilers to use for C and C++
-set(CMAKE_C_COMPILER ${CCACHE} ${MINGW_PREFIX}gcc)
-set(CMAKE_CXX_COMPILER ${CCACHE} ${MINGW_PREFIX}g++)
-set(CMAKE_RC_COMPILER ${MINGW_PREFIX}windres)
-set(CMAKE_ASM_COMPILER ${MINGW_PREFIX}gcc)
-set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp -o
<OBJECT> -I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm
<FLAGS> <DEFINES> -D__ASM__ -c <SOURCE>")
-
-if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
- set(CMAKE_AR ${MINGW_PREFIX}ar)
- set(CMAKE_C_CREATE_STATIC_LIBRARY "${CMAKE_AR} crs <TARGET>
<LINK_FLAGS> <OBJECTS>")
- set(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
- set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
-endif()
-
-# Use stdcall fixups, and don't link with anything by default unless we say so
-set(CMAKE_C_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C
Libraries")
-
-#MARK_AS_ADVANCED(CLEAR CMAKE_CXX_STANDARD_LIBRARIES)
-set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "Standard C++
Libraries")
-
-if(ARCH MATCHES i386)
- set(CMAKE_SHARED_LINKER_FLAGS_INIT "-nodefaultlibs -nostdlib
-Wl,--enable-auto-image-base -Wl,--disable-auto-import")
-#-Wl,-T,${REACTOS_SOURCE_DIR}/global.lds
-elseif(ARCH MATCHES amd64)
- set(CMAKE_SHARED_LINKER_FLAGS_INIT "-nodefaultlibs -nostdlib
-Wl,--enable-auto-image-base -Wl,--disable-auto-import")
-endif()
Modified: trunk/reactos/tools/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/CMakeLists.txt?rev=5…
==============================================================================
--- trunk/reactos/tools/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/tools/CMakeLists.txt [iso-8859-1] Mon Jun 13 10:36:40 2011
@@ -1,5 +1,9 @@
#add_executable(pefixup pefixup.c)
+
+if(MSVC)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+endif()
add_subdirectory(cabman)
add_subdirectory(cdmake)