[CMAKE]: Make cross-build work on all systems. RosBE Already is nice and adds itself...
[reactos.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8)
2 project(REACTOS)
3
4 add_definitions(-D__REACTOS__)
5
6 #-fshort-wchar
7
8 if(NOT CMAKE_CROSSCOMPILING)
9
10 add_definitions(-DTARGET_i386)
11
12 include_directories(${REACTOS_SOURCE_DIR}/tools/unicode)
13 include_directories(./include)
14 include_directories(./include/reactos)
15 include_directories(./include/reactos/wine)
16
17 add_subdirectory(tools)
18
19 export(TARGETS widl FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
20
21 else()
22
23 set(IMPORT_EXECUTABLES "${REACTOS_SOURCE_DIR}/build/ImportExecutables.cmake" CACHE FILEPATH "Host executables")
24 include(${IMPORT_EXECUTABLES})
25
26 add_definitions(-DDBG=1)
27 add_definitions(-D_SEH_ENABLE_TRACE)
28 add_definitions(-DKDBG=1)
29 add_definitions(-DWINVER=0x502)
30 add_definitions(-D_WIN32_IE=0x600)
31 add_definitions(-D_WIN32_WINNT=0x502)
32 add_definitions(-D_WIN32_WINDOWS=0x502)
33 add_definitions(-D_SETUPAPI_VER=0x502)
34 add_definitions(-D_M_IX86)
35 add_definitions(-D_X86_)
36 add_definitions(-D__i386__)
37 add_definitions(-DUSE_COMPILER_EXCEPTIONS)
38 add_definitions(-D_USE_32BIT_TIME_T)
39
40 include_directories(./include)
41 include_directories(./include/psdk)
42 include_directories(${REACTOS_BINARY_DIR}/include/psdk)
43 include_directories(./include/crt)
44 include_directories(./include/crt/mingw32)
45 include_directories(./include/ddk)
46 include_directories(./include/ndk)
47 include_directories(./include/reactos)
48 include_directories(./include/reactos/libs)
49
50 add_subdirectory(include/psdk)
51
52 add_subdirectory(lib)
53
54 endif()