Changeset View
Changeset View
Standalone View
Standalone View
cmake/FindLIBVLC.cmake
1 | # CMake module to search for LIBVLC (VLC library) | 1 | # CMake module to search for LIBVLC (VLC library) | ||
---|---|---|---|---|---|
2 | # | 2 | # | ||
3 | # Copyright (C) 2011-2012, Harald Sitter <sitter@kde.org> | 3 | # Copyright (C) 2011-2018, Harald Sitter <sitter@kde.org> | ||
adridg: Should probably be `2011-2012, 2018`, but that's copyright-notice-wrangling. | |||||
4 | # Copyright (C) 2010, Rohit Yadav <rohityadav89@gmail.com> | 4 | # Copyright (C) 2010, Rohit Yadav <rohityadav89@gmail.com> | ||
5 | # | 5 | # | ||
6 | # Redistribution and use is allowed according to the terms of the BSD license. | 6 | # Redistribution and use is allowed according to the terms of the BSD license. | ||
7 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. | 7 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
8 | # | 8 | # | ||
9 | # If it's found it sets LIBVLC_FOUND to TRUE | 9 | # If it's found it sets LIBVLC_FOUND to TRUE | ||
10 | # and following variables are set: | 10 | # and following variables are set: | ||
11 | # LIBVLC_INCLUDE_DIR | 11 | # LIBVLC_INCLUDE_DIR | ||
▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Line(s) | |||||
89 | endif (LIBVLC_INCLUDE_DIR AND LIBVLC_LIBRARY AND LIBVLCCORE_LIBRARY) | 89 | endif (LIBVLC_INCLUDE_DIR AND LIBVLC_LIBRARY AND LIBVLCCORE_LIBRARY) | ||
90 | 90 | | |||
91 | if (LIBVLC_VERSION STRLESS "${LIBVLC_MIN_VERSION}") | 91 | if (LIBVLC_VERSION STRLESS "${LIBVLC_MIN_VERSION}") | ||
92 | message(WARNING "LibVLC version not found: version searched: ${LIBVLC_MIN_VERSION}, found ${LIBVLC_VERSION}\nUnless you are on Windows this is bound to fail.") | 92 | message(WARNING "LibVLC version not found: version searched: ${LIBVLC_MIN_VERSION}, found ${LIBVLC_VERSION}\nUnless you are on Windows this is bound to fail.") | ||
93 | # TODO: only activate once version detection can be garunteed (which is currently not the case on windows) | 93 | # TODO: only activate once version detection can be garunteed (which is currently not the case on windows) | ||
94 | # set(LIBVLC_FOUND FALSE) | 94 | # set(LIBVLC_FOUND FALSE) | ||
95 | endif (LIBVLC_VERSION STRLESS "${LIBVLC_MIN_VERSION}") | 95 | endif (LIBVLC_VERSION STRLESS "${LIBVLC_MIN_VERSION}") | ||
96 | 96 | | |||
97 | if (LIBVLC_FOUND) | | |||
98 | if (NOT LIBVLC_FIND_QUIETLY) | 97 | if (NOT LIBVLC_FIND_QUIETLY) | ||
99 | message(STATUS "Found LibVLC include-dir path: ${LIBVLC_INCLUDE_DIR}") | 98 | message(STATUS "Found LibVLC include-dir path: ${LIBVLC_INCLUDE_DIR}") | ||
100 | message(STATUS "Found LibVLC library path:${LIBVLC_LIBRARY}") | 99 | message(STATUS "Found LibVLC library path:${LIBVLC_LIBRARY}") | ||
101 | message(STATUS "Found LibVLCcore library path:${LIBVLCCORE_LIBRARY}") | 100 | message(STATUS "Found LibVLCcore library path:${LIBVLCCORE_LIBRARY}") | ||
102 | message(STATUS "Found LibVLC version: ${LIBVLC_VERSION} (searched for: ${LIBVLC_MIN_VERSION})") | 101 | message(STATUS "Found LibVLC version: ${LIBVLC_VERSION} (searched for: ${LIBVLC_MIN_VERSION})") | ||
103 | endif (NOT LIBVLC_FIND_QUIETLY) | 102 | endif (NOT LIBVLC_FIND_QUIETLY) | ||
Since you're changing this anyway, how about chaging the endif to modern style as well? adridg: Since you're changing this anyway, how about chaging the `endif` to modern style as well? | |||||
104 | else (LIBVLC_FOUND) | 103 | | ||
105 | if (LIBVLC_FIND_REQUIRED) | 104 | if (NOT LIBVLC_FOUND AND LIBVLC_FIND_REQUIRED) | ||
106 | message(FATAL_ERROR "Could not find LibVLC") | 105 | message(FATAL_ERROR "Could not find LibVLC/LibVLCcore") | ||
107 | endif (LIBVLC_FIND_REQUIRED) | 106 | endif () | ||
108 | endif (LIBVLC_FOUND) | |
Should probably be 2011-2012, 2018, but that's copyright-notice-wrangling.