1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- # ---------------------------------
- # 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 "expat.h"
- PATHS "${OV_CUSTOM_DEPENDENCIES_PATH}/include")
- FIND_LIBRARY(EXPAT_expat_LIBRARY
- NAMES expat
- PATHS "${OV_CUSTOM_DEPENDENCIES_PATH}/lib")
- ENDIF(UNIX)
-
- IF(WIN32)
- SET(EXPAT_expat_INCLUDE_PATH "EXPAT_expat_INCLUDE_PATH-NOTFOUND")
- FIND_PATH(EXPAT_expat_INCLUDE_PATH "expat.h"
- PATHS ${OV_CUSTOM_DEPENDENCIES_PATH} PATH_SUFFIXES expat/include expat/Source/lib)
- FIND_LIBRARY(EXPAT_expat_LIBRARY
- NAMES libexpat
- PATHS ${OV_CUSTOM_DEPENDENCIES_PATH} PATH_SUFFIXES expat/Lib expat/Bin)
-
- FIND_PATH(EXPAT_BIN . PATHS ${OV_CUSTOM_DEPENDENCIES_PATH} PATH_SUFFIXES expat/Bin NO_DEFAULT_PATH)
-
- INSTALL(
- DIRECTORY ${EXPAT_BIN}/
- DESTINATION ${DIST_BINDIR}
- FILES_MATCHING PATTERN "*.dll")
- 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)
|