pax_global_header00006660000000000000000000000064126506542010014513gustar00rootroot0000000000000052 comment=9392f54631f2be3fdeb4dc10edc588b03bacee73 performous-1.1/000077500000000000000000000000001265065420100135555ustar00rootroot00000000000000performous-1.1/.gitignore000066400000000000000000000002021265065420100155370ustar00rootroot00000000000000build build32 build64 CMakeLists.txt.user* *~ *.mo dylibbundler.log performous-app-build.sh osx-utils/out osx-utils/Performous.dmgperformous-1.1/CMakeLists.txt000066400000000000000000000076461265065420100163320ustar00rootroot00000000000000cmake_minimum_required(VERSION 2.8) project(Performous CXX C) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") include(GetGitRevisionDescription) git_describe(PROJECT_VERSION --tags) if(NOT PROJECT_VERSION) set(PROJECT_VERSION "1.1+") endif() message("Building ${PROJECT_NAME} ${PROJECT_VERSION}") # Avoid source tree pollution if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) message(FATAL_ERROR "In-source builds are not permitted. Make a separate folder for building:\nmkdir build; cd build; cmake ..\nBefore that, remove the files already created:\nrm -rf CMakeCache.txt CMakeFiles") endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) # Add a sensible build type default and warning because empty means no optimization and no debug info. if(NOT CMAKE_BUILD_TYPE) message("WARNING: CMAKE_BUILD_TYPE is not defined!\n Defaulting to CMAKE_BUILD_TYPE=RelWithDebInfo. Use ccmake to set a proper value.") SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE) endif(NOT CMAKE_BUILD_TYPE) if(CMAKE_BUILD_TYPE STREQUAL "Release") add_definitions("-DNDEBUG") endif() # Enable C++11 support and other compiler flags... if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) message("Detected GCC version ${GCC_VERSION}") if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7) set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -fcx-limited-range ${CMAKE_CXX_FLAGS}") elseif (GCC_VERSION VERSION_GREATER 4.6 OR GCC_VERSION VERSION_EQUAL 4.6) set(CMAKE_CXX_FLAGS "-std=c++0x -Wall -Wextra -fcx-limited-range ${CMAKE_CXX_FLAGS}") add_definitions("-Doverride=") # Hack: GCC 4.6 doesn't understand C++11 "override" keyword else() message(FATAL_ERROR "Your GCC compiler does not support c++11, please install at least gcc 4.6") endif() endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra ${CMAKE_CXX_FLAGS}") endif() if(WIN32) set(CMAKE_CXX_FLAGS "-DWIN32_LEAN_AND_MEAN ${CMAKE_CXX_FLAGS}") set(SHARE_INSTALL_DEFAULT ".") SET(LOCALE_DIR_DEFAULT "locale") else() set(SHARE_INSTALL_DEFAULT "share/games/performous") SET(LOCALE_DIR_DEFAULT "share/locale") endif() set(SHARE_INSTALL "${SHARE_INSTALL_DEFAULT}" CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.") mark_as_advanced(SHARE_INSTALL) set(LOCALE_DIR "${LOCALE_DIR_DEFAULT}" CACHE STRING "Locale file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.") mark_as_advanced(LOCALE_DIR) find_package(Gettext) find_package(Msgfmt) if(Gettext_FOUND AND Msgfmt_FOUND) message(STATUS "Localization enabled: Building and installing .mo files") add_subdirectory(lang) else() message(STATUS "Localization disabled: Gettext or Msgfmt missing") endif() add_subdirectory(data) add_subdirectory(game) option(ENABLE_TOOLS "Enable building of song extraction utilities for SingStar and Guitar Hero." ON) if(ENABLE_TOOLS) add_subdirectory(tools) endif() add_subdirectory(docs) if(WIN32) install(FILES win32/ConfigureSongDirectory.bat DESTINATION .) endif() #CPACK variables include(CPack) SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Niek Nooijens") SET(CPACK_PACKAGE_CONTACT "nieknooijens@gmail.com") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libavcodec54, libavformat54, libavresample1, libsdl2-2.0-0, libportaudiocpp0, libboost-all-dev, libswscale2, libxml++2.6-2, libopencv-dev, librsvg2-2, libpango-1.0-0, libcairo2, libjpeg8, libpng12-0, libportmidi0 ") SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION_SUMMARY "A free music rhythm game similar to SingStar, Guitar Hero and DDR") SET(CPACK_DEBIAN_PACKAGE_VERSION ${PROJECT_VERSION}) SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") SET(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${CMAKE_BINARY_DIR};${PROJECT_NAME};ALL;/") performous-1.1/README.txt000066400000000000000000000010561265065420100152550ustar00rootroot00000000000000Performous ========== An open-source karaoke, band and dancing game where one or more players perform a song and the game scores their performances. Supports songs in UltraStar, Frets on Fire and StepMania formats. Microphones and instruments from SingStar, Guitar Hero and Rock Band as well as some dance pads are autodetected. Website at http://performous.org/ Wiki at http://wiki.performous.org/ For compiling instructions, see docs/Compiling.txt or visit the wiki page: https://github.com/performous/performous/wiki/Building-and-installing-from-source performous-1.1/cmake/000077500000000000000000000000001265065420100146355ustar00rootroot00000000000000performous-1.1/cmake/Modules/000077500000000000000000000000001265065420100162455ustar00rootroot00000000000000performous-1.1/cmake/Modules/FindALSA.cmake000066400000000000000000000010121265065420100205620ustar00rootroot00000000000000# - Try to find ALSA # Once done, this will define # # ALSA_FOUND - system has ALSA # ALSA_INCLUDE_DIRS - the ALSA include directories # ALSA_LIBRARIES - link these to use ALSA # ALSA_VERSION - the library version string # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_detect(ALSA alsa FIND_PATH alsa/version.h FIND_LIBRARY asound) libfind_version_header(ALSA alsa/version.h SND_LIB_VERSION_STR) libfind_process(ALSA) performous-1.1/cmake/Modules/FindAVCodec.cmake000066400000000000000000000025361265065420100213220ustar00rootroot00000000000000# - Try to find FFMPEG libavcodec # Once done, this will define # # AVCodec_FOUND - the library is available # AVCodec_INCLUDE_DIRS - the include directories # AVCodec_LIBRARIES - the libraries # AVCodec_INCLUDE - the file to #include (may be used in config.h) # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_package(AVCodec AVUtil) # TODO: pkg-config extra deps: libraw1394 theora vorbisenc libfind_pkg_check_modules(AVCodec_PKGCONF libavcodec) find_path(AVCodec_INCLUDE_DIR NAMES libavcodec/avcodec.h ffmpeg/avcodec.h avcodec.h HINTS ${AVCodec_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES ffmpeg ) if(AVCodec_INCLUDE_DIR) foreach(suffix libavcodec/ ffmpeg/ "") if(NOT AVCodec_INCLUDE) if(EXISTS "${AVCodec_INCLUDE_DIR}/${suffix}avcodec.h") set(AVCodec_INCLUDE "${suffix}avcodec.h" CACHE INTERNAL "") endif(EXISTS "${AVCodec_INCLUDE_DIR}/${suffix}avcodec.h") endif(NOT AVCodec_INCLUDE) endforeach(suffix) if(NOT AVCodec_INCLUDE) message(FATAL_ERROR "Found avcodec.h include dir, but not the header file. Perhaps you need to clear CMake cache?") endif(NOT AVCodec_INCLUDE) endif(AVCodec_INCLUDE_DIR) find_library(AVCodec_LIBRARY NAMES libavcodec.dll.a avcodec HINTS ${AVCodec_PKGCONF_LIBRARY_DIRS} ) libfind_process(AVCodec) performous-1.1/cmake/Modules/FindAVFormat.cmake000066400000000000000000000024611265065420100215320ustar00rootroot00000000000000# - Try to find FFMPEG libavformat # Once done, this will define # # AVFormat_FOUND - the library is available # AVFormat_INCLUDE_DIRS - the include directories # AVFormat_LIBRARIES - the libraries # AVFormat_INCLUDE - the file to include (may be used in config.h) # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_package(AVFormat AVCodec) libfind_pkg_check_modules(AVFormat_PKGCONF libavformat) find_path(AVFormat_INCLUDE_DIR NAMES libavformat/avformat.h ffmpeg/avformat.h avformat.h HINTS ${AVFormat_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES ffmpeg ) if(AVFormat_INCLUDE_DIR) foreach(suffix libavformat/ ffmpeg/ "") if(NOT AVFormat_INCLUDE) if(EXISTS "${AVFormat_INCLUDE_DIR}/${suffix}avformat.h") set(AVFormat_INCLUDE "${suffix}avformat.h") endif(EXISTS "${AVFormat_INCLUDE_DIR}/${suffix}avformat.h") endif(NOT AVFormat_INCLUDE) endforeach(suffix) if(NOT AVFormat_INCLUDE) message(FATAL_ERROR "Found avformat.h include dir, but not the header file. Perhaps you need to clear CMake cache?") endif(NOT AVFormat_INCLUDE) endif(AVFormat_INCLUDE_DIR) find_library(AVFormat_LIBRARY NAMES libavformat.dll.a avformat HINTS ${AVFormat_PKGCONF_LIBRARY_DIRS} ) libfind_process(AVFormat) performous-1.1/cmake/Modules/FindAVResample.cmake000066400000000000000000000025641265065420100220560ustar00rootroot00000000000000# - Try to find libav libavresample # Once done, this will define # # AVResample_FOUND - the library is available # AVResample_INCLUDE_DIRS - the include directories # AVResample_LIBRARIES - the libraries # AVResample_INCLUDE - the file to #include (may be used in config.h) # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_package(AVResample AVUtil) libfind_pkg_check_modules(AVResample_PKGCONF libavresample) find_path(AVResample_INCLUDE_DIR NAMES libavresample/avresample.h ffmpeg/avresample.h avresample.h HINTS ${AVResample_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES ffmpeg ) if(AVResample_INCLUDE_DIR) foreach(suffix libavresample/ ffmpeg/ "") if(NOT AVResample_INCLUDE) if(EXISTS "${AVResample_INCLUDE_DIR}/${suffix}avresample.h") set(AVResample_INCLUDE "${suffix}avresample.h") endif(EXISTS "${AVResample_INCLUDE_DIR}/${suffix}avresample.h") endif(NOT AVResample_INCLUDE) endforeach(suffix) if(NOT AVResample_INCLUDE) message(FATAL_ERROR "Found avresample.h include dir, but not the header file. Perhaps you need to clear CMake cache?") endif(NOT AVResample_INCLUDE) endif(AVResample_INCLUDE_DIR) find_library(AVResample_LIBRARY NAMES libavresample.dll.a avresample HINTS ${AVResample_PKGCONF_LIBRARY_DIRS} ) libfind_process(AVResample) performous-1.1/cmake/Modules/FindAVUtil.cmake000066400000000000000000000023171265065420100212170ustar00rootroot00000000000000# - Try to find FFMPEG libavutil # Once done, this will define # # AVUtil_FOUND - the library is available # AVUtil_INCLUDE_DIRS - the include directories # AVUtil_LIBRARIES - the libraries # AVUtil_INCLUDE - the file to #include (may be used in config.h) # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(AVUtil_PKGCONF libavutil) find_path(AVUtil_INCLUDE_DIR NAMES libavutil/avutil.h ffmpeg/avutil.h avutil.h HINTS ${AVUtil_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES ffmpeg ) if(AVUtil_INCLUDE_DIR) foreach(suffix libavutil/ ffmpeg/ "") if(NOT AVUtil_INCLUDE) if(EXISTS "${AVUtil_INCLUDE_DIR}/${suffix}avutil.h") set(AVUtil_INCLUDE "${suffix}avutil.h") endif(EXISTS "${AVUtil_INCLUDE_DIR}/${suffix}avutil.h") endif(NOT AVUtil_INCLUDE) endforeach(suffix) if(NOT AVUtil_INCLUDE) message(FATAL_ERROR "Found avutil.h include dir, but not the header file. Perhaps you need to clear CMake cache?") endif(NOT AVUtil_INCLUDE) endif(AVUtil_INCLUDE_DIR) find_library(AVUtil_LIBRARY NAMES libavutil.dll.a avutil HINTS ${AVUtil_PKGCONF_LIBRARY_DIRS} ) libfind_process(AVUtil) performous-1.1/cmake/Modules/FindAtk.cmake000066400000000000000000000015251265065420100205720ustar00rootroot00000000000000# - Try to find Atk 1.0 # Once done, this will define # # Atk_FOUND - system has Atk # Atk_INCLUDE_DIRS - the Atk include directories # Atk_LIBRARIES - link these to use Atk include(LibFindMacros) # Dependencies libfind_package(Atk GObject) # Use pkg-config to get hints about paths libfind_pkg_check_modules(Atk_PKGCONF atk) # Main include dir find_path(Atk_INCLUDE_DIR NAMES atk/atk.h HINTS ${Atk_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES atk-1.0 ) # Find the library find_library(Atk_LIBRARY NAMES atk-1.0 HINTS ${Atk_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(Atk_PROCESS_INCLUDES Atk_INCLUDE_DIR) set(Atk_PROCESS_LIBS Atk_LIBRARY GObject_LIBRARIES) libfind_process(Atk) performous-1.1/cmake/Modules/FindAtkmm.cmake000066400000000000000000000017271265065420100211300ustar00rootroot00000000000000# - Try to find Atkmm 1.6 # Once done, this will define # # Atkmm_FOUND - system has Atkmm # Atkmm_INCLUDE_DIRS - the Atkmm include directories # Atkmm_LIBRARIES - link these to use Atkmm include(LibFindMacros) # Dependencies libfind_package(Atkmm Atk) libfind_package(Atkmm Glibmm) # Use pkg-config to get hints about paths libfind_pkg_check_modules(Atkmm_PKGCONF atkmm-1.6) # Main include dir find_path(Atkmm_INCLUDE_DIR NAMES atkmm.h HINTS ${Atkmm_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES atkmm-1.6 ) # Finally the library itself find_library(Atkmm_LIBRARY NAMES atkmm-1.6 HINTS ${Atkmm_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(Atkmm_PROCESS_INCLUDES Atkmm_INCLUDE_DIR Atk_INCLUDE_DIRS Glibmm_INCLUDE_DIRS) set(Atkmm_PROCESS_LIBS Atkmm_LIBRARY Atk_LIBRARIES Glibmm_LIBRARIES) libfind_process(Atkmm) performous-1.1/cmake/Modules/FindCairo.cmake000066400000000000000000000006031265065420100211040ustar00rootroot00000000000000# - Try to find Cairo # Once done, this will define # # Cairo_FOUND - system has Cairo # Cairo_INCLUDE_DIRS - the Cairo include directories # Cairo_LIBRARIES - link these to use Cairo include(LibFindMacros) libfind_package(Cairo Freetype) # Cairo depends on Freetype libfind_pkg_detect(Cairo cairo FIND_PATH cairo.h PATH_SUFFIXES cairo FIND_LIBRARY cairo) libfind_process(Cairo) performous-1.1/cmake/Modules/FindCairomm.cmake000066400000000000000000000017161265065420100214440ustar00rootroot00000000000000# - Try to find Cairomm 1.0 # Once done, this will define # # Cairomm_FOUND - system has Cairomm # Cairomm_INCLUDE_DIRS - the Cairomm include directories # Cairomm_LIBRARIES - link these to use Cairomm include(LibFindMacros) # Dependencies libfind_package(Cairomm Cairo) # Use pkg-config to get hints about paths libfind_pkg_check_modules(Cairomm_PKGCONF cairomm-1.0) # Main include dir find_path(Cairomm_INCLUDE_DIR NAMES cairomm/cairomm.h HINTS ${Cairomm_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES cairomm-1.0 ) # Finally the library itself find_library(Cairomm_LIBRARY NAMES cairomm-1.0 HINTS ${Cairomm_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(Cairomm_PROCESS_INCLUDES Cairomm_INCLUDE_DIR Cairo_INCLUDE_DIRS) set(Cairomm_PROCESS_LIBS Cairomm_LIBRARY Cairo_LIBRARIES) libfind_process(Cairomm) performous-1.1/cmake/Modules/FindClanLib.cmake000066400000000000000000000034341265065420100213600ustar00rootroot00000000000000# - Try to find ClanLib # Example usage: find_package(ClanLib 0.8 REQUIRED COMPONENTS Core App Display GL Sound) # # Once done, this will define # # ClanLib_FOUND - system has ClanLib (all the components requested) # ClanLib_INCLUDE_DIRS - the ClanLib include directories # ClanLib_LIBRARIES - link these to use ClanLib # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) if (ClanLib_FIND_VERSION_MAJOR AND ClanLib_FIND_VERSION_MINOR) set(ClanLib_VERSION "${ClanLib_FIND_VERSION_MAJOR}.${ClanLib_FIND_VERSION_MINOR}") else (ClanLib_FIND_VERSION_MAJOR AND ClanLib_FIND_VERSION_MINOR) set(ClanLib_VERSION "0.8") endif (ClanLib_FIND_VERSION_MAJOR AND ClanLib_FIND_VERSION_MINOR) libfind_pkg_check_modules(ClanLib_PKGCONF clanCore-${ClanLib_VERSION}) find_path(ClanLib_INCLUDE_DIR NAMES ClanLib/core.h HINTS ${ClanLib_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES ClanLib-${ClanLib_VERSION} ) # Extract the actual version number if (ClanLib_INCLUDE_DIR) file(READ "${ClanLib_INCLUDE_DIR}/ClanLib/core.h" _ClanLib_CORE_H_CONTENTS) set(_ClanLib_VERSION_REGEX ".*#define CL_VERSION_STRING \"([^\n]*)\".*") if ("${_ClanLib_CORE_H_CONTENTS}" MATCHES "${_ClanLib_VERSION_REGEX}") string(REGEX REPLACE "${_ClanLib_VERSION_REGEX}" "\\1" ClanLib_VERSION "${_ClanLib_CORE_H_CONTENTS}") endif ("${_ClanLib_CORE_H_CONTENTS}" MATCHES "${_ClanLib_VERSION_REGEX}") endif (ClanLib_INCLUDE_DIR) foreach(COMPONENT ${ClanLib_FIND_COMPONENTS}) find_library(ClanLib_${COMPONENT}_LIBRARY NAMES clan${COMPONENT} HINTS ${ClanLib_PKGCONF_LIBRARY_DIRS} ) set(ClanLib_PROCESS_LIBS ${ClanLib_PROCESS_LIBS} ClanLib_${COMPONENT}_LIBRARY) endforeach(COMPONENT) set(ClanLib_PROCESS_INCLUDES ClanLib_INCLUDE_DIR) libfind_process(ClanLib) performous-1.1/cmake/Modules/FindDL.cmake000066400000000000000000000011071265065420100203460ustar00rootroot00000000000000# - Try to find dynamic linker library. Does nothing on Windows # Once done, this will define # # DL_FOUND - system has dl (always set on Windows) # DL_INCLUDE_DIRS - dlfcn.h include dir # DL_LIBRARIES - link these to use dl # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries if(WIN32) set(DL_FOUND TRUE) else() include(LibFindMacros) find_path(DL_INCLUDE_DIR NAMES dlfcn.h) find_library(DL_LIBRARY NAMES dl) set(DL_PROCESS_INCLUDES DL_INCLUDE_DIR) set(DL_PROCESS_LIBS DL_LIBRARY) libfind_process(DL) endif() performous-1.1/cmake/Modules/FindFAAC.cmake000066400000000000000000000007721265065420100205500ustar00rootroot00000000000000# - Try to find FAAC # Once done, this will define # # FAAC_FOUND - system has FAAC # FAAC_INCLUDE_DIRS - the FAAC include directories # FAAC_LIBRARIES - link these to use FAAC # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) find_path(FAAC_INCLUDE_DIR NAMES faac.h ) find_library(FAAC_LIBRARY NAMES faac ) set(FAAC_PROCESS_INCLUDES FAAC_INCLUDE_DIR) set(FAAC_PROCESS_LIBS FAAC_LIBRARY) libfind_process(FAAC) performous-1.1/cmake/Modules/FindFontconfig.cmake000066400000000000000000000013651265065420100221510ustar00rootroot00000000000000# - Try to find Fontconfig # Once done, this will define # # Fontconfig_FOUND - system has Fontconfig # Fontconfig_INCLUDE_DIRS - the Fontconfig include directories # Fontconfig_LIBRARIES - link these to use Fontconfig # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(Fontconfig_PKGCONF Fontconfig) find_path(Fontconfig_INCLUDE_DIR NAMES fontconfig/fontconfig.h HINTS ${Fontconfig_PKGCONF_INCLUDE_DIRS} ) find_library(Fontconfig_LIBRARY NAMES fontconfig HINTS ${Fontconfig_PKGCONF_LIBRARY_DIRS} ) set(Fontconfig_PROCESS_INCLUDES Fontconfig_INCLUDE_DIR) set(Fontconfig_PROCESS_LIBS Fontconfig_LIBRARY) libfind_process(Fontconfig) performous-1.1/cmake/Modules/FindFreetype.cmake000066400000000000000000000016251265065420100216370ustar00rootroot00000000000000# - Try to find Freetype2 # Once done, this will define # # Freetype_FOUND - system has Freetype # Freetype_INCLUDE_DIRS - the Freetype include directories # Freetype_LIBRARIES - link these to use Freetype include(LibFindMacros) # Use pkg-config to get hints about paths libfind_pkg_check_modules(Freetype_PKGCONF freetype2) # Include dir find_path(Freetype_INCLUDE_DIR NAMES freetype/freetype.h freetype2/freetype.h HINTS ${Freetype_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES freetype2 ) # Finally the library itself find_library(Freetype_LIBRARY NAMES freetype HINTS ${Freetype_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(Freetype_PROCESS_INCLUDES Freetype_INCLUDE_DIR) set(Freetype_PROCESS_LIBS Freetype_LIBRARY) libfind_process(Freetype) performous-1.1/cmake/Modules/FindGDK-PixBuf.cmake000066400000000000000000000017071265065420100216550ustar00rootroot00000000000000# - Try to find gdk-pixbuf 2.0 # Once done, this will define # # GDK-PixBuf_FOUND - system has GDK-PixBuf # GDK-PixBuf_INCLUDE_DIRS - the GDK-PixBuf include directories # GDK-PixBuf_LIBRARIES - link these to use GDK-PixBuf include(LibFindMacros) # Use pkg-config to get hints about paths libfind_pkg_check_modules(GDK-PixBuf_PKGCONF gdk-pixbuf-2.0) # Main include dir find_path(GDK-PixBuf_INCLUDE_DIR NAMES gdk-pixbuf/gdk-pixbuf.h HINTS ${GDK-PixBuf_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES gtk-2.0 gdk-pixbuf-2.0 ) # Finally the library itself find_library(GDK-PixBuf_LIBRARY NAMES gdk_pixbuf-2.0 HINTS ${GDK-PixBuf_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(GDK-PixBuf_PROCESS_INCLUDES GDK-PixBuf_INCLUDE_DIR) set(GDK-PixBuf_PROCESS_LIBS GDK-PixBuf_LIBRARY) libfind_process(GDK-PixBuf) performous-1.1/cmake/Modules/FindGDK.cmake000066400000000000000000000023451265065420100204610ustar00rootroot00000000000000# - Try to find GDK 2.0 # Once done, this will define # # GDK_FOUND - system has GDK # GDK_INCLUDE_DIRS - the GDK include directories # GDK_LIBRARIES - link these to use GDK include(LibFindMacros) # Dependencies libfind_package(GDK GDK-PixBuf) libfind_package(GDK Pango) libfind_package(GDK GIO) # Use pkg-config to get hints about paths libfind_pkg_check_modules(GDK_PKGCONF gdk-2.0) # Main include dir find_path(GDK_INCLUDE_DIR NAMES gdk/gdk.h HINTS ${GDK_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES gtk-2.0 ) # Glib-related libraries also use a separate config header, which is in lib dir find_path(GDKConfig_INCLUDE_DIR NAMES gdkconfig.h HINTS ${GDK_PKGCONF_INCLUDE_DIRS} /usr PATH_SUFFIXES lib/gtk-2.0/include ) # Finally the library itself find_library(GDK_LIBRARY NAMES gdk-x11-2.0 HINTS ${GDK_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(GDK_PROCESS_INCLUDES GDK_INCLUDE_DIR GDKConfig_INCLUDE_DIR GDK-PixBuf_INCLUDE_DIRS Pango_INCLUDE_DIRS GIO_INCLUDE_DIRS) set(GDK_PROCESS_LIBS GDK_LIBRARY GDK-PixBuf_LIBRARIES Pango_LIBRARIES GIO_LIBRARIES) libfind_process(GDK) performous-1.1/cmake/Modules/FindGDKmm.cmake000066400000000000000000000025271265065420100210150ustar00rootroot00000000000000# - Try to find GDKmm 2.4 # Once done, this will define # # GDKmm_FOUND - system has GDKmm # GDKmm_INCLUDE_DIRS - the GDKmm include directories # GDKmm_LIBRARIES - link these to use GDKmm include(LibFindMacros) # Dependencies libfind_package(GDKmm GDK) libfind_package(GDKmm Glibmm) libfind_package(GDKmm Pangomm) libfind_package(GDKmm Cairomm) # Use pkg-config to get hints about paths libfind_pkg_check_modules(GDKmm_PKGCONF gdkmm-2.4) # Main include dir find_path(GDKmm_INCLUDE_DIR NAMES gdkmm.h HINTS ${GDKmm_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES gdkmm-2.4 ) # Glib-related libraries also use a separate config header, which is in lib dir find_path(GDKmmConfig_INCLUDE_DIR NAMES gdkmmconfig.h HINTS ${GDKmm_PKGCONF_INCLUDE_DIRS} /usr PATH_SUFFIXES lib/gdkmm-2.4/include ) # Finally the library itself find_library(GDKmm_LIBRARY NAMES gdkmm-2.4 HINTS ${GDKmm_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(GDKmm_PROCESS_INCLUDES GDKmm_INCLUDE_DIR GDKmmConfig_INCLUDE_DIR GDK_INCLUDE_DIRS Glibmm_INCLUDE_DIRS Pangomm_INCLUDE_DIRS Cairomm_INCLUDE_DIRS) set(GDKmm_PROCESS_LIBS GDKmm_LIBRARY GDK_LIBRARIES Glibmm_LIBRARIES Pangomm_LIBRARIES Cairomm_LIBRARIES) libfind_process(GDKmm) performous-1.1/cmake/Modules/FindGIO.cmake000066400000000000000000000013271265065420100204710ustar00rootroot00000000000000# - Try to find GIO 2.0 # Once done, this will define # # GIO_FOUND - system has GIO # GIO_INCLUDE_DIRS - the GIO include directories # GIO_LIBRARIES - link these to use GIO include(LibFindMacros) # Dependencies libfind_package(GIO Glib) # Use pkg-config to get hints about paths libfind_pkg_check_modules(GIO_PKGCONF gio-2.0) # Find the library find_library(GIO_LIBRARY NAMES gio-2.0 HINTS ${GIO_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(GIO_PROCESS_INCLUDES Glib_INCLUDE_DIRS) set(GIO_PROCESS_LIBS GIO_LIBRARY Glib_LIBRARIES) libfind_process(GIO) performous-1.1/cmake/Modules/FindGIOmm.cmake000066400000000000000000000017271265065420100210270ustar00rootroot00000000000000# - Try to find GIOmm 2.4 # Once done, this will define # # GIOmm_FOUND - system has GIOmm # GIOmm_INCLUDE_DIRS - the GIOmm include directories # GIOmm_LIBRARIES - link these to use GIOmm include(LibFindMacros) # Dependencies libfind_package(GIOmm GIO) libfind_package(GIOmm Glibmm) # Use pkg-config to get hints about paths libfind_pkg_check_modules(GIOmm_PKGCONF giomm-2.4) # Main include dir find_path(GIOmm_INCLUDE_DIR NAMES giomm.h HINTS ${GIOmm_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES giomm-2.4 ) # Finally the library itself find_library(GIOmm_LIBRARY NAMES giomm-2.4 HINTS ${GIOmm_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(GIOmm_PROCESS_INCLUDES GIOmm_INCLUDE_DIR GIO_INCLUDE_DIRS Glibmm_INCLUDE_DIRS) set(GIOmm_PROCESS_LIBS GIOmm_LIBRARY GIO_LIBRARIES Glibmm_LIBRARIES) libfind_process(GIOmm) performous-1.1/cmake/Modules/FindGLEW.cmake000066400000000000000000000013321265065420100206050ustar00rootroot00000000000000# - Try to find GLEW # Once done, this will define # # GLEW_FOUND - system has OpenGL (GL and GLU) # GLEW_INCLUDE_DIRS - the OpenGL include directories # GLEW_LIBRARIES - link these to use OpenGL # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) # GLEW is often installed in the same place as OpenGL libfind_pkg_check_modules(OpenGL_PKGCONF gl) find_path(GLEW_INCLUDE_DIR NAMES glew.h HINTS ${OpenGL_INCLUDE_DIRS} PATH_SUFFIXES GL ) find_library(GLEW_LIBRARY NAMES GLEW GLEW32.a GLEW32 HINTS ${OpenGL_PKGCONF_LIBRARY_DIRS} ) set(GLEW_PROCESS_INCLUDES GLEW_INCLUDE_DIR) set(GLEW_PROCESS_LIBS GLEW_LIBRARY) libfind_process(GLEW) performous-1.1/cmake/Modules/FindGLFW.cmake000066400000000000000000000016161265065420100206130ustar00rootroot00000000000000# - Try to find GLFW # Once done, this will define # # GLFW_FOUND - system has OpenGL (GL and GLU) # GLFW_INCLUDE_DIRS - the OpenGL include directories # GLFW_LIBRARIES - link these to use OpenGL # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) # Dependencies libfind_package(GDK OpenGL) libfind_pkg_check_modules(GLFW_PKGCONF libglfw) find_path(GLFW_INCLUDE_DIR NAMES GL/glfw.h HINTS ${GLFW_PKGCONF_INCLUDE_DIRS} ) find_library(GLFW_LIBRARY NAMES glfw HINTS ${GLFW_PKGCONF_LIBRARY_DIRS} ) set(GLFW_PROCESS_INCLUDES GLFW_INCLUDE_DIR OpenGL_INCLUDE_DIRS) set(GLFW_PROCESS_LIBS GLFW_LIBRARY OpenGL_LIBRARIES) if(UNIX) find_library(X11_LIBRARY NAMES X11) find_library(Xrandr_LIBRARY NAMES Xrandr) set(GLFW_PROCESS_LIBS ${GLFW_PROCESS_LIBS} X11_LIBRARY Xrandr_LIBRARY) endif(UNIX) libfind_process(GLFW) performous-1.1/cmake/Modules/FindGObject.cmake000066400000000000000000000013711265065420100213670ustar00rootroot00000000000000# - Try to find GObject 2.0 # Once done, this will define # # GObject_FOUND - system has GObject # GObject_INCLUDE_DIRS - the GObject include directories # GObject_LIBRARIES - link these to use GObject include(LibFindMacros) # Dependencies libfind_package(GObject Glib) # Use pkg-config to get hints about paths libfind_pkg_check_modules(GObject_PKGCONF gobject-2.0) # Find the library find_library(GObject_LIBRARY NAMES gobject-2.0 HINTS ${GObject_PKGCONF_LIBRARY_DIRS} ) find_path(GObject_INCLUDE_DIR NAMES gobject/gobject.h HINTS ${GObject_PKGCONF_INCLUDE_DIRS} HINTS ${Glib_INCLUDE_DIRS} ) set(GObject_PROCESS_INCLUDES GObject_INCLUDE_DIR Glib_INCLUDE_DIR) set(GObject_PROCESS_LIBS GObject_LIBRARY Glib_LIBRARY) libfind_process(GObject) performous-1.1/cmake/Modules/FindGStreamer.cmake000066400000000000000000000020321265065420100217360ustar00rootroot00000000000000# - Try to find GStreamer # Once done, this will define # # GStreamer_FOUND - system has GStreamer # GStreamer_INCLUDE_DIRS - the GStreamer include directories # GStreamer_LIBRARIES - link these to use GStreamer include(LibFindMacros) # Dependencies libfind_package(GStreamer GObject) libfind_package(GStreamer LibXML2) # Use pkg-config to get hints about paths libfind_pkg_check_modules(GStreamer_PKGCONF gstreamer-0.10) # Include dir find_path(GStreamer_INCLUDE_DIR NAMES gst/gst.h HINTS ${GStreamer_PKGCONF_INCLUDE_DIRS} ) # Finally the library itself find_library(GStreamer_LIBRARY NAMES gstreamer-0.10 HINTS ${GStreamer_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(GStreamer_PROCESS_INCLUDES GStreamer_INCLUDE_DIR GObject_INCLUDE_DIRS LibXML2_INCLUDE_DIRS) set(GStreamer_PROCESS_LIBS GStreamer_LIBRARY GObject_LIBRARIES LibXML2_LIBRARIES) libfind_process(GStreamer) performous-1.1/cmake/Modules/FindGTK.cmake000066400000000000000000000021351265065420100204760ustar00rootroot00000000000000# - Try to find GTK 2.0 # Once done, this will define # # GTK_FOUND - system has GTK # GTK_INCLUDE_DIRS - the GTK include directories # GTK_LIBRARIES - link these to use GTK include(LibFindMacros) # Dependencies libfind_package(GTK GDK) libfind_package(GTK Cairo) libfind_package(GTK Atk) libfind_package(GTK GIO) libfind_package(GTK Pango) # Use pkg-config to get hints about paths libfind_pkg_check_modules(GTK_PKGCONF gtk+-2.0) # Main include dir find_path(GTK_INCLUDE_DIR NAMES gtk/gtk.h HINTS ${GTK_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES gtk-2.0 ) # Finally the library itself find_library(GTK_LIBRARY NAMES gtk-x11-2.0 HINTS ${GTK_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(GTK_PROCESS_INCLUDES GTK_INCLUDE_DIR GDK_INCLUDE_DIRS Cairo_INCLUDE_DIRS Atk_INCLUDE_DIRS GIO_INCLUDE_DIRS Pango_INCLUDE_DIRS) set(GTK_PROCESS_LIBS GTK_LIBRARY GDK_LIBRARIES Cairo_LIBRARIES Atk_LIBRARIES GIO_LIBRARIES Pango_LIBRARIES) libfind_process(GTK) performous-1.1/cmake/Modules/FindGTKmm.cmake000066400000000000000000000027211265065420100210310ustar00rootroot00000000000000# - Try to find GTKmm 2.4 # Once done, this will define # # GTKmm_FOUND - system has GTKmm # GTKmm_INCLUDE_DIRS - the GTKmm include directories # GTKmm_LIBRARIES - link these to use GTKmm include(LibFindMacros) # Dependencies libfind_package(GTKmm GTK) libfind_package(GTKmm Glibmm) libfind_package(GTKmm GIOmm) libfind_package(GTKmm GDKmm) libfind_package(GTKmm Pangomm) libfind_package(GTKmm Atkmm) # Use pkg-config to get hints about paths libfind_pkg_check_modules(GTKmm_PKGCONF gtkmm-2.4) # Main include dir find_path(GTKmm_INCLUDE_DIR NAMES gtkmm.h HINTS ${GTKmm_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES gtkmm-2.4 ) # Glib-related libraries also use a separate config header, which is in lib dir find_path(GTKmmConfig_INCLUDE_DIR NAMES gtkmmconfig.h HINTS ${GTKmm_PKGCONF_INCLUDE_DIRS} /usr PATH_SUFFIXES lib/gtkmm-2.4/include ) # Finally the library itself find_library(GTKmm_LIBRARY NAMES gtkmm-2.4 HINTS ${GTKmm_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(GTKmm_PROCESS_INCLUDES GTKmm_INCLUDE_DIR GTKmmConfig_INCLUDE_DIR GTK_INCLUDE_DIRS Glibmm_INCLUDE_DIRS GIOmm_INCLUDE_DIRS GDKmm_INCLUDE_DIRS Pangomm_INCLUDE_DIRS Atkmm_INCLUDE_DIRS) set(GTKmm_PROCESS_LIBS GTKmm_LIBRARY GTK_LIBRARIES Glibmm_LIBRARIES GIOmm_LIBRARIES GDKmm_LIBRARIES Pangomm_LIBRARIES Atkmm_LIBRARIES) libfind_process(GTKmm) performous-1.1/cmake/Modules/FindGettext.cmake000066400000000000000000000021161265065420100214740ustar00rootroot00000000000000# - Try to find Gettext # Once done, this will define # # Gettext_FOUND - system has Gettext # Gettext_INCLUDE_DIRS - the Gettext include directories # Gettext_LIBRARIES - link these to use Gettext # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(Gettext_PKGCONF Gettext) find_path(Gettext_INCLUDE_DIR NAMES libintl.h HINTS ${Gettext_PKGCONF_INCLUDE_DIRS} ) set(Gettext_PROCESS_INCLUDES Gettext_INCLUDE_DIR) # On "traditional" UNIX systems (Solaris, BSD, Mac OS X, etc.), # libintl is its own library. On GNU/glibc systems (Linux), gettext # functionality is integrated into glibc, so we always have working # internationalization support. Therefore we try to find a libintl # but ignore the fact that it may not exist. find_library(Gettext_LIBRARY NAMES intl HINTS ${Gettext_PKGCONF_LIBRARY_DIRS} PATHS /opt/local/lib /sw/local/lib ) if (Gettext_LIBRARY) set(Gettext_PROCESS_LIBS Gettext_LIBRARY) else() unset(Gettext_LIBRARY CACHE) endif() libfind_process(Gettext) performous-1.1/cmake/Modules/FindGlib.cmake000066400000000000000000000020751265065420100207310ustar00rootroot00000000000000# - Try to find Glib-2.0 # Once done, this will define # # Glib_FOUND - system has Glib # Glib_INCLUDE_DIRS - the Glib include directories # Glib_LIBRARIES - link these to use Glib include(LibFindMacros) # Use pkg-config to get hints about paths libfind_pkg_check_modules(Glib_PKGCONF glib-2.0) # Main include dir find_path(Glib_INCLUDE_DIR NAMES glib.h HINTS ${Glib_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0 ) # Glib-related libraries also use a separate config header, which is in lib dir find_path(GlibConfig_INCLUDE_DIR NAMES glibconfig.h HINTS ${Glib_PKGCONF_INCLUDE_DIRS} /usr PATH_SUFFIXES lib/glib-2.0/include ../lib/glib-2.0/include ) # Finally the library itself find_library(Glib_LIBRARY NAMES glib-2.0 HINTS ${Glib_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(Glib_PROCESS_INCLUDES Glib_INCLUDE_DIR GlibConfig_INCLUDE_DIR) set(Glib_PROCESS_LIBS Glib_LIBRARY) libfind_process(Glib) performous-1.1/cmake/Modules/FindGlibmm.cmake000066400000000000000000000017251265065420100212640ustar00rootroot00000000000000# - Try to find Glibmm-2.4 # Once done, this will define # # Glibmm_FOUND - system has Glibmm # Glibmm_INCLUDE_DIRS - the Glibmm include directories # Glibmm_LIBRARIES - link these to use Glibmm include(LibFindMacros) # Dependencies libfind_package(Glibmm Glib) libfind_package(Glibmm SigC++) # Use pkg-config to get hints about paths libfind_pkg_check_modules(Glibmm_PKGCONF glibmm-2.4) # Main include dir find_path(Glibmm_INCLUDE_DIR NAMES glibmm/main.h HINTS ${Glibmm_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES glibmm-2.4 ) # Glib-related libraries also use a separate config header, which is in lib dir find_path(GlibmmConfig_INCLUDE_DIR NAMES glibmmconfig.h HINTS ${Glibmm_PKGCONF_INCLUDE_DIRS} /usr PATH_SUFFIXES lib/glibmm-2.4/include ../lib/glibmm-2.4/include ) # Finally the library itself find_library(Glibmm_LIBRARY NAMES glibmm-2.4 HINTS ${Glibmm_PKGCONF_LIBRARY_DIRS} ) set(Glibmm_PROCESS_INCLUDES GlibmmConfig_INCLUDE_DIR) libfind_process(Glibmm) performous-1.1/cmake/Modules/FindJack.cmake000066400000000000000000000011671265065420100207250ustar00rootroot00000000000000# - Try to find Jack # Once done, this will define # # Jack_FOUND - system has Jack # Jack_INCLUDE_DIRS - the Jack include directories # Jack_LIBRARIES - link these to use Jack # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(Jack_PKGCONF jack) find_path(Jack_INCLUDE_DIR NAMES jack/jack.h HINTS ${Jack_PKGCONF_INCLUDE_DIRS} ) find_library(Jack_LIBRARY NAMES jack HINTS ${Jack_PKGCONF_LIBRARY_DIRS} ) set(Jack_PROCESS_INCLUDES Jack_INCLUDE_DIR) set(Jack_PROCESS_LIBS Jack_LIBRARY) libfind_process(Jack) performous-1.1/cmake/Modules/FindJpeg.cmake000066400000000000000000000011771265065420100207430ustar00rootroot00000000000000# - Try to find Jpeg # Once done, this will define # # Jpeg_FOUND - system has Jpeg # Jpeg_INCLUDE_DIRS - the Jpeg include directories # Jpeg_LIBRARIES - link these to use Jpeg # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(Jpeg_PKGCONF jpeg) find_path(Jpeg_INCLUDE_DIR NAMES jconfig.h jpeglib.h HINTS ${Jpeg_PKGCONF_INCLUDE_DIRS} ) find_library(Jpeg_LIBRARY NAMES jpeg HINTS ${Jpeg_PKGCONF_LIBRARY_DIRS} ) set(Jpeg_PROCESS_INCLUDES Jpeg_INCLUDE_DIR) set(Jpeg_PROCESS_LIBS Jpeg_LIBRARY) libfind_process(Jpeg) performous-1.1/cmake/Modules/FindLibEpoxy.cmake000066400000000000000000000014071265065420100216050ustar00rootroot00000000000000# - Try to find LibEpoxy # Once done, this will define # # LibEpoxy_FOUND - system has LibEpoxy # LibEpoxy_INCLUDE_DIRS - the LibEpoxy include directories # LibEpoxy_LIBRARIES - link these to use LibEpoxy # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(LibEpoxy_PKGCONF epoxy) find_path(LibEpoxy_INCLUDE_DIR NAMES epoxy/gl.h HINTS ${LibEpoxy_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES LibEpoxy ) find_library(LibEpoxy_LIBRARY NAMES epoxy HINTS ${LibEpoxy_PKGCONF_LIBRARY_DIRS} ) set(LibEpoxy_PROCESS_INCLUDES LibEpoxy_INCLUDE_DIR) set(LibEpoxy_PROCESS_LIBS LibEpoxy_LIBRARY) set(LibEpoxy_VERSION ${LibEpoxy_PKGCONF_VERSION}) libfind_process(LibEpoxy) performous-1.1/cmake/Modules/FindLibPulse.cmake000066400000000000000000000013071265065420100215700ustar00rootroot00000000000000# - Try to find LibPulse # Once done, this will define # # LibPulse_FOUND - system has LibPulse # LibPulse_INCLUDE_DIRS - the LibPulse include directories # LibPulse_LIBRARIES - link these to use LibPulse # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(LibPulse_PKGCONF libpulse) find_path(LibPulse_INCLUDE_DIR NAMES pulse/pulseaudio.h HINTS ${LibPulse_PKGCONF_INCLUDE_DIRS} ) find_library(LibPulse_LIBRARY NAMES pulse HINTS ${LibPulse_PKGCONF_LIBRARY_DIRS} ) set(LibPulse_PROCESS_INCLUDES LibPulse_INCLUDE_DIR) set(LibPulse_PROCESS_LIBS LibPulse_LIBRARY) libfind_process(LibPulse) performous-1.1/cmake/Modules/FindLibPulseSimple.cmake000066400000000000000000000014671265065420100227510ustar00rootroot00000000000000# - Try to find LibPulseSimple # Once done, this will define # # LibPulseSimple_FOUND - system has LibPulseSimple # LibPulseSimple_INCLUDE_DIRS - the LibPulseSimple include directories # LibPulseSimple_LIBRARIES - link these to use LibPulseSimple # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(LibPulseSimple_PKGCONF libpulse-simple) find_path(LibPulseSimple_INCLUDE_DIR NAMES pulse/simple.h HINTS ${LibPulseSimple_PKGCONF_INCLUDE_DIRS} ) find_library(LibPulseSimple_LIBRARY NAMES pulse-simple HINTS ${LibPulseSimple_PKGCONF_LIBRARY_DIRS} ) set(LibPulseSimple_PROCESS_INCLUDES LibPulseSimple_INCLUDE_DIR) set(LibPulseSimple_PROCESS_LIBS LibPulseSimple_LIBRARY) libfind_process(LibPulseSimple) performous-1.1/cmake/Modules/FindLibRSVG.cmake000066400000000000000000000006601265065420100212620ustar00rootroot00000000000000# - Try to find LibRSVG # Once done, this will define # # LibRSVG_FOUND - system has LibRSVG # LibRSVG_INCLUDE_DIRS - the LibRSVG include directories # LibRSVG_LIBRARIES - link these to use LibRSVG include(LibFindMacros) libfind_package(LibRSVG Cairo) libfind_package(LibRSVG GDK-PixBuf) libfind_pkg_detect(LibRSVG librsvg-2.0 FIND_PATH librsvg/rsvg.h PATH_SUFFIXES librsvg-2 FIND_LIBRARY rsvg-2 ) libfind_process(LibRSVG) performous-1.1/cmake/Modules/FindLibXML++.cmake000066400000000000000000000020151265065420100212630ustar00rootroot00000000000000# - Try to find LibXML++ 2.6 # Once done, this will define # # LibXML++_FOUND - system has LibXML++ # LibXML++_INCLUDE_DIRS - the LibXML++ include directories # LibXML++_LIBRARIES - link these to use LibXML++ include(LibFindMacros) # Dependencies libfind_package(LibXML++ LibXML2) libfind_package(LibXML++ Glibmm) # Use pkg-config to get hints about paths libfind_pkg_check_modules(LibXML++_PKGCONF libxml++-2.6) # Main include dir find_path(LibXML++_INCLUDE_DIR NAMES libxml++/libxml++.h HINTS ${LibXML++_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES libxml++-2.6 ) # Glib-related libraries also use a separate config header, which is in lib dir find_path(LibXML++Config_INCLUDE_DIR NAMES libxml++config.h HINTS ${LibXML++_PKGCONF_INCLUDE_DIRS} /usr PATH_SUFFIXES lib/libxml++-2.6/include ../lib/libxml++-2.6/include ) # Finally the library itself find_library(LibXML++_LIBRARY NAMES xml++-2.6 HINTS ${LibXML++_PKGCONF_LIBRARY_DIRS} ) set(LibXML++_PROCESS_INCLUDES LibXML++Config_INCLUDE_DIR) libfind_process(LibXML++) performous-1.1/cmake/Modules/FindLibXML2.cmake000066400000000000000000000013731265065420100212250ustar00rootroot00000000000000# - Try to find LibXML2 # Once done, this will define # # LibXML2_FOUND - system has LibXML2 # LibXML2_INCLUDE_DIRS - the LibXML2 include directories # LibXML2_LIBRARIES - link these to use LibXML2 # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(LibXML2_PKGCONF libxml-2.0) find_path(LibXML2_INCLUDE_DIR NAMES libxml/xpath.h HINTS ${LibXML2_PKGCONF_INCLUDE_DIRS} HINTS ${LibXML2_PKGCONF_INCLUDE_DIRS}/libxml2 PATH_SUFFIXES libxml2 ) find_library(LibXML2_LIBRARY NAMES xml2 HINTS ${LibXML2_PKGCONF_LIBRARY_DIRS} ) set(LibXML2_PROCESS_INCLUDES LibXML2_INCLUDE_DIR) set(LibXML2_PROCESS_LIBS LibXML2_LIBRARY) libfind_process(LibXML2) performous-1.1/cmake/Modules/FindMagick++.cmake000066400000000000000000000013021265065420100213650ustar00rootroot00000000000000# - Try to find ImageMagick++ # Once done, this will define # # Magick++_FOUND - system has Magick++ # Magick++_INCLUDE_DIRS - the Magick++ include directories # Magick++_LIBRARIES - link these to use Magick++ include(LibFindMacros) # Dependencies libfind_package(Magick++ Magick) # Use pkg-config to get hints about paths libfind_pkg_check_modules(Magick++_PKGCONF ImageMagick++) # Include dir find_path(Magick++_INCLUDE_DIR NAMES Magick++.h HINTS ${Magick++_PKGCONF_INCLUDE_DIRS} ) # Finally the library itself find_library(Magick++_LIBRARY NAMES Magick++ CORE_RL_magick++_ HINTS ${Magick++_PKGCONF_LIBRARY_DIRS} ) # Process Magick++, depends on Magick libfind_process(Magick++ Magick) performous-1.1/cmake/Modules/FindMagick.cmake000066400000000000000000000015031265065420100212420ustar00rootroot00000000000000# - Try to find ImageMagick # Once done, this will define # # Magick_FOUND - system has Magick # Magick_INCLUDE_DIRS - the Magick include directories # Magick_LIBRARIES - link these to use Magick include(LibFindMacros) # Use pkg-config to get hints about paths libfind_pkg_check_modules(Magick_PKGCONF ImageMagick) # Include dir find_path(Magick_INCLUDE_DIR NAMES magick/magick.h HINTS ${Magick_PKGCONF_INCLUDE_DIRS} ) # Finally the library itself find_library(Magick_LIBRARY NAMES Magick MagickCore CORE_RL_magick_ HINTS ${Magick_PKGCONF_LIBRARY_DIRS} ) if(MINGW) find_library(MagickWand_LIBRARY NAMES MagickWand HINTS ${Magick_PKGCONF_LIBRARY_DIRS} ) set(Magick_PROCESS_LIBS MagickWand_LIBRARY) endif(MINGW) libfind_version_header(Magick magick/version.h MagickLibVersionText) libfind_process(Magick) performous-1.1/cmake/Modules/FindMsgfmt.cmake000066400000000000000000000004231265065420100213040ustar00rootroot00000000000000# - Try to find Msgfmt # Once done, this will define # # Msgfmt_FOUND - system has Gettext # Msgfmt_BIN - path to binary file find_program(Msgfmt_BIN msgfmt) if(Msgfmt_BIN) set(Msgfmt_FOUND 1) else() set(Msgfmt_FOUND 0) endif(Msgfmt_BIN) mark_as_advanced(Msgfmt_BIN) performous-1.1/cmake/Modules/FindOpenGL.cmake000066400000000000000000000021021265065420100211670ustar00rootroot00000000000000# - Try to find OpenGL # Once done, this will define # # OpenGL_FOUND - system has OpenGL (GL and GLU) # OpenGL_INCLUDE_DIRS - the OpenGL include directories # OpenGL_LIBRARIES - link these to use OpenGL # OpenGL_GL_LIBRARY - only GL # OpenGL_GLU_LIBRARY - only GLU # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(OpenGL_PKGCONF gl) find_path(OpenGL_INCLUDE_DIR NAMES GL/gl.h HINTS ${OpenGL_PKGCONF_INCLUDE_DIRS} ) if(MSVC) #In MSVC, no need to link, just this hack to get CMake happy find_file(OpenGL_GL_LIBRARY opengl32.dll ) find_file(OpenGL_GLU_LIBRARY glu32.dll ) else() find_library(OpenGL_GL_LIBRARY NAMES GL libopengl32.a opengl32 HINTS ${OpenGL_PKGCONF_LIBRARY_DIRS} ) find_library(OpenGL_GLU_LIBRARY NAMES GLU libglu32.a glu32 HINTS ${OpenGL_PKGCONF_LIBRARY_DIRS} ) endif(MSVC) set(OpenGL_PROCESS_INCLUDES OpenGL_INCLUDE_DIR) set(OpenGL_PROCESS_LIBS OpenGL_GL_LIBRARY OpenGL_GLU_LIBRARY) libfind_process(OpenGL) performous-1.1/cmake/Modules/FindPThread.cmake000066400000000000000000000007461265065420100214060ustar00rootroot00000000000000# - Try to find PThread # Once done, this will define # # PThread_FOUND - system has PThread # PThread_LIBRARIES - link these to use PThread # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(Png_PKGCONF PThread) find_library(PThread_LIBRARY NAMES pthreadGC2 HINTS ${PThread_PKGCONF_LIBRARY_DIRS} ) set(PThread_PROCESS_LIBS PThread_LIBRARY) libfind_process(PThread) performous-1.1/cmake/Modules/FindPango.cmake000066400000000000000000000012471265065420100211200ustar00rootroot00000000000000# - Try to find Pango # Once done, this will define # # Pango_FOUND - system has Pango # Pango_INCLUDE_DIRS - the Pango include directories # Pango_LIBRARIES - link these to use Pango include(LibFindMacros) # Dependencies libfind_package(Pango Freetype) libfind_package(Pango Glib) libfind_package(Pango GObject) # Use pkg-config to get hints about paths libfind_pkg_check_modules(Pango_PKGCONF pango) # Include dir find_path(Pango_INCLUDE_DIR NAMES pango/pango.h HINTS ${Pango_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES pango-1.0 ) # Finally the library itself find_library(Pango_LIBRARY NAMES pango-1.0 HINTS ${Pango_PKGCONF_LIBRARY_DIRS} ) libfind_process(Pango) performous-1.1/cmake/Modules/FindPangoCairo.cmake000066400000000000000000000020541265065420100220730ustar00rootroot00000000000000# - Try to find PangoCairo # Once done, this will define # # PangoCairo_FOUND - system has Pango # PangoCairo_INCLUDE_DIRS - the Pango include directories # PangoCairo_LIBRARIES - link these to use Pango include(LibFindMacros) # Dependencies libfind_package(PangoCairo Pango) libfind_package(PangoCairo Cairo) # Use pkg-config to get hints about paths libfind_pkg_check_modules(PangoCairo_PKGCONF pangocairo) # Include dir find_path(PangoCairo_INCLUDE_DIR NAMES pango/pangocairo.h HINTS ${PangoCairo_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES pango-1.0 ) # Finally the library itself find_library(PangoCairo_LIBRARY NAMES pangocairo-1.0 HINTS ${PangoCairo_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(PangoCairo_PROCESS_INCLUDES PangoCairo_INCLUDE_DIR Pango_INCLUDE_DIR Cairo_INCLUDE_DIR) set(PangoCairo_PROCESS_LIBS PangoCairo_LIBRARY Pango_LIBRARY Cairo_LIBRARY) libfind_process(PangoCairo) performous-1.1/cmake/Modules/FindPangomm.cmake000066400000000000000000000021231265065420100214440ustar00rootroot00000000000000# - Try to find Pangomm 1.4 # Once done, this will define # # Pangomm_FOUND - system has Pangomm # Pangomm_INCLUDE_DIRS - the Pangomm include directories # Pangomm_LIBRARIES - link these to use Pangomm include(LibFindMacros) # Dependencies libfind_package(Pangomm Pango) libfind_package(Pangomm Cairomm) libfind_package(Pangomm Glibmm) # Use pkg-config to get hints about paths libfind_pkg_check_modules(Pangomm_PKGCONF pangomm-1.4) # Main include dir find_path(Pangomm_INCLUDE_DIR NAMES pangomm.h HINTS ${Pangomm_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES pangomm-1.4 ) # Finally the library itself find_library(Pangomm_LIBRARY NAMES pangomm-1.4 HINTS ${Pangomm_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(Pangomm_PROCESS_INCLUDES Pangomm_INCLUDE_DIR Pango_INCLUDE_DIRS Cairomm_INCLUDE_DIRS Glibmm_INCLUDE_DIRS) set(Pangomm_PROCESS_LIBS Pangomm_LIBRARY Pango_LIBRARIES Cairomm_LIBRARIES Glibmm_LIBRARIES) libfind_process(Pangomm) performous-1.1/cmake/Modules/FindPng.cmake000066400000000000000000000011561265065420100205770ustar00rootroot00000000000000# - Try to find Png # Once done, this will define # # Png_FOUND - system has Png # Png_INCLUDE_DIRS - the Png include directories # Png_LIBRARIES - link these to use Png # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(Png_PKGCONF Png) find_path(Png_INCLUDE_DIR NAMES pngconf.h HINTS ${Png_PKGCONF_INCLUDE_DIRS} ) find_library(Png_LIBRARY NAMES png png12 png14 HINTS ${Png_PKGCONF_LIBRARY_DIRS} ) set(Png_PROCESS_INCLUDES Png_INCLUDE_DIR) set(Png_PROCESS_LIBS Png_LIBRARY) libfind_process(Png) performous-1.1/cmake/Modules/FindPortAudio.cmake000066400000000000000000000016411265065420100217600ustar00rootroot00000000000000# - Try to find PortAudio # Once done, this will define # # PortAudio_FOUND - system has PortAudio # PortAudio_INCLUDE_DIRS - the PortAudio include directories # PortAudio_LIBRARIES - link these to use PortAudio # PortAudio_VERSION - detected version of PortAudio # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(PortAudio_PKGCONF portaudio-2.0) if(PortAudio_PKGCONF_FOUND) set(PortAudio_VERSION 19) else(PortAudio_PKGCONF_FOUND) set(PortAudio_VERSION 18) endif(PortAudio_PKGCONF_FOUND) find_path(PortAudio_INCLUDE_DIR NAMES portaudio.h HINTS ${PortAudio_PKGCONF_INCLUDE_DIRS} ) find_library(PortAudio_LIBRARY NAMES portaudio HINTS ${PortAudio_PKGCONF_LIBRARY_DIRS} ) set(PortAudio_PROCESS_INCLUDES PortAudio_INCLUDE_DIR) set(PortAudio_PROCESS_LIBS PortAudio_LIBRARY) libfind_process(PortAudio) performous-1.1/cmake/Modules/FindPortMidi.cmake000066400000000000000000000016511265065420100216020ustar00rootroot00000000000000# - Try to find PortMidi # Once done, this will define # # PortMidi_FOUND - system has PortMidi # PortMidi_INCLUDE_DIRS - the PortMidi include directories # PortMidi_LIBRARIES - link these to use PortMidi # PortMidi_VERSION - detected version of PortMidi # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) find_path(PortMidi_INCLUDE_DIR NAMES portmidi.h) find_library(PortMidi_LIBRARY NAMES portmidi) find_library(PortTime_LIBRARY NAMES porttime) set(PortMidi_PROCESS_INCLUDES PortMidi_INCLUDE_DIR) set(PortMidi_PROCESS_LIBS PortMidi_LIBRARY) # Porttime library is merged to Portmidi in new versions, so # we work around problems by adding it only if it's present if (${PortTime_LIBRARY}) set(PortMidi_PROCESS_LIBS PortMidi_PROCESS_LIBS PortTime_LIBRARY) endif (${PortTime_LIBRARY}) libfind_process(PortMidi) mark_as_advanced(PortTime_LIBRARY) performous-1.1/cmake/Modules/FindProjectM.cmake000066400000000000000000000015541265065420100216000ustar00rootroot00000000000000# - Try to find ProjectM # Once done, this will define # # ProjectM_FOUND - system has ProjectM # ProjectM_INCLUDE_DIRS - the ProjectM include directories # ProjectM_LIBRARIES - link these to use ProjectM include(LibFindMacros) # Use pkg-config to get hints about paths libfind_pkg_check_modules(ProjectM_PKGCONF libprojectM) # Include dir find_path(ProjectM_INCLUDE_DIR NAMES libprojectM/projectM.hpp HINTS ${ProjectM_PKGCONF_INCLUDE_DIRS} ) # Finally the library itself find_library(ProjectM_LIBRARY NAMES projectM HINTS ${ProjectM_PKGCONF_LIBRARY_DIRS} ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. set(ProjectM_PROCESS_INCLUDES ProjectM_INCLUDE_DIR) set(ProjectM_PROCESS_LIBS ProjectM_LIBRARY) libfind_process(ProjectM) performous-1.1/cmake/Modules/FindSDL.cmake000066400000000000000000000031541265065420100204750ustar00rootroot00000000000000# - Try to find SDL # Once done, this will define # # SDL_FOUND - system has SDL # SDL_INCLUDE_DIRS - the SDL include directories # SDL_LIBRARIES - link these to use SDL # SDL_SDL_LIBRARY - only libSDL # SDL_SDLmain_LIBRARY - only libSDLmain # SDL_SOURCES - add this in the source file list of your target (hack for OSX) # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(SDL_PKGCONF sdl) find_path(SDL_INCLUDE_DIR NAMES SDL.h PATH_SUFFIXES SDL HINTS ${SDL_PKGCONF_INCLUDE_DIRS} ) find_library(SDL_SDL_LIBRARY NAMES SDL HINTS ${SDL_PKGCONF_LIBRARY_DIRS} ) # Process others than OSX with native SDL normally if(NOT "${SDL_SDL_LIBRARY}" MATCHES "framework") if(MINGW) set(MINGW32_LIBRARY mingw32) set(SDL_PROCESS_LIBS ${SDL_PROCESS_LIBS} MINGW32_LIBRARY) endif(MINGW) find_library(SDL_SDLmain_LIBRARY NAMES libSDLmain.a SDLmain HINTS ${SDL_PKGCONF_LIBRARY_DIRS} ) if (SDL_SDLmain_LIBRARY) set(SDL_PROCESS_LIBS ${SDL_PROCESS_LIBS} SDL_SDLmain_LIBRARY) endif (SDL_SDLmain_LIBRARY) set(SDL_PROCESS_LIBS ${SDL_PROCESS_LIBS} SDL_SDL_LIBRARY) endif(NOT "${SDL_SDL_LIBRARY}" MATCHES "framework") set(SDL_PROCESS_INCLUDES SDL_INCLUDE_DIR) libfind_process(SDL) # Special processing for OSX native SDL if("${SDL_SDL_LIBRARY}" MATCHES "SDL.framework") set(SDL_SOURCES "osx/SDLmain.m") set(SDL_LIBRARIES "-framework SDL") endif("${SDL_SDL_LIBRARY}" MATCHES "SDL.framework") # All OSX versions need Cocoa if(APPLE) set(SDL_LIBRARIES ${SDL_LIBRARIES} "-framework Cocoa") endif(APPLE) performous-1.1/cmake/Modules/FindSDL2.cmake000066400000000000000000000025441265065420100205610ustar00rootroot00000000000000# - Try to find SDL2 # Once done, this will define # # SDL2_FOUND - system has SDL2 # SDL2_INCLUDE_DIRS - the SDL2 include directories # SDL2_LIBRARIES - link these to use SDL2 # SDL2_SDL_LIBRARY - only libSDL2 # SDL2_SDLmain_LIBRARY - only libSDL2main # SDL2_SOURCES - add this in the source file list of your target (hack for OSX) # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_detect(SDL2 sdl2 FIND_PATH SDL.h PATH_SUFFIXES SDL2 FIND_LIBRARY SDL2) # Process others than OSX with native SDL normally if(NOT "${SDL2_SDL_LIBRARY}" MATCHES "framework") if(MINGW) set(MINGW32_LIBRARY mingw32) set(SDL2_PROCESS_LIBS ${SDL2_PROCESS_LIBS} MINGW32_LIBRARY) endif() find_library(SDL2_SDLmain_LIBRARY NAMES libSDL2main.a SDL2main HINTS ${SDL2_PKGCONF_LIBRARY_DIRS} ) if (SDL2_SDLmain_LIBRARY) set(SDL2_PROCESS_LIBS ${SDL2_PROCESS_LIBS} SDL2_SDLmain_LIBRARY) endif() set(SDL2_PROCESS_LIBS ${SDL2_PROCESS_LIBS} SDL2_SDL_LIBRARY) endif() libfind_process(SDL2) # Special processing for OSX native SDL if("${SDL2_SDL_LIBRARY}" MATCHES "SDL.framework") set(SDL2_SOURCES "osx/SDLmain.m") set(SDL2_LIBRARIES "-framework SDL2") endif() # All OSX versions need Cocoa if(APPLE) set(SDL2_LIBRARIES ${SDL2_LIBRARIES} "-framework Cocoa") endif(APPLE) performous-1.1/cmake/Modules/FindSDL_image.cmake000066400000000000000000000013221265065420100216320ustar00rootroot00000000000000# - Try to find SDL_image # Once done, this will define # # SDL_image_FOUND - system has SDL_image # SDL_image_INCLUDE_DIRS - the SDL include directories # SDL_image_LIBRARIES - link these to use SDL_image # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(SDL_image_PKGCONF sdl) find_path(SDL_image_INCLUDE_DIR NAMES SDL_image.h PATH_SUFFIXES SDL HINTS ${SDL_PKGCONF_INCLUDE_DIRS} ) find_library(SDL_image_LIBRARY NAMES SDL_image HINTS ${SDL_PKGCONF_LIBRARY_DIRS} ) set(SDL_image_PROCESS_INCLUDES SDL_image_INCLUDE_DIR) set(SDL_image_PROCESS_LIBS SDL_image_LIBRARY) libfind_process(SDL_image) performous-1.1/cmake/Modules/FindSDL_mixer.cmake000066400000000000000000000015621265065420100217020ustar00rootroot00000000000000# - Try to find SDL # Once done, this will define # # SDL_mixer_FOUND - system has SDL # SDL_mixer_INCLUDE_DIRS - the SDL include directories # SDL_mixer_LIBRARIES - link these to use SDL # SDL_mixer_SDL_mixer_LIBRARY - only libSDL # SDL_mixer_SDLmain_LIBRARY - only libSDLmain # SDL_mixer_SOURCES - add this in the source file list of your target (hack for OSX) # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(SDL_mixer_PKGCONF sdl) find_path(SDL_mixer_INCLUDE_DIR NAMES SDL_mixer.h PATH_SUFFIXES SDL HINTS ${SDL_PKGCONF_INCLUDE_DIRS} ) find_library(SDL_mixer_LIBRARY NAMES SDL_mixer HINTS ${SDL_PKGCONF_LIBRARY_DIRS} ) set(SDL_mixer_PROCESS_INCLUDES SDL_mixer_INCLUDE_DIR) set(SDL_mixer_PROCESS_LIBS SDL_mixer_LIBRARY) libfind_process(SDL_mixer) performous-1.1/cmake/Modules/FindSWScale.cmake000066400000000000000000000024151265065420100213530ustar00rootroot00000000000000# - Try to find FFMPEG libswscale # Once done, this will define # # SWScale_FOUND - the library is available # SWScale_INCLUDE_DIRS - the include directories # SWScale_LIBRARIES - the libraries # SWScale_INCLUDE - the file to include (may be used in config.h) # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_package(SWScale AVUtil) libfind_pkg_check_modules(SWScale_PKGCONF libswscale) find_path(SWScale_INCLUDE_DIR NAMES libswscale/swscale.h ffmpeg/swscale.h swscale.h HINTS ${SWScale_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES ffmpeg ) if(SWScale_INCLUDE_DIR) foreach(suffix libswscale/ ffmpeg/ "") if(NOT SWScale_INCLUDE) if(EXISTS "${SWScale_INCLUDE_DIR}/${suffix}swscale.h") set(SWScale_INCLUDE "${suffix}swscale.h") endif(EXISTS "${SWScale_INCLUDE_DIR}/${suffix}swscale.h") endif(NOT SWScale_INCLUDE) endforeach(suffix) if(NOT SWScale_INCLUDE) message(FATAL_ERROR "Found swscale.h include dir, but not the header file. Maybe you need to clear CMake cache?") endif(NOT SWScale_INCLUDE) endif(SWScale_INCLUDE_DIR) find_library(SWScale_LIBRARY NAMES libswscale.dll.a swscale HINTS ${SWScale_PKGCONF_LIBRARY_DIRS} ) libfind_process(SWScale) performous-1.1/cmake/Modules/FindSigC++.cmake000066400000000000000000000017041265065420100210250ustar00rootroot00000000000000# - Try to find SigC++-2.0 # Once done, this will define # # SigC++_FOUND - system has SigC++ # SigC++_INCLUDE_DIRS - the SigC++ include directories # SigC++_LIBRARIES - link these to use SigC++ include(LibFindMacros) # Use pkg-config to get hints about paths libfind_pkg_check_modules(SigC++_PKGCONF sigc++-2.0) # Main include dir find_path(SigC++_INCLUDE_DIR NAMES sigc++/sigc++.h HINTS ${SigC++_PKGCONF_INCLUDE_DIRS} PATH_SUFFIXES sigc++-2.0 ) # Glib-related libraries also use a separate config header, which is in lib dir find_path(SigC++Config_INCLUDE_DIR NAMES sigc++config.h HINTS ${SigC++_PKGCONF_INCLUDE_DIRS} /usr PATH_SUFFIXES lib/sigc++-2.0/include ../lib/sigc++-2.0/include ) # Finally the library itself find_library(SigC++_LIBRARY NAMES sigc-2.0 HINTS ${SigC++_PKGCONF_LIBRARY_DIRS} ) set(SigC++_PROCESS_INCLUDES SigC++_INCLUDE_DIR SigC++Config_INCLUDE_DIR) set(SigC++_PROCESS_LIBS SigC++_LIBRARY) libfind_process(SigC++) performous-1.1/cmake/Modules/FindTiff.cmake000066400000000000000000000011661265065420100207440ustar00rootroot00000000000000# - Try to find Tiff # Once done, this will define # # Tiff_FOUND - system has Tiff # Tiff_INCLUDE_DIRS - the Tiff include directories # Tiff_LIBRARIES - link these to use Tiff # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(Tiff_PKGCONF tiff) find_path(Tiff_INCLUDE_DIR NAMES tiffconf.h HINTS ${Tiff_PKGCONF_INCLUDE_DIRS} ) find_library(Tiff_LIBRARY NAMES tiff HINTS ${Tiff_PKGCONF_LIBRARY_DIRS} ) set(Tiff_PROCESS_INCLUDES Tiff_INCLUDE_DIR) set(Tiff_PROCESS_LIBS Tiff_LIBRARY) libfind_process(Tiff) performous-1.1/cmake/Modules/FindZ.cmake000066400000000000000000000010711265065420100202600ustar00rootroot00000000000000# - Try to find Z # Once done, this will define # # Z_FOUND - system has Z # Z_INCLUDE_DIRS - the Z include directories # Z_LIBRARIES - link these to use Z # # See documentation on how to write CMake scripts at # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries include(LibFindMacros) libfind_pkg_check_modules(Z_PKGCONF Z) find_path(Z_INCLUDE_DIR NAMES zlib.h HINTS ${Z_PKGCONF_INCLUDE_DIRS} ) find_library(Z_LIBRARY NAMES z HINTS ${Z_PKGCONF_LIBRARY_DIRS} ) set(Z_PROCESS_INCLUDES Z_INCLUDE_DIR) set(Z_PROCESS_LIBS Z_LIBRARY) libfind_process(Z) performous-1.1/cmake/Modules/GetGitRevisionDescription.cmake000066400000000000000000000100511265065420100243520ustar00rootroot00000000000000# - Returns a version string from Git # # These functions force a re-configure on each git commit so that you can # trust the values of the variables in your build system. # # get_git_head_revision( [ ...]) # # Returns the refspec and sha hash of the current head revision # # git_describe( [ ...]) # # Returns the results of git describe on the source tree, and adjusting # the output so that it tests false if an error occurs. # # git_get_exact_tag( [ ...]) # # Returns the results of git describe --exact-match on the source tree, # and adjusting the output so that it tests false if there was no exact # matching tag. # # Requires CMake 2.6 or newer (uses the 'function' command) # # Original Author: # 2009-2010 Ryan Pavlik # http://academic.cleardefinition.com # Iowa State University HCI Graduate Program/VRAC # # Copyright Iowa State University 2009-2010. # Distributed under the Boost Software License, Version 1.0. # (See accompanying file docs/license/Boost-LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) if(__get_git_revision_description) return() endif() set(__get_git_revision_description YES) # We must run the following at "include" time, not at function call time, # to find the path to this module rather than the path to a calling list file get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH) function(get_git_head_revision _refspecvar _hashvar) set(GIT_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}") set(GIT_DIR "${GIT_PARENT_DIR}/.git") while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}") get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT) # We have reached the root directory, we are not in git set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE) set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE) return() endif() set(GIT_DIR "${GIT_PARENT_DIR}/.git") endwhile() # check if this is a submodule if(NOT IS_DIRECTORY ${GIT_DIR}) file(READ ${GIT_DIR} submodule) string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule}) get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH) get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE) endif() set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data") if(NOT EXISTS "${GIT_DATA}") file(MAKE_DIRECTORY "${GIT_DATA}") endif() if(NOT EXISTS "${GIT_DIR}/HEAD") return() endif() set(HEAD_FILE "${GIT_DATA}/HEAD") configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY) configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in" "${GIT_DATA}/grabRef.cmake" @ONLY) include("${GIT_DATA}/grabRef.cmake") set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE) set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE) endfunction() function(git_describe _var) if(NOT GIT_FOUND) find_package(Git QUIET) endif() get_git_head_revision(refspec hash) if(NOT GIT_FOUND) set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) return() endif() if(NOT hash) set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) return() endif() # TODO sanitize #if((${ARGN}" MATCHES "&&") OR # (ARGN MATCHES "||") OR # (ARGN MATCHES "\\;")) # message("Please report the following error to the project!") # message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}") #endif() #message(STATUS "Arguments to execute_process: ${ARGN}") execute_process(COMMAND "${GIT_EXECUTABLE}" describe ${hash} ${ARGN} WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) if(NOT res EQUAL 0) set(out "${out}-${res}-NOTFOUND") endif() set(${_var} "${out}" PARENT_SCOPE) endfunction() function(git_get_exact_tag _var) git_describe(out --exact-match ${ARGN}) set(${_var} "${out}" PARENT_SCOPE) endfunction() performous-1.1/cmake/Modules/GetGitRevisionDescription.cmake.in000066400000000000000000000023051265065420100247620ustar00rootroot00000000000000# # Internal file for GetGitRevisionDescription.cmake # # Requires CMake 2.6 or newer (uses the 'function' command) # # Original Author: # 2009-2010 Ryan Pavlik # http://academic.cleardefinition.com # Iowa State University HCI Graduate Program/VRAC # # Copyright Iowa State University 2009-2010. # Distributed under the Boost Software License, Version 1.0. # (See accompanying file docs/license/Boost-LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) set(HEAD_HASH) file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024) string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS) if(HEAD_CONTENTS MATCHES "ref") # named branch string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}") if(EXISTS "@GIT_DIR@/${HEAD_REF}") configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}") configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) set(HEAD_HASH "${HEAD_REF}") endif() else() # detached HEAD configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY) endif() if(NOT HEAD_HASH) file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024) string(STRIP "${HEAD_HASH}" HEAD_HASH) endif() performous-1.1/cmake/Modules/LibFindMacros.cmake000066400000000000000000000247171265065420100217360ustar00rootroot00000000000000# Version 2.2 # Public Domain, originally written by Lasse Kärkkäinen # Maintained at https://github.com/Tronic/cmake-modules # Please send your improvements as pull requests on Github. # Find another package and make it a dependency of the current package. # This also automatically forwards the "REQUIRED" argument. # Usage: libfind_package( [extra args to find_package]) macro (libfind_package PREFIX PKG) set(${PREFIX}_args ${PKG} ${ARGN}) if (${PREFIX}_FIND_REQUIRED) set(${PREFIX}_args ${${PREFIX}_args} REQUIRED) endif() find_package(${${PREFIX}_args}) set(${PREFIX}_DEPENDENCIES ${${PREFIX}_DEPENDENCIES};${PKG}) unset(${PREFIX}_args) endmacro() # A simple wrapper to make pkg-config searches a bit easier. # Works the same as CMake's internal pkg_check_modules but is always quiet. macro (libfind_pkg_check_modules) find_package(PkgConfig QUIET) if (PKG_CONFIG_FOUND) pkg_check_modules(${ARGN} QUIET) endif() endmacro() # Avoid useless copy&pasta by doing what most simple libraries do anyway: # pkg-config, find headers, find library. # Usage: libfind_pkg_detect( FIND_PATH [other args] FIND_LIBRARY [other args]) # E.g. libfind_pkg_detect(SDL2 sdl2 FIND_PATH SDL.h PATH_SUFFIXES SDL2 FIND_LIBRARY SDL2) function (libfind_pkg_detect PREFIX) # Parse arguments set(argname pkgargs) foreach (i ${ARGN}) if ("${i}" STREQUAL "FIND_PATH") set(argname pathargs) elseif ("${i}" STREQUAL "FIND_LIBRARY") set(argname libraryargs) else() set(${argname} ${${argname}} ${i}) endif() endforeach() if (NOT pkgargs) message(FATAL_ERROR "libfind_pkg_detect requires at least a pkg_config package name to be passed.") endif() # Find library libfind_pkg_check_modules(${PREFIX}_PKGCONF ${pkgargs}) if (pathargs) find_path(${PREFIX}_INCLUDE_DIR NAMES ${pathargs} HINTS ${${PREFIX}_PKGCONF_INCLUDE_DIRS}) endif() if (libraryargs) find_library(${PREFIX}_LIBRARY NAMES ${libraryargs} HINTS ${${PREFIX}_PKGCONF_LIBRARY_DIRS}) endif() endfunction() # Extracts a version #define from a version.h file, output stored to _VERSION. # Usage: libfind_version_header(Foobar foobar/version.h FOOBAR_VERSION_STR) # Fourth argument "QUIET" may be used for silently testing different define names. # This function does nothing if the version variable is already defined. function (libfind_version_header PREFIX VERSION_H DEFINE_NAME) # Skip processing if we already have a version or if the include dir was not found if (${PREFIX}_VERSION OR NOT ${PREFIX}_INCLUDE_DIR) return() endif() set(quiet ${${PREFIX}_FIND_QUIETLY}) # Process optional arguments foreach(arg ${ARGN}) if (arg STREQUAL "QUIET") set(quiet TRUE) else() message(AUTHOR_WARNING "Unknown argument ${arg} to libfind_version_header ignored.") endif() endforeach() # Read the header and parse for version number set(filename "${${PREFIX}_INCLUDE_DIR}/${VERSION_H}") if (NOT EXISTS ${filename}) if (NOT quiet) message(AUTHOR_WARNING "Unable to find ${${PREFIX}_INCLUDE_DIR}/${VERSION_H}") endif() return() endif() file(READ "${filename}" header) string(REGEX REPLACE ".*#[ \t]*define[ \t]*${DEFINE_NAME}[ \t]*\"([^\n]*)\".*" "\\1" match "${header}") # No regex match? if (match STREQUAL header) if (NOT quiet) message(AUTHOR_WARNING "Unable to find \#define ${DEFINE_NAME} \"\" from ${${PREFIX}_INCLUDE_DIR}/${VERSION_H}") endif() return() endif() # Export the version string set(${PREFIX}_VERSION "${match}" PARENT_SCOPE) endfunction() # Do the final processing once the paths have been detected. # If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain # all the variables, each of which contain one include directory. # Ditto for ${PREFIX}_PROCESS_LIBS and library files. # Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES. # Also handles errors in case library detection was required, etc. function (libfind_process PREFIX) # Skip processing if already processed during this configuration run if (${PREFIX}_FOUND) return() endif() set(found TRUE) # Start with the assumption that the package was found # Did we find any files? Did we miss includes? These are for formatting better error messages. set(some_files FALSE) set(missing_headers FALSE) # Shorthands for some variables that we need often set(quiet ${${PREFIX}_FIND_QUIETLY}) set(required ${${PREFIX}_FIND_REQUIRED}) set(exactver ${${PREFIX}_FIND_VERSION_EXACT}) set(findver "${${PREFIX}_FIND_VERSION}") set(version "${${PREFIX}_VERSION}") # Lists of config option names (all, includes, libs) unset(configopts) set(includeopts ${${PREFIX}_PROCESS_INCLUDES}) set(libraryopts ${${PREFIX}_PROCESS_LIBS}) # Process deps to add to foreach (i ${PREFIX} ${${PREFIX}_DEPENDENCIES}) if (DEFINED ${i}_INCLUDE_OPTS OR DEFINED ${i}_LIBRARY_OPTS) # The package seems to export option lists that we can use, woohoo! list(APPEND includeopts ${${i}_INCLUDE_OPTS}) list(APPEND libraryopts ${${i}_LIBRARY_OPTS}) else() # If plural forms don't exist or they equal singular forms if ((NOT DEFINED ${i}_INCLUDE_DIRS AND NOT DEFINED ${i}_LIBRARIES) OR ({i}_INCLUDE_DIR STREQUAL ${i}_INCLUDE_DIRS AND ${i}_LIBRARY STREQUAL ${i}_LIBRARIES)) # Singular forms can be used if (DEFINED ${i}_INCLUDE_DIR) list(APPEND includeopts ${i}_INCLUDE_DIR) endif() if (DEFINED ${i}_LIBRARY) list(APPEND libraryopts ${i}_LIBRARY) endif() else() # Oh no, we don't know the option names message(FATAL_ERROR "We couldn't determine config variable names for ${i} includes and libs. Aieeh!") endif() endif() endforeach() if (includeopts) list(REMOVE_DUPLICATES includeopts) endif() if (libraryopts) list(REMOVE_DUPLICATES libraryopts) endif() string(REGEX REPLACE ".*[ ;]([^ ;]*(_INCLUDE_DIRS|_LIBRARIES))" "\\1" tmp "${includeopts} ${libraryopts}") if (NOT tmp STREQUAL "${includeopts} ${libraryopts}") message(AUTHOR_WARNING "Plural form ${tmp} found in config options of ${PREFIX}. This works as before but is now deprecated. Please only use singular forms INCLUDE_DIR and LIBRARY, and update your find scripts for LibFindMacros > 2.0 automatic dependency system (most often you can simply remove the PROCESS variables entirely).") endif() # Include/library names separated by spaces (notice: not CMake lists) unset(includes) unset(libs) # Process all includes and set found false if any are missing foreach (i ${includeopts}) list(APPEND configopts ${i}) if (NOT "${${i}}" STREQUAL "${i}-NOTFOUND") list(APPEND includes "${${i}}") else() set(found FALSE) set(missing_headers TRUE) endif() endforeach() # Process all libraries and set found false if any are missing foreach (i ${libraryopts}) list(APPEND configopts ${i}) if (NOT "${${i}}" STREQUAL "${i}-NOTFOUND") list(APPEND libs "${${i}}") else() set (found FALSE) endif() endforeach() # Version checks if (found AND findver) if (NOT version) message(WARNING "The find module for ${PREFIX} does not provide version information, so we'll just assume that it is OK. Please fix the module or remove package version requirements to get rid of this warning.") elseif (version VERSION_LESS findver OR (exactver AND NOT version VERSION_EQUAL findver)) set(found FALSE) set(version_unsuitable TRUE) endif() endif() # If all-OK, hide all config options, export variables, print status and exit if (found) foreach (i ${configopts}) mark_as_advanced(${i}) endforeach() if (NOT quiet) message(STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}") if (LIBFIND_DEBUG) message(STATUS " ${PREFIX}_DEPENDENCIES=${${PREFIX}_DEPENDENCIES}") message(STATUS " ${PREFIX}_INCLUDE_OPTS=${includeopts}") message(STATUS " ${PREFIX}_INCLUDE_DIRS=${includes}") message(STATUS " ${PREFIX}_LIBRARY_OPTS=${libraryopts}") message(STATUS " ${PREFIX}_LIBRARIES=${libs}") endif() set (${PREFIX}_INCLUDE_OPTS ${includeopts} PARENT_SCOPE) set (${PREFIX}_LIBRARY_OPTS ${libraryopts} PARENT_SCOPE) set (${PREFIX}_INCLUDE_DIRS ${includes} PARENT_SCOPE) set (${PREFIX}_LIBRARIES ${libs} PARENT_SCOPE) set (${PREFIX}_FOUND TRUE PARENT_SCOPE) endif() return() endif() # Format messages for debug info and the type of error set(vars "Relevant CMake configuration variables:\n") foreach (i ${configopts}) mark_as_advanced(CLEAR ${i}) set(val ${${i}}) if ("${val}" STREQUAL "${i}-NOTFOUND") set (val "") elseif (val AND NOT EXISTS ${val}) set (val "${val} (does not exist)") else() set(some_files TRUE) endif() set(vars "${vars} ${i}=${val}\n") endforeach() set(vars "${vars}You may use CMake GUI, cmake -D or ccmake to modify the values. Delete CMakeCache.txt to discard all values and force full re-detection if necessary.\n") if (version_unsuitable) set(msg "${PREFIX} ${${PREFIX}_VERSION} was found but") if (exactver) set(msg "${msg} only version ${findver} is acceptable.") else() set(msg "${msg} version ${findver} is the minimum requirement.") endif() else() if (missing_headers) set(msg "We could not find development headers for ${PREFIX}. Do you have the necessary dev package installed?") elseif (some_files) set(msg "We only found some files of ${PREFIX}, not all of them. Perhaps your installation is incomplete or maybe we just didn't look in the right place?") if(findver) set(msg "${msg} This could also be caused by incompatible version (if it helps, at least ${PREFIX} ${findver} should work).") endif() else() set(msg "We were unable to find package ${PREFIX}.") endif() endif() # Fatal error out if REQUIRED if (required) set(msg "REQUIRED PACKAGE NOT FOUND\n${msg} This package is REQUIRED and you need to install it or adjust CMake configuration in order to continue building ${CMAKE_PROJECT_NAME}.") message(FATAL_ERROR "${msg}\n${vars}") endif() # Otherwise just print a nasty warning if (NOT quiet) message(WARNING "WARNING: MISSING PACKAGE\n${msg} This package is NOT REQUIRED and you may ignore this warning but by doing so you may miss some functionality of ${CMAKE_PROJECT_NAME}. \n${vars}") endif() endfunction() performous-1.1/cmake/performous.sh.cmake000066400000000000000000000004531265065420100204530ustar00rootroot00000000000000#!/bin/sh env DYLD_LIBRARY_PATH='@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@:$DYLD_LIBRARY_PATH' LD_LIBRARY_PATH='@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@:$LD_LIBRARY_PATH' PERFORMOUS_DATA_DIR='@CMAKE_INSTALL_PREFIX@/@SHARE_INSTALL@' PLUGIN_PATH='@PERFORMOUS_PLUGIN_PATH@' '@PERFORMOUS_EXECUTABLE@' "$@" performous-1.1/common/000077500000000000000000000000001265065420100150455ustar00rootroot00000000000000performous-1.1/common/image.cc000066400000000000000000000215151265065420100164420ustar00rootroot00000000000000#include "image.hh" #include #include #include #include #include #include using fs::ofstream; using fs::ifstream; namespace { void writePngHelper(png_structp pngPtr, png_bytep data, png_size_t length) { static_cast(png_get_io_ptr(pngPtr))->write((char*)data, length); } void readPngHelper(png_structp pngPtr, png_bytep data, png_size_t length) { static_cast(png_get_io_ptr(pngPtr))->read((char*)data, length); } void loadPNG_internal(png_structp pngPtr, png_infop infoPtr, ifstream& file, Bitmap& bitmap, std::vector& rows) { if (setjmp(png_jmpbuf(pngPtr))) throw std::runtime_error("Reading PNG failed"); png_set_read_fn(pngPtr,(png_voidp)&file, readPngHelper); png_read_info(pngPtr, infoPtr); png_set_expand(pngPtr); // Expand everything to RGB(A) png_set_strip_16(pngPtr); // Strip everything down to 8 bit/component png_set_gray_to_rgb(pngPtr); // Convert even grayscale to RGB(A) png_set_filler(pngPtr, 0xFF, PNG_FILLER_AFTER); // Add alpha channel if it is missing bitmap.resize(png_get_image_width(pngPtr, infoPtr), png_get_image_height(pngPtr, infoPtr)); rows.resize(bitmap.height); for (unsigned y = 0; y < bitmap.height; ++y) rows[y] = reinterpret_cast(&bitmap.buf[y * bitmap.width * 4]); png_read_image(pngPtr, &rows[0]); } static void writePNG_internal(png_structp pngPtr, png_infop infoPtr, ofstream& file, unsigned w, unsigned h, int colorType, std::vector& rows) { // There must be no objects initialized within this function because longjmp will mess them up if (setjmp(png_jmpbuf(pngPtr))) throw std::runtime_error("Writing PNG failed"); png_set_write_fn(pngPtr, &file, writePngHelper, NULL); png_set_IHDR(pngPtr, infoPtr, w, h, 8, colorType, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); png_write_info(pngPtr, infoPtr); png_write_image(pngPtr, &rows[0]); png_write_end(pngPtr, NULL); } struct my_jpeg_error_mgr { struct jpeg_error_mgr pub; /* "public" fields */ jmp_buf setjmp_buffer; /* for return to caller */ }; typedef struct my_jpeg_error_mgr * my_jpeg_error_mgr_ptr; static inline void my_jpeg_error_exit(j_common_ptr cinfo) { my_jpeg_error_mgr_ptr myerr = (my_jpeg_error_mgr_ptr) cinfo->err; (*cinfo->err->output_message) (cinfo); longjmp(myerr->setjmp_buffer, 1); } #if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED) // Implementation of jpeg_mem_src from // http://stackoverflow.com/questions/5280756/libjpeg-ver-6b-jpeg-stdio-src-vs-jpeg-mem-src /* Read JPEG image from a memory segment */ static void init_source(j_decompress_ptr /*cinfo*/) {} static boolean fill_input_buffer(j_decompress_ptr /*cinfo*/) { //ERREXIT(cinfo, JERR_INPUT_EMPTY); return true; } static void skip_input_data(j_decompress_ptr cinfo, long num_bytes) { auto src = static_cast(cinfo->src); if (num_bytes > 0) { src->next_input_byte += num_bytes; src->bytes_in_buffer -= num_bytes; } } static void term_source(j_decompress_ptr /*cinfo*/) {} static void jpeg_mem_src(j_decompress_ptr cinfo, void* buffer, long nbytes) { if (!cinfo->src) { /* first time for this JPEG object? */ cinfo->src = static_cast( (*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_PERMANENT, sizeof(jpeg_source_mgr)) ); } auto src = static_cast(cinfo->src); src->init_source = init_source; src->fill_input_buffer = fill_input_buffer; src->skip_input_data = skip_input_data; src->resync_to_restart = jpeg_resync_to_restart; /* use default method */ src->term_source = term_source; src->bytes_in_buffer = nbytes; src->next_input_byte = static_cast(buffer); } #endif typedef std::vector BinaryBuffer; BinaryBuffer readFile(fs::path const& path) { BinaryBuffer ret; fs::ifstream f(path, std::ios::binary); f.seekg(0, std::ios::end); ret.resize(f.tellg()); f.seekg(0); f.read(reinterpret_cast(ret.data()), ret.size()); if (!f) throw std::runtime_error("File cannot be read: " + path.string()); return ret; } } void writePNG(fs::path const& filename, Bitmap const& img, unsigned stride) { fs::path name = filename; // We use PNG in a non-standard way, with premultiplied alpha, signified by .premul.png extension. std::clog << "image/debug: Saving PNG: " + name.string() << std::endl; std::vector rows(img.height); // Determine color type and bytes per pixel unsigned char bpp; int colorType; switch (img.fmt) { case pix::RGB: bpp = 3; colorType = PNG_COLOR_TYPE_RGB; break; case pix::CHAR_RGBA: bpp = 4; colorType = PNG_COLOR_TYPE_RGBA; break; default: // Byte order would need to be changed for other formats and we don't currently need them... throw std::logic_error("Unsupported pixel format in writePNG_internal"); } // Construct row pointers bool reverse = img.bottomFirst; if (stride == 0) stride = img.width * bpp; unsigned pos = reverse ? img.height * stride : -stride; for (unsigned y = 0; y < img.height; ++y) { pos += (reverse ? -stride : stride); rows[y] = (png_bytep)(&img.data()[pos]); } // Initialize libpng structures png_structp pngPtr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (!pngPtr) throw std::runtime_error("png_create_read_struct failed"); png_infop infoPtr = NULL; struct Cleanup { png_structpp pngPP; png_infopp infoPP; Cleanup(png_structp& pngP, png_infop& infoP): pngPP(&pngP), infoPP(&infoP) {} ~Cleanup() { png_destroy_write_struct(pngPP, infoPP); } } cleanup(pngPtr, infoPtr); infoPtr = png_create_info_struct(pngPtr); if (!infoPtr) throw std::runtime_error("png_create_info_struct failed"); png_set_gAMA(pngPtr, infoPtr, img.linearPremul ? 1.0 : 2.2); // Write file ofstream file(name, std::ios::binary); writePNG_internal(pngPtr, infoPtr, file, img.width, img.height, colorType, rows); } void loadPNG(Bitmap& bitmap, fs::path const& filename) { std::clog << "image/debug: Loading PNG: " + filename.string() << std::endl; // A hack to assume linear premultiplied data if file extension is .premul.png (used for cached SVGs) if (filename.stem().extension() == "premul") bitmap.linearPremul = true; ifstream file(filename, std::ios::binary); png_structp pngPtr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (!pngPtr) throw std::runtime_error("png_create_read_struct failed"); png_infop infoPtr = NULL; struct Cleanup { png_structpp pngPP; png_infopp infoPP; Cleanup(png_structp& pngP, png_infop& infoP): pngPP(&pngP), infoPP(&infoP) {} ~Cleanup() { png_destroy_read_struct(pngPP, infoPP, (png_infopp)NULL); } } cleanup(pngPtr, infoPtr); infoPtr = png_create_info_struct(pngPtr); if (!infoPtr) throw std::runtime_error("png_create_info_struct failed"); std::vector rows; loadPNG_internal(pngPtr, infoPtr, file, bitmap, rows); } void loadJPEG(Bitmap& bitmap, fs::path const& filename) { std::clog << "image/debug: Loading JPEG: " + filename.string() << std::endl; bitmap.fmt = pix::RGB; struct my_jpeg_error_mgr jerr; BinaryBuffer data = readFile(filename); jpeg_decompress_struct cinfo; cinfo.err = jpeg_std_error(&jerr.pub); jerr.pub.error_exit = my_jpeg_error_exit; if (setjmp(jerr.setjmp_buffer)) { jpeg_destroy_decompress(&cinfo); throw std::runtime_error("Error in libjpeg when decoding " + filename.string()); } jpeg_create_decompress(&cinfo); jpeg_mem_src(&cinfo, data.data(), data.size()); if (jpeg_read_header(&cinfo, true) != JPEG_HEADER_OK) throw std::runtime_error("Cannot read header of " + filename.string()); jpeg_start_decompress(&cinfo); bitmap.resize(cinfo.output_width, cinfo.output_height); unsigned stride = (bitmap.width * 3 + 3) & ~3; // Number of bytes per row (word-aligned) unsigned char* ptr = &bitmap.buf[0]; while (cinfo.output_scanline < bitmap.height) { jpeg_read_scanlines(&cinfo, &ptr, 1); ptr += stride; } jpeg_destroy_decompress(&cinfo); } void Bitmap::crop(const unsigned width, const unsigned height, const unsigned x, const unsigned y) { if (ptr) throw std::logic_error("Cannot Bitmap::crop foreign pointers."); if (x + width > this->width || y+ height > this->height) throw std::logic_error("Cannot crop to a size bigger then source image."); unsigned char bpp; switch (fmt) { case pix::INT_ARGB: bpp = 4; break; // Correct? case pix::BGR: bpp = 3; break; case pix::RGB: bpp = 3; break; case pix::CHAR_RGBA: bpp = 4; break; default: throw std::logic_error("Unsupported picture format."); } unsigned newpos = 0; for (unsigned row = y; row < y + height; row++) { for (unsigned col = x; col < x + width; col++) { for (char subp = 0; subp < bpp; subp++) { unsigned oldpos = (row * this->width + col) * bpp + subp; if (oldpos != newpos) { buf[newpos] = buf[oldpos]; } newpos++; } } } this->width = width; this->height = height; } performous-1.1/common/image.hh000066400000000000000000000037541265065420100164610ustar00rootroot00000000000000#pragma once #include #include #include #include #include namespace fs = boost::filesystem; namespace pix { enum Format { INT_ARGB, // Cairo's pixel format (SVG, text): premultiplied linear RGB (BGRA byte order) CHAR_RGBA, // libpng w/ alpha: non-premul sRGB (RGBA byte order) RGB, // libpng w/o alpha, libjpeg, ffmpeg: sRGB (RGB byte order, no padding) BGR // OpenCV/webcam: sRGB (BGR byte order, no padding) }; } struct Bitmap { std::vector buf; // Pixel data if owned by Bitmap unsigned char* ptr; // Pixel data if owned by someone else unsigned width, height; double ar; // Aspect ratio double timestamp; // Used for video frames pix::Format fmt; bool linearPremul; // Is the data linear RGB and premultiplied (as opposed to sRGB and non-premultiplied) bool bottomFirst; // Upside-down (only used for taking screenshots) Bitmap(unsigned char* ptr = NULL): ptr(ptr), width(), height(), ar(), timestamp(), fmt(pix::CHAR_RGBA), linearPremul(), bottomFirst() {} void resize(unsigned w, unsigned h) { if (!ptr) buf.resize(w * h * 4); else buf.clear(); width = w; height = h; ar = double(w) / h; } void swap(Bitmap& b) { if (ptr || b.ptr) throw std::logic_error("Cannot Bitmap::swap foreign pointers."); buf.swap(b.buf); std::swap(width, b.width); std::swap(height, b.height); std::swap(ar, b.ar); std::swap(timestamp, b.timestamp); std::swap(fmt, b.fmt); } unsigned char const* data() const { return ptr ? ptr : &buf[0]; } unsigned char* data() { return ptr ? ptr : &buf[0]; } void crop(const unsigned width, const unsigned height, const unsigned x, const unsigned y); }; // The total number of bytes per line (stride) may be specified. By default no padding at end of line is assumed. void writePNG(fs::path const& filename, Bitmap const& bitmap, unsigned stride = 0); void loadPNG(Bitmap& bitmap, fs::path const& filename); void loadJPEG(Bitmap& bitmap, fs::path const& filename); performous-1.1/data/000077500000000000000000000000001265065420100144665ustar00rootroot00000000000000performous-1.1/data/CMakeLists.txt000066400000000000000000000014531265065420100172310ustar00rootroot00000000000000set(APPLICATION_FILE "performous.desktop") set(PIXMAP_FILE "themes/default/icon.svg") # Install launcher and fonts on system level if(APPLE) install(FILES ${APPLICATION_FILE} DESTINATION "Resources/applications/") install(FILES ${PIXMAP_FILE} DESTINATION "Resources/pixmaps/" RENAME "performous.svg") #file(GLOB FONT_FILES "fonts/*") #install(FILES ${FONT_FILES} DESTINATION "Resources/fonts/truetype/performous") elseif(UNIX) install(FILES ${APPLICATION_FILE} DESTINATION "share/applications/") install(FILES ${PIXMAP_FILE} DESTINATION "share/pixmaps/" RENAME "performous.svg") #file(GLOB FONT_FILES "fonts/*") #install(FILES ${FONT_FILES} DESTINATION "share/fonts/truetype/performous") endif() install(DIRECTORY backgrounds config fonts shaders sounds themes xsl DESTINATION ${SHARE_INSTALL}) performous-1.1/data/backgrounds/000077500000000000000000000000001265065420100167705ustar00rootroot00000000000000performous-1.1/data/backgrounds/blue_band.svg000066400000000000000000002034261265065420100214330ustar00rootroot00000000000000 image/svg+xml performous-1.1/data/backgrounds/classic_bg.svg000066400000000000000000000435221265065420100216100ustar00rootroot00000000000000 image/svg+xml performous-1.1/data/backgrounds/default_bg.svg000066400000000000000000003733101265065420100216140ustar00rootroot00000000000000 image/svg+xml performous-1.1/data/backgrounds/flying_notes.svg000066400000000000000000000406361265065420100222220ustar00rootroot00000000000000 image/svg+xml performous-1.1/data/backgrounds/guitar_bg.svg000066400000000000000000000540541265065420100214640ustar00rootroot00000000000000 image/svg+xml performous-1.1/data/backgrounds/singer_bg.svg000066400000000000000000001044401265065420100214530ustar00rootroot00000000000000 image/svg+xml performous-1.1/data/config/000077500000000000000000000000001265065420100157335ustar00rootroot00000000000000performous-1.1/data/config/controllers.xml000066400000000000000000000500211265065420100210210ustar00rootroot00000000000000 OEM wireless guitar in Guitar Hero I/II/III mode