use mainstream project name
authorkoda
Wed, 08 Jan 2014 19:19:09 +0100
changeset 9959 1a42d36f346a
parent 9957 7a62f31895ac
child 9961 c18c66d621e5
use mainstream project name
CMakeLists.txt
QTfrontend/CMakeLists.txt
cmake_modules/FindFFMPEG.cmake
cmake_modules/FindLIBAV.cmake
hedgewars/CMakeLists.txt
hedgewars/avwrapper/CMakeLists.txt
share/CMakeLists.txt
--- a/CMakeLists.txt	Wed Jan 08 18:57:23 2014 +0100
+++ b/CMakeLists.txt	Wed Jan 08 19:19:09 2014 +0100
@@ -173,7 +173,7 @@
     add_subdirectory(misc/libphysfs)
 endif()
 
-find_package_or_disable_msg(FFMPEG NOVIDEOREC "Video recording will not be built")
+find_package_or_disable_msg(LIBAV NOVIDEOREC "Video recording will not be built")
 
 #physfs helper library
 add_subdirectory(misc/libphyslayer)
--- a/QTfrontend/CMakeLists.txt	Wed Jan 08 18:57:23 2014 +0100
+++ b/QTfrontend/CMakeLists.txt	Wed Jan 08 19:19:09 2014 +0100
@@ -22,10 +22,10 @@
 find_package(SDL1or2)            #video in SDLInteraction
 find_package(SDL_mixer REQUIRED) #audio in SDLInteraction
 
-if(${FFMPEG_FOUND})
+if(LIBAV_FOUND)
     add_definitions(-DVIDEOREC -D__STDC_CONSTANT_MACROS)
-    include_directories(${FFMPEG_INCLUDE_DIR})
-    list(APPEND HW_LINK_LIBS ${FFMPEG_LIBRARIES})
+    include_directories(${LIBAV_INCLUDE_DIR})
+    list(APPEND HW_LINK_LIBS ${LIBAV_LIBRARIES})
 endif()
 
 # server messages localization
