Changeset 2579 for code/branches/buildsystem2/cmake/FindALUT.cmake
- Timestamp:
- Jan 8, 2009, 9:37:41 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem2/cmake/FindALUT.cmake
r2509 r2579 21 21 # > www.orxonox.net < 22 22 23 SET(ALUT_PATHS 24 $ENV{ALUTDIR} 25 /usr/local 26 /usr 27 /sw # Fink 28 /opt/local # DarwinPorts 29 /opt/csw # Blastwave 30 /opt 31 ) 32 23 33 FIND_PATH(ALUT_INCLUDE_DIR AL/alut.h 24 34 PATHS 25 $ ENV{ALUTDIR}35 ${ALUT_PATHS} 26 36 ~/Library/Frameworks/OpenAL.framework 27 37 /Library/Frameworks/OpenAL.framework 28 38 /System/Library/Frameworks/OpenAL.framework # Tiger 29 /usr/local30 /usr31 /sw # Fink32 /opt/local # DarwinPorts33 /opt/csw # Blastwave34 /opt35 39 PATH_SUFFIXES include include/OpenAL include/AL Headers 36 40 ) 37 41 38 42 # I'm not sure if I should do a special casing for Apple. It is … … 41 45 # do they want the -framework option also? 42 46 IF(${ALUT_INCLUDE_DIR} MATCHES ".framework") 47 43 48 STRING(REGEX REPLACE "(.*)/.*\\.framework/.*" "\\1" ALUT_FRAMEWORK_PATH_TMP ${ALUT_INCLUDE_DIR}) 44 49 IF("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks" … … 46 51 ) 47 52 # String is in default search path, don't need to use -F 48 SET (ALUT_LIBRARY "-framework OpenAL" CACHE STRING "OpenAL framework for OSX")53 SET (ALUT_LIBRARY_OPTIMIZED "-framework OpenAL" CACHE STRING "OpenAL framework for OSX") 49 54 ELSE("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks" 50 55 OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks" 51 56 ) 52 57 # String is not /Library/Frameworks, need to use -F 53 SET(ALUT_LIBRARY "-F${ALUT_FRAMEWORK_PATH_TMP} -framework OpenAL" CACHE STRING "OpenAL framework for OSX")58 SET(ALUT_LIBRARY_OPTIMIZED "-F${ALUT_FRAMEWORK_PATH_TMP} -framework OpenAL" CACHE STRING "OpenAL framework for OSX") 54 59 ENDIF("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks" 55 60 OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks" … … 59 64 60 65 ELSE(${ALUT_INCLUDE_DIR} MATCHES ".framework") 61 FIND_LIBRARY(ALUT_LIBRARY 66 FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED 62 67 NAMES alut 63 PATHS 64 $ENV{ALUTDIR} 65 /usr/local 66 /usr 67 /sw 68 /opt/local 69 /opt/csw 70 /opt 68 PATHS ${ALUT_PATHS} 71 69 PATH_SUFFIXES lib libs 72 ) 70 ) 71 FIND_LIBRARY(ALUT_LIBRARY_DEBUG 72 NAMES alut_${LIBRARY_DEBUG_POSTFIX} 73 PATHS ${ALUT_PATHS} 74 PATH_SUFFIXES lib libs 75 ) 73 76 ENDIF(${ALUT_INCLUDE_DIR} MATCHES ".framework") 74 77 75 78 # handle the QUIETLY and REQUIRED arguments and set ALUT_FOUND to TRUE if 76 79 # all listed variables are TRUE 77 INCLUDE(FindPackageHandleStandardArgs) 78 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALUT DEFAULT_MSG ALUT_LIBRARY ALUT_INCLUDE_DIR) 80 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALUT DEFAULT_MSG 81 ALUT_LIBRARY_OPTIMIZED 82 ALUT_INCLUDE_DIR 83 ) 79 84 80 MARK_AS_ADVANCED(ALUT_LIBRARY ALUT_INCLUDE_DIR) 85 # Set optimized and debug libraries 86 HandleLibraryTypes(ALUT) 87 88 MARK_AS_ADVANCED( 89 ALUT_LIBRARY 90 ALUT_LIBRARY_OPTIMIZED 91 ALUT_LIBRARY_DEBUG 92 ALUT_INCLUDE_DIR 93 )
Note: See TracChangeset
for help on using the changeset viewer.