Changeset 50 in pacpusframework for trunk/cmake/FindPacpus.cmake
- Timestamp:
- Jan 9, 2013, 9:06:15 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cmake/FindPacpus.cmake
r9 r50 11 11 12 12 # Check PACPUS_ROOT 13 if 14 if(NOT ENV{PACPUS_ROOT} STREQUAL "")15 set(PACPUS_ROOT $ENV{PACPUS_ROOT})16 message(STATUS "Detected PACPUS_ROOT, set to '${PACPUS_ROOT}'")17 endif()13 if(NOT PACPUS_ROOT) 14 if(NOT ENV{PACPUS_ROOT} STREQUAL "") 15 set(PACPUS_ROOT $ENV{PACPUS_ROOT}) 16 message(STATUS "Detected PACPUS_ROOT, set to '${PACPUS_ROOT}'") 17 endif() 18 18 endif() 19 19 … … 30 30 # Locate the include files 31 31 find_path( 32 PACPUS_INCLUDE_DIR33 NAMES34 "Pacpus"35 HINTS36 ${PACPUS_INCLUDE_HINT}37 DOC38 "The Pacpus include directory"32 PACPUS_INCLUDE_DIR 33 NAMES 34 "Pacpus" 35 HINTS 36 ${PACPUS_INCLUDE_HINT} 37 DOC 38 "The Pacpus include directory" 39 39 ) 40 40 41 41 # List of required modules 42 42 set(PACPUS_MODULES "FileLib" "PacpusLib" "PacpusTools" "dbiteplayerlib") 43 if 44 list(APPEND PACPUS_MODULES "ROAD_TIME")43 if(WIN32) 44 list(APPEND PACPUS_MODULES "ROAD_TIME") 45 45 endif() 46 46 … … 50 50 # Check the presence of each module 51 51 foreach(module ${PACPUS_MODULES}) 52 find_library(53 PACPUS_${module}_LIB54 NAMES55 ${module}56 HINTS57 ${PACPUS_LIBRARY_HINT}58 )59 find_library(60 PACPUS_${module}_LIBD61 NAMES62 ${module}_d63 HINTS64 ${PACPUS_LIBRARY_HINT}65 )52 find_library( 53 PACPUS_${module}_LIB 54 NAMES 55 ${module} 56 HINTS 57 ${PACPUS_LIBRARY_HINT} 58 ) 59 find_library( 60 PACPUS_${module}_LIBD 61 NAMES 62 ${module}_d 63 HINTS 64 ${PACPUS_LIBRARY_HINT} 65 ) 66 66 67 if(PACPUS_${module}_LIB AND PACPUS_${module}_LIBD)68 list(APPEND PACPUS_LIBRARIES optimized ${PACPUS_${module}_LIB})69 list(APPEND PACPUS_LIBRARIES debug ${PACPUS_${module}_LIBD})70 else()71 set(MODULE_MISSING TRUE)72 endif()67 if(PACPUS_${module}_LIB AND PACPUS_${module}_LIBD) 68 list(APPEND PACPUS_LIBRARIES optimized ${PACPUS_${module}_LIB}) 69 list(APPEND PACPUS_LIBRARIES debug ${PACPUS_${module}_LIBD}) 70 else() 71 set(MODULE_MISSING TRUE) 72 endif() 73 73 endforeach() 74 74 75 75 if(NOT MODULE_MISSING AND PACPUS_INCLUDE_DIR) 76 set(PACPUS_FOUND TRUE)76 set(PACPUS_FOUND TRUE) 77 77 else() 78 set(PACPUS_FOUND FALSE)78 set(PACPUS_FOUND FALSE) 79 79 endif()
Note:
See TracChangeset
for help on using the changeset viewer.