--- a/cmake_modules/FindFFMPEG.cmake	Wed Jan 08 18:57:23 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-# Find ffmpeg/libav libraries (libavcodec, libavformat and libavutil)
-# Once done this will define
-#
-#  FFMPEG_FOUND             - system has libavcodec, libavformat, libavutil
-#  FFMPEG_INCLUDE_DIR       - the libav include directories
-#  FFMPEG_LIBRARIES         - the libav libraries
-#
-#  LIBAVCODEC_LIBRARY      - the libavcodec library
-#  LIBAVCODEC_INCLUDE_DIR  - the libavcodec include directory
-#  LIBAVFORMAT_LIBRARY     - the libavformat library
-#  LIBAVUTIL_LIBRARY       - the libavutil library
-#
-#  Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
-#  Modified for other libraries by Lasse Kärkkäinen <tronic>
-#  Modified for Hedgewars by Stepik777
-#  Copyright (c) 2013 Vittorio Giovara <vittorio.giovara@gmail.com>
-#
-#  Redistribution and use is allowed according to the terms of the New
-#  BSD license.
-#
-
-include(FindPackageHandleStandardArgs)
-
-
-# use pkg-config to get the directories and then use these values
-# in the FIND_PATH() and FIND_LIBRARY() calls
-find_package(PkgConfig)
-if(PKG_CONFIG_FOUND)
-    if(NOT LIBAVCODEC_INCLUDE_DIR OR NOT LIBAVCODEC_LIBRARY)
-        pkg_check_modules(_FFMPEG_AVCODEC libavcodec)
-    endif()
-    if(NOT LIBAVFORMAT_LIBRARY)
-        pkg_check_modules(_FFMPEG_AVFORMAT libavformat)
-    endif()
-    if(NOT LIBAVUTIL_LIBRARY)
-        pkg_check_modules(_FFMPEG_AVUTIL libavutil)
-    endif()
-endif(PKG_CONFIG_FOUND)
-
-find_path(LIBAVCODEC_INCLUDE_DIR
-    NAMES libavcodec/avcodec.h
-    PATHS ${_FFMPEG_AVCODEC_INCLUDE_DIRS}    #pkg-config
-          /usr/include /usr/local/include    #system level
-          /opt/local/include /sw/include     #macports & fink
-    PATH_SUFFIXES libav ffmpeg
-)
-
-#TODO: add other include paths
-
-find_library(LIBAVCODEC_LIBRARY
-    NAMES avcodec
-    PATHS ${_FFMPEG_AVCODEC_LIBRARY_DIRS}   #pkg-config
-          /usr/lib /usr/local/lib           #system level
-          /opt/local/lib /sw/lib            #macports & fink
-)
-
-find_library(LIBAVFORMAT_LIBRARY
-    NAMES avformat
-    PATHS ${_FFMPEG_AVFORMAT_LIBRARY_DIRS}  #pkg-config
-          /usr/lib /usr/local/lib           #system level
-          /opt/local/lib /sw/lib            #macports & fink
-)
-
-find_library(LIBAVUTIL_LIBRARY
-    NAMES avutil
-    PATHS ${_FFMPEG_AVUTIL_LIBRARY_DIRS}    #pkg-config
-          /usr/lib /usr/local/lib           #system level
-          /opt/local/lib /sw/lib            #macports & fink
-)
-
-find_package_handle_standard_args(FFMPEG DEFAULT_MSG LIBAVCODEC_LIBRARY LIBAVCODEC_INCLUDE_DIR
-                                                     LIBAVFORMAT_LIBRARY
-                                                     LIBAVUTIL_LIBRARY
-                                                     )
-set(FFMPEG_INCLUDE_DIR ${LIBAVCODEC_INCLUDE_DIR}
-                       #TODO: add other include paths
-                       )
-set(FFMPEG_LIBRARIES ${LIBAVCODEC_LIBRARY}
-                     ${LIBAVFORMAT_LIBRARY}
-                     ${LIBAVUTIL_LIBRARY}
-                     )
-
-mark_as_advanced(FFMPEG_INCLUDE_DIR FFMPEG_LIBRARIES LIBAVCODEC_LIBRARY LIBAVCODEC_INCLUDE_DIR LIBAVFORMAT_LIBRARY LIBAVUTIL_LIBRARY)
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmake_modules/FindLIBAV.cmake	Wed Jan 08 19:19:09 2014 +0100
@@ -0,0 +1,90 @@
+# Find ffmpeg/libav libraries (libavcodec, libavformat and libavutil)
+# Once done this will define
+#
+#  LIBAV_FOUND             - system has libavcodec, libavformat, libavutil
+#  LIBAV_INCLUDE_DIR       - libav include directories
+#  LIBAV_LIBRARIES         - libav libraries (libavcodec, libavformat, libavutil)
+#
+#  LIBAVCODEC_LIBRARY      - libavcodec library
+#  LIBAVCODEC_INCLUDE_DIR  - libavcodec include directory
+#  LIBAVFORMAT_LIBRARY     - libavformat library
+#  LIBAVUTIL_LIBRARY       - libavutil library
+#
+#  Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
+#  Modified for other libraries by Lasse Kärkkäinen <tronic>
+#  Modified for Hedgewars by Stepik777
+#  Copyright (c) 2013 Vittorio Giovara <vittorio.giovara@gmail.com>
+#
+#  Redistribution and use is allowed according to the terms of the New
+#  BSD license.
+#
+
+include(FindPackageHandleStandardArgs)
+
+
+# use pkg-config to get the directories and then use these values
+# in the FIND_PATH() and FIND_LIBRARY() calls
+find_package(PkgConfig)
+if(PKG_CONFIG_FOUND)
+    if(NOT LIBAVCODEC_INCLUDE_DIR OR NOT LIBAVCODEC_LIBRARY)
+        pkg_check_modules(_LIBAV_AVCODEC libavcodec)
+    endif()
+    if(NOT LIBAVFORMAT_LIBRARY)
+        pkg_check_modules(_LIBAV_AVFORMAT libavformat)
+    endif()
+    if(NOT LIBAVUTIL_LIBRARY)
+        pkg_check_modules(_LIBAV_AVUTIL libavutil)
+    endif()
+endif(PKG_CONFIG_FOUND)
+
+find_path(LIBAVCODEC_INCLUDE_DIR
+    NAMES libavcodec/avcodec.h
+    PATHS ${_LIBAV_AVCODEC_INCLUDE_DIRS}     #pkg-config
+          /usr/include /usr/local/include    #system level
+          /opt/local/include /sw/include     #macports & fink
+    PATH_SUFFIXES libav ffmpeg
+)
+
+#TODO: add other include paths
+
+find_library(LIBAVCODEC_LIBRARY
+    NAMES avcodec
+    PATHS ${_LIBAV_AVCODEC_LIBRARY_DIRS}    #pkg-config
+          /usr/lib /usr/local/lib           #system level
+          /opt/local/lib /sw/lib            #macports & fink
+)
+
+find_library(LIBAVFORMAT_LIBRARY
+    NAMES avformat
+    PATHS ${_LIBAV_AVFORMAT_LIBRARY_DIRS}   #pkg-config
+          /usr/lib /usr/local/lib           #system level
+          /opt/local/lib /sw/lib            #macports & fink
+)
+
+find_library(LIBAVUTIL_LIBRARY
+    NAMES avutil
+    PATHS ${_LIBAV_AVUTIL_LIBRARY_DIRS}     #pkg-config
+          /usr/lib /usr/local/lib           #system level
+          /opt/local/lib /sw/lib            #macports & fink
+)
+
+find_package_handle_standard_args(LIBAV DEFAULT_MSG LIBAVCODEC_LIBRARY
+                                                    LIBAVCODEC_INCLUDE_DIR
+                                                    LIBAVFORMAT_LIBRARY
+                                                    LIBAVUTIL_LIBRARY
+                                                    )
+set(LIBAV_INCLUDE_DIR ${LIBAVCODEC_INCLUDE_DIR}
+                      #TODO: add other include paths
+                      )
+set(LIBAV_LIBRARIES ${LIBAVCODEC_LIBRARY}
+                    ${LIBAVFORMAT_LIBRARY}
+                    ${LIBAVUTIL_LIBRARY}
+                    )
+
+mark_as_advanced(LIBAV_INCLUDE_DIR
+                 LIBAV_LIBRARIES
+                 LIBAVCODEC_LIBRARY
+                 LIBAVCODEC_INCLUDE_DIR
+                 LIBAVFORMAT_LIBRARY
+                 LIBAVUTIL_LIBRARY)
+
--- a/hedgewars/CMakeLists.txt	Wed Jan 08 18:57:23 2014 +0100
+++ b/hedgewars/CMakeLists.txt	Wed Jan 08 19:19:09 2014 +0100
@@ -112,7 +112,7 @@
     list(APPEND HW_LINK_LIBS SDLmain)
 endif()
 
