1 # Look for a directory containing external libraries.
\r
3 # The following values are defined
\r
4 # EXTERNAL_PATH - where to find external
\r
5 # EXTERNAL_INCLUDE_PATH - where to find external includes
\r
6 # EXTERNAL_BINARY_PATH - where to find external binaries
\r
7 # EXTERNAL_LIBRARY_PATH - where to find external libraries
\r
8 # EXTERNAL_FOUND - True if the external libraries are available
\r
10 SET(EXTERNAL_TEMP_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external ${CMAKE_CURRENT_SOURCE_DIR}/../external ${CMAKE_CURRENT_SOURCE_DIR}/3rdParty ${CMAKE_CURRENT_SOURCE_DIR}/../3rdParty ${EXTERNAL_PATH})
\r
11 SET(EXTERNAL_TEMP_FILE "include/zlib.h")
\r
12 SET(EXTERNAL_NAME "external")
\r
14 # If using STLport preprend external_stlport
\r
16 SET(EXTERNAL_TEMP_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external_stlport ${CMAKE_CURRENT_SOURCE_DIR}/../external_stlport ${EXTERNAL_TEMP_PATH})
\r
17 SET(EXTERNAL_TEMP_FILE "include/stlport/string")
\r
18 SET(EXTERNAL_NAME "external with STLport")
\r
21 FIND_PATH(EXTERNAL_PATH
\r
22 ${EXTERNAL_TEMP_FILE}
\r
25 ${EXTERNAL_TEMP_PATH}
\r
35 SET(EXTERNAL_FOUND TRUE)
\r
36 SET(EXTERNAL_INCLUDE_PATH "${EXTERNAL_PATH}/include")
\r
38 # Using 32 or 64 bits binaries
\r
39 IF(TARGET_X64 AND WIN32)
\r
40 SET(EXTERNAL_BINARY_PATH "${EXTERNAL_PATH}/bin64")
\r
42 SET(EXTERNAL_BINARY_PATH "${EXTERNAL_PATH}/bin")
\r
45 # Using 32 or 64 bits libraries
\r
46 IF(TARGET_X64 AND WIN32)
\r
47 SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib64")
\r
49 SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib")
\r
52 SET(CMAKE_INCLUDE_PATH "${EXTERNAL_INCLUDE_PATH};${CMAKE_INCLUDE_PATH}")
\r
53 # Stupid hack for FindOpenAL.cmake
\r
54 SET(CMAKE_INCLUDE_PATH "${EXTERNAL_PATH};${CMAKE_INCLUDE_PATH}")
\r
55 SET(CMAKE_LIBRARY_PATH "${EXTERNAL_LIBRARY_PATH};${CMAKE_LIBRARY_PATH}")
\r
59 IF(NOT External_FIND_QUIETLY)
\r
60 MESSAGE(STATUS "Found ${EXTERNAL_NAME}: ${EXTERNAL_PATH}")
\r
63 IF(External_FIND_REQUIRED)
\r
64 MESSAGE(FATAL_ERROR "Unable to find ${EXTERNAL_NAME}!")
\r
66 IF(NOT External_FIND_QUIETLY)
\r
67 MESSAGE(STATUS "Warning: Unable to find ${EXTERNAL_NAME}!")
\r
72 MARK_AS_ADVANCED(EXTERNAL_INCLUDE_PATH EXTERNAL_BINARY_PATH EXTERNAL_LIBRARY_PATH)
\r