Revert previous commit, was incorrect
[amarok.git] / cmake / modules / FindHelix.cmake
blob725957769ed2dccf483243a369e8edd2a56de3c6
1 # - Try to find the Helix or Realplayer libraries
2 # Once done this will define
4 #  HELIX_FOUND - system has the Realplayer or Helixplayer libraries installed
5 #  HELIX_LIBRARY - The helix client core library location
6 #  HELIX_LIBRARY_PATH - location of the package
10 if (HELIX_LIBRARY)
11   # Already in cache, be silent
12   set(Helix_FIND_QUIETLY TRUE)
13 endif (HELIX_LIBRARY)
15 EXEC_PROGRAM( dirname ARGS "${CMAKE_CURRENT_LIST_FILE}" OUTPUT_VARIABLE cmakeModulesPath )
16 EXEC_PROGRAM( ${cmakeModulesPath}/RealPlayerLocation.rb OUTPUT_VARIABLE possible_path )
18 FIND_PATH(HELIX_LIBRARY clntcore.so
19  ${possible_path}/common
20  /usr/local/Helix*/common
21  /usr/local/helix*/common
22  /usr/local/Real*/common
23  /usr/local/real*/common
24  /usr/local/share/Helix*/common
25  /usr/local/share/helix*/common
26  /usr/local/share/Real*/common
27  /usr/local/share/real*/common
28  /usr/local/lib/Helix*/common
29  /usr/local/lib/helix*/common
30  /usr/local/lib/Real*/common
31  /usr/local/lib/real*/common
32  /opt/Helix*/common
33  /opt/helix*/common
34  /opt/Real*/common
35  /opt/real*/common
36  /usr/share/Helix*/common
37  /usr/share/helix*/common
38  /usr/share/Real*/common
39  /usr/share/real*/common
40  /usr/lib/Helix*/common
41  /usr/lib/helix*/common
42  /usr/lib/Real*/common
43  /usr/lib/real*/common
44  ${HOME}/Helix*/common
45  ${HOME}/helix*/common
46  ${HOME}/Real*/common
47  ${HOME}/real*/common
50 if (HELIX_LIBRARY)
51    set(HELIX_FOUND TRUE)
52    get_filename_component(HELIX_LIBRARY_PATH ${HELIX_LIBRARY} PATH)
53    message( STATUS "PATH: " ${HELIX_LIBRARY_PATH} )
54 endif (HELIX_LIBRARY)
56 if (HELIX_FOUND)
57    if (NOT Helix_FIND_QUIETLY)
58       message(STATUS "Found Helix/Realplayer: ${HELIX_LIBRARY}")
59    endif (NOT Helix_FIND_QUIETLY)
60 else (HELIX_FOUND)
61    if (Helix_FIND_REQUIRED)
62       message(FATAL_ERROR "Could NOT find Helix or Realplayer")
63    endif (Helix_FIND_REQUIRED)
64 endif (HELIX_FOUND)
66 MARK_AS_ADVANCED(HELIX_LIBRARY)