-if(FFMPEG_FOUND)
+if(LIBAV_FOUND)
     add_subdirectory(avwrapper)
     list(APPEND HW_LINK_LIBS avwrapper)
     add_definitions(-dUSE_VIDEO_RECORDING)
--- a/hedgewars/avwrapper/CMakeLists.txt	Wed Jan 08 18:57:23 2014 +0100
+++ b/hedgewars/avwrapper/CMakeLists.txt	Wed Jan 08 19:19:09 2014 +0100
@@ -1,14 +1,14 @@
-#FFMPEG/Libav libraries have been searched already in main CMakeLists.txt
+#libraries have already been searched in main CMakeLists.txt
 
 # TODO: this check is only for SDL < 2
 # fpc will take care of linking but we need to have this library installed
 find_package(GLUT REQUIRED)
 
-include_directories(${FFMPEG_INCLUDE_DIR})
+include_directories(${LIBAV_INCLUDE_DIR})
 
 add_library(avwrapper avwrapper.c)
 #TODO: find good VERSION and SOVERSION values
-target_link_libraries(avwrapper ${FFMPEG_LIBRARIES})
+target_link_libraries(avwrapper ${LIBAV_LIBRARIES})
 install(TARGETS avwrapper RUNTIME DESTINATION ${target_binary_install_dir}
                           LIBRARY DESTINATION ${target_library_install_dir}
                           ARCHIVE DESTINATION ${target_library_install_dir})
--- a/share/CMakeLists.txt	Wed Jan 08 18:57:23 2014 +0100
+++ b/share/CMakeLists.txt	Wed Jan 08 19:19:09 2014 +0100
@@ -8,7 +8,7 @@
     #CFBundleShortVersionString is HEDGEWARS_VERSION
 
     #libav/ffmpeg always brings in VideoDecoderAcceleration, avaible only from 10.6.3
-    if(${FFMPEG_FOUND} AND ${minimum_macosx_version} VERSION_EQUAL "10.6")
+    if(LIBAV_FOUND AND ${minimum_macosx_version} VERSION_EQUAL "10.6")
         set(minimum_macosx_version "10.6.3")
     endif()