12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- # ---------------------------------
- # Finds EXPAT toolkit
- #
- # Sets EXPAT_FOUND
- # Sets EXPAT_LIBRARIES
- # Sets EXPAT_LIBRARY_DIRS
- # Sets EXPAT_LDFLAGS
- # Sets EXPAT_LDFLAGS_OTHERS
- # Sets EXPAT_INCLUDE_DIRS
- # Sets EXPAT_CFLAGS
- # Sets EXPAT_CFLAGS_OTHERS
- # ---------------------------------
- IF(UNIX)
- SET(EXPAT_expat_INCLUDE_PATH "EXPAT_expat_INCLUDE_PATH-NOTFOUND")
- FIND_PATH(EXPAT_expat_INCLUDE_PATH "include/expat.h"
- PATHS "${LIST_DEPENDENCIES_PATH}")
- FIND_LIBRARY(EXPAT_expat_LIBRARY
- NAMES lib/expat
- PATHS "${LIST_DEPENDENCIES_PATH}")
- ENDIF(UNIX)
-
- IF(WIN32)
- SET(EXPAT_expat_INCLUDE_PATH "EXPAT_expat_INCLUDE_PATH-NOTFOUND")
- FIND_PATH(EXPAT_expat_INCLUDE_PATH "expat/Source/libexpat.h"
- PATHS "${LIST_DEPENDENCIES_PATH}")
- FIND_LIBRARY(EXPAT_expat_LIBRARY
- NAMES libexpat
- PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES "expat/Libs" "expat/Bin")
- ENDIF(WIN32)
-
- IF(EXPAT_expat_INCLUDE_PATH)
- IF(EXPAT_expat_LIBRARY)
- SET(EXPAT_FOUND TRUE)
- SET(EXPAT_LIBRARIES ${EXPAT_expat_LIBRARY})
- SET(EXPAT_LIBRARY_DIRS "")
- SET(EXPAT_LDFLAGS "")
- SET(EXPAT_LDFLAGS_OTHERS "")
- SET(EXPAT_INCLUDE_DIRS ${EXPAT_expat_INCLUDE_PATH})
- SET(EXPAT_CFLAGS "")
- SET(EXPAT_CFLAGS_OTHERS "")
- ENDIF(EXPAT_expat_LIBRARY)
- ENDIF(EXPAT_expat_INCLUDE_PATH)
-
- MARK_AS_ADVANCED(
- EXPAT_expat_INCLUDE_PATH
- EXPAT_expat_LIBRARY
-
- EXPAT_FOUND
- EXPAT_LIBRARIES
- EXPAT_LIBRARY_DIRS
- EXPAT_LDFLAGS
- EXPAT_LDFLAGS_OTHERS
- EXPAT_INCLUDE_DIRS
- EXPAT_CFLAGS
- EXPAT_CFLAGS_OTHERS
- )
-
- IF(EXPAT_FOUND)
- debug_message( " Found expat...")
- INCLUDE_DIRECTORIES(${EXPAT_INCLUDE_DIRS})
- ADD_DEFINITIONS(${EXPAT_CFLAGS})
- ADD_DEFINITIONS(${EXPAT_CFLAGS_OTHERS})
- # LINK_DIRECTORIES(${EXPAT_LIBRARY_DIRS})
- TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${EXPAT_LIBRARIES})
-
- ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyExpat)
- ELSE(EXPAT_FOUND)
- MESSAGE(WARNING " FAILED to find expat...")
- ENDIF(EXPAT_FOUND)
|