Author: akhaldi
Date: Fri Jun 24 12:08:57 2011
New Revision: 52439
URL:
http://svn.reactos.org/svn/reactos?rev=52439&view=rev
Log:
[CMAKE]
* Add a way to use WDK headers (psdk, crt and ddk) instead of ours. To use it, just alter
USE_WDK_HEADERS in configure.cmd to be 1 instead of 0.
Modified:
trunk/reactos/CMakeLists.txt
trunk/reactos/configure.cmd
Modified: trunk/reactos/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/CMakeLists.txt?rev=52439&a…
==============================================================================
--- trunk/reactos/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/CMakeLists.txt [iso-8859-1] Fri Jun 24 12:08:57 2011
@@ -152,19 +152,36 @@
# Activate language support for resource files
enable_language(RC)
- include_directories(
- include
- include/psdk
- include/dxsdk
- ${REACTOS_BINARY_DIR}/include
- ${REACTOS_BINARY_DIR}/include/dxsdk
- ${REACTOS_BINARY_DIR}/include/psdk
- ${REACTOS_BINARY_DIR}/include/reactos
- include/crt
- include/ddk
- include/ndk
- include/reactos
- include/reactos/libs)
+ if(MSVC AND USE_WDK_HEADERS)
+ include_directories(
+ include
+ $ENV{SDK_INC_PATH}
+ include/dxsdk
+ ${REACTOS_BINARY_DIR}/include
+ ${REACTOS_BINARY_DIR}/include/dxsdk
+ ${REACTOS_BINARY_DIR}/include/psdk
+ ${REACTOS_BINARY_DIR}/include/reactos
+ $ENV{CRT_INC_PATH}
+ $ENV{DDK_INC_PATH}
+ include/ndk
+ include/reactos
+ include/reactos/libs)
+ else()
+ include_directories(
+ include
+ include/psdk
+ include/dxsdk
+ ${REACTOS_BINARY_DIR}/include
+ ${REACTOS_BINARY_DIR}/include/dxsdk
+ ${REACTOS_BINARY_DIR}/include/psdk
+ ${REACTOS_BINARY_DIR}/include/reactos
+ include/crt
+ include/ddk
+ include/ndk
+ include/reactos
+ include/reactos/libs)
+ endif()
+
if(ARCH MATCHES arm)
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/arm)
Modified: trunk/reactos/configure.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/configure.cmd?rev=52439&am…
==============================================================================
--- trunk/reactos/configure.cmd [iso-8859-1] (original)
+++ trunk/reactos/configure.cmd [iso-8859-1] Fri Jun 24 12:08:57 2011
@@ -18,6 +18,7 @@
)
set BUILD_ENVIRONMENT=WDK
set USE_NMAKE=1
+ set USE_WDK_HEADERS=0
echo Detected DDK/WDK for %DDK_TARGET_OS%-%ARCH%
)else if defined VCINSTALLDIR (
:: VS command prompt does not put this in enviroment vars
@@ -118,7 +119,7 @@
if "%BUILD_ENVIRONMENT%" == "MinGW" (
cmake -G "MinGW Makefiles" -DENABLE_CCACHE=0
-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%
+ cmake -G "NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-msvc.cmake
-DUSE_WDK_HEADERS=%USE_WDK_HEADERS% -DARCH=%ARCH%
-DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" %REACTOS_SOURCE_DIR%
) else if "%BUILD_ENVIRONMENT%" == "VS8" (
if "%ARCH%" == "amd64" (
cmake -G "Visual Studio 8 2005 Win64"
-DCMAKE_TOOLCHAIN_FILE=toolchain-msvc.cmake -DARCH=%ARCH%
-DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" %REACTOS_SOURCE_DIR%