<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">expat_DIR is an environment variable that should point to the installation location of Expat. expatConfig.cmake is probably located in the "include" directory of your expat installation.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>These are just guesses.</DIV><DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Bitstream Vera Sans; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-- </DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mike Jackson   Senior Research Engineer</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Innovative Management &amp; Technology Services</DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR><DIV><DIV>On Oct 17, 2007, at 7:42 PM, eddy xu wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Hi all,<BR><BR>When I try to generate Makefile on a gentoo box, one error message comes out:<BR><BR>CMake Error: expat_DIR is not set. It must be set to the directory containing expatConfig.cmake in order to use expat.<BR> <BR>And I can not get any meaningful help from google the keyword "expatConfig". Can any one gives some advices?<BR><BR>My CMakeList.txt is below:<BR><BR><BR>SET( SRCS XML_Node.cpp XML_Parser_Base.cpp )<BR><BR>IF ( WIN32 ) <BR>        set ( EXPAT_LIBRARY "c:\\work\\expat\\Source\\lib" )<BR>        set ( EXPAT_INCLUDE_DIR "c:\\work\\expat\\Source\\lib" )<BR><BR>        set ( SRCS ${SRCS} XML_Win32_Parser.cpp XML_Win32_Parser.h ) <BR>        set ( SRCS ${SRCS} XML_Parser_Base.h XML_Node.h <BR>                )<BR>ENDIF ( WIN32 )<BR><BR>ADD_LIBRARY ( qlibxml SHARED ${SRCS} )<BR><BR><BR>IF ( ${CMAKE_SYSTEM} MATCHES Linux OR ${CMAKE_SYSTEM} MATCHES Darwin OR ${CMAKE_SYSTEM} MATCHES Freebsd ) <BR><BR>        MESSAGE ( STATUS "Configure in Unix" )<BR>        set ( SRCS ${SRCS} XML_Stream_Parser.cpp )<BR><BR>        # check for expat<BR>        FIND_PACKAGE ( expat REQUIRED )<BR>        IF ( EXPAT_FOUND ) <BR>                INCLUDE_DIRECTORIES ( ${EXPAT_INCLUDE_DIRS} )<BR>                TARGET_LINK_LIBRARIES ( qlibxml ${EXPAT_LIBRARIES} )<BR>        ELSE ( EXPAT_FOUND )<BR>                MESSAGE( FATAL_ERROR "No expat installed" ) <BR>        ENDIF( EXPAT_FOUND )<BR><BR>ENDIF ( ${CMAKE_SYSTEM} MATCHES Linux OR ${CMAKE_SYSTEM} MATCHES Darwin OR ${CMAKE_SYSTEM} MATCHES Freebsd )<BR><BR><BR>And the expat configure part works fine on Mac OS X ( which kernel names Darwin ) <BR><BR>Thanks for all advices!<BR><BR>Eddy Xu <BR><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">CMake mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:CMake@cmake.org">CMake@cmake.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>