Author: tkreuzer Date: Mon Nov 1 15:15:02 2010 New Revision: 49405
URL: http://svn.reactos.org/svn/reactos?rev=49405&view=rev Log: [CMAKE] 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.
Modified: branches/cmake-bringup/PreLoad.cmake
Modified: branches/cmake-bringup/PreLoad.cmake URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/PreLoad.cmake?rev=... ============================================================================== --- branches/cmake-bringup/PreLoad.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/PreLoad.cmake [iso-8859-1] Mon Nov 1 15:15:02 2010 @@ -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}")