check PATH for iconv.dll

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14901 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2006-09-06 08:43:48 +00:00
parent 0f40c394ce
commit 3a4c53e206

View File

@ -22,16 +22,22 @@ if(WIN32)
NAMES ${ICONV_DLL_NAMES} NAMES ${ICONV_DLL_NAMES}
PATHS ENV PATH PATHS ENV PATH
NO_DEFAULT_PATH) NO_DEFAULT_PATH)
FIND_FILE(ICONV_DLL_HELP NAMES libiconv2.dll) FIND_FILE(ICONV_DLL_HELP
NAMES ${ICONV_DLL_NAMES}
PATHS ENV PATH
${ICONV_INCLUDE_DIR}/../bin)
IF(ICONV_FIND_REQUIRED) IF(ICONV_FIND_REQUIRED)
IF(NOT ICONV_DLL AND NOT ICONV_DLL_HELP) IF(NOT ICONV_DLL AND NOT ICONV_DLL_HELP)
MESSAGE(FATAL_ERROR "Could not find iconv.dll, please add correct your PATH environment variable") MESSAGE(FATAL_ERROR "Could not find iconv.dll, please add correct your PATH environment variable")
ENDIF(NOT ICONV_DLL AND NOT ICONV_DLL_HELP) ENDIF(NOT ICONV_DLL AND NOT ICONV_DLL_HELP)
IF(NOT ICONV_DLL AND ICONV_DLL_HELP) IF(NOT ICONV_DLL AND ICONV_DLL_HELP)
GET_FILENAME_COMPONENT(ICONV_DLL_HELP ${ICONV_DLL_HELP} PATH) GET_FILENAME_COMPONENT(ICONV_DLL_HELP ${ICONV_DLL_HELP} PATH)
MESSAGE("\nCould not find iconv.dll in standard search path, please add ") MESSAGE(STATUS)
MESSAGE("${ICONV_DLL_HELP} to your PATH environment variable.\n") MESSAGE(STATUS "Could not find iconv.dll in standard search path, please add ")
MESSAGE(FATAL_ERROR) MESSAGE(STATUS "${ICONV_DLL_HELP}")
MESSAGE(STATUS "to your PATH environment variable.")
MESSAGE(STATUS)
MESSAGE(FATAL_ERROR "exit cmake")
ENDIF(NOT ICONV_DLL AND ICONV_DLL_HELP) ENDIF(NOT ICONV_DLL AND ICONV_DLL_HELP)
ENDIF(ICONV_FIND_REQUIRED) ENDIF(ICONV_FIND_REQUIRED)
ELSE(WIN32) ELSE(WIN32)
@ -52,8 +58,8 @@ ELSE (ICONV_FOUND)
IF (ICONV_FIND_REQUIRED) IF (ICONV_FIND_REQUIRED)
MESSAGE(STATUS "Looked for iconv library named ${POTENTIAL_ICONV_LIBS}.") MESSAGE(STATUS "Looked for iconv library named ${POTENTIAL_ICONV_LIBS}.")
MESSAGE(STATUS "Found no acceptable iconv library. This is fatal.") MESSAGE(STATUS "Found no acceptable iconv library. This is fatal.")
message("iconv header: ${ICONV_INCLUDE_DIR}") MESSAGE(STATUS "iconv header: ${ICONV_INCLUDE_DIR}")
message("iconv lib : ${ICONV_LIBRARY}") MESSAGE(STATUS "iconv lib : ${ICONV_LIBRARY}")
MESSAGE(FATAL_ERROR "Could NOT find iconv library") MESSAGE(FATAL_ERROR "Could NOT find iconv library")
ENDIF (ICONV_FIND_REQUIRED) ENDIF (ICONV_FIND_REQUIRED)
ENDIF (ICONV_FOUND) ENDIF (ICONV_FOUND)