-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 2.8)
if(POLICY CMP0017)
# Shadow cmake provided modules
cmake_policy(SET CMP0017 OLD)
endif()
+if(POLICY CMP0026)
+ # Allow use of the LOCATION property
+ cmake_policy(SET CMP0026 OLD)
+endif()
+
project(REACTOS)
# Versioning
if(ARCH STREQUAL "i386")
add_definitions(/D_X86_ /DWIN32 /D_WINDOWS)
endif()
+ if(MSVC_VERSION GREATER 1699)
+ add_definitions(/D_ALLOW_KEYWORD_MACROS)
+ endif()
add_definitions(/Dinline=__inline)
else()
add_compile_flags("-fshort-wchar -Wno-multichar")
add_subdirectory(lib)
if(NOT MSVC)
- export(TARGETS bin2c widl gendib cabman cdmake mkhive obj2bin spec2def geninc rsym mkshelllink FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
+ export(TARGETS bin2c widl gendib cabman cdmake mkhive obj2bin spec2def geninc rsym mkshelllink utf16le FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
else()
- export(TARGETS bin2c widl gendib cabman cdmake mkhive obj2bin spec2def geninc mkshelllink FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
+ export(TARGETS bin2c widl gendib cabman cdmake mkhive obj2bin spec2def geninc mkshelllink utf16le FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
endif()
else()
add_definitions(-D_WINKD_=1)
endif()
- if((NOT DEFINED PCH) AND (CMAKE_VERSION STREQUAL "2.8.12.1-ReactOS") AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang"))
- set(PCH 1)
+ if(CMAKE_VERSION STREQUAL "2.8.12.1-ReactOS")
+ set(PCH 1 CACHE BOOL "Whether to use precompiled headers")
else()
- set(PCH 0)
+ set(PCH 0 CACHE BOOL "Whether to use precompiled headers")
endif()
# Version Options
add_subdirectory(include/reactos/mc)
add_subdirectory(include/asm)
- include(cmake/baseaddress.cmake)
+ if(NO_ROSSYM)
+ include(cmake/baseaddress_dwarf.cmake)
+ else()
+ include(cmake/baseaddress.cmake)
+ endif()
# For MSVC builds, this puts all debug symbols file in the same directory.
set(CMAKE_PDB_OUTPUT_DIRECTORY "${REACTOS_BINARY_DIR}/msvc_pdb")