When PreLoad.cmake is run, the CMAKE_CURRENT_SOURCE_DIR points to the directory, where the cmake command was executed (bug?). To get the root folder of reactos, use CMAKE_CURRENT_LIST_FILE, which points to PreLoad.cmake in the root folder.

svn path=/branches/cmake-bringup/; revision=49405
This commit is contained in:
Timo Kreuzer 2010-11-01 15:15:02 +00:00
parent 85f6dd0d60
commit f2fd276358

View file

@ -1,7 +1,10 @@
#message("PreLoad.cmake ...")
# small trick to get the real source directory at this stage
STRING(REPLACE "/PreLoad.cmake" "" REACTOS_HOME_DIR ${CMAKE_CURRENT_LIST_FILE})
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Modules" CACHE INTERNAL "")
#message("/PreLoad.cmake ... ${REACTOS_HOME_DIR}")
SET(CMAKE_MODULE_PATH "${REACTOS_HOME_DIR}/cmake/Modules" CACHE INTERNAL "")
#message("CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")