ENH: use WindowsPaths.cmake on all Windows platforms, not only for cl, makes

the mingw cross compiler work out of the box and should help mingw users on
windows with a common install dir

Alex
This commit is contained in:
Alexander Neundorf 2007-08-02 11:17:32 -04:00
parent cd6abe486d
commit dac7814841
3 changed files with 11 additions and 6 deletions

View File

@ -271,4 +271,3 @@ IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXPlatform.cmake IMMEDIATE) ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXPlatform.cmake IMMEDIATE)
ENDIF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake") ENDIF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
INCLUDE(Platform/WindowsPaths)

View File

@ -25,10 +25,10 @@ IF(CMAKE_GENERATOR MATCHES "NMake")
SET(CMAKE_END_TEMP_FILE "\n<<") SET(CMAKE_END_TEMP_FILE "\n<<")
ENDIF(CMAKE_GENERATOR MATCHES "NMake") ENDIF(CMAKE_GENERATOR MATCHES "NMake")
INCLUDE(Platform/WindowsPaths)
# uncomment these out to debug nmake and borland makefiles # uncomment these out to debug nmake and borland makefiles
#SET(CMAKE_START_TEMP_FILE "") #SET(CMAKE_START_TEMP_FILE "")
#SET(CMAKE_END_TEMP_FILE "") #SET(CMAKE_END_TEMP_FILE "")
#SET(CMAKE_VERBOSE_MAKEFILE 1) #SET(CMAKE_VERBOSE_MAKEFILE 1)

View File

@ -1,11 +1,17 @@
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH) GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH) GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
# the /bin, /lib and /include dirs are mainly for mingw cross compiler users
# under Linux who use CMAKE_FIND_ROOT_PATH
SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH}
"$ENV{ProgramFiles}" "${CMAKE_INSTALL_PREFIX}/include" "${_CMAKE_INSTALL_DIR}/include") "$ENV{ProgramFiles}" "${CMAKE_INSTALL_PREFIX}/include" "${_CMAKE_INSTALL_DIR}/include" /include)
# mingw can also link against dlls which can also be in /bin, so list this too
SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH}
"$ENV{ProgramFiles}" "${CMAKE_INSTALL_PREFIX}/lib" "${CMAKE_INSTALL_PREFIX}/bin" "${_CMAKE_INSTALL_DIR}/lib" "${_CMAKE_INSTALL_DIR}/bin") "$ENV{ProgramFiles}"
"${CMAKE_INSTALL_PREFIX}/lib" "${CMAKE_INSTALL_PREFIX}/bin"
"${_CMAKE_INSTALL_DIR}/lib" "${_CMAKE_INSTALL_DIR}/bin"
/lib /bin )
SET(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH} SET(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH}
"$ENV{ProgramFiles}" "${CMAKE_INSTALL_PREFIX}/bin" "${_CMAKE_INSTALL_DIR}/bin") "$ENV{ProgramFiles}" "${CMAKE_INSTALL_PREFIX}/bin" "${_CMAKE_INSTALL_DIR}/bin" /bin)