From f4758e8b15cd30fe3f7f18de42e2ea20bc5696f0 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 17 Sep 2013 11:30:01 +0200 Subject: remove libusbmuxd sources and adapt source tree to use autotools libusbmuxd has been split off and is now managed in a separate repository. By the time of this commit, the repository is: git clone http://git.sukimashita.com/libusbmuxd.git --- Modules/CheckConstantExists.cmake | 38 --------------- Modules/FindInotify.cmake | 11 ----- Modules/FindPLIST.cmake | 31 ------------ Modules/FindUSB.cmake | 40 ---------------- Modules/LibFindMacros.cmake | 99 --------------------------------------- Modules/VersionTag.cmake | 13 ----- Modules/cmake_uninstall.cmake.in | 21 --------- Modules/describe.sh | 17 ------- 8 files changed, 270 deletions(-) delete mode 100644 Modules/CheckConstantExists.cmake delete mode 100644 Modules/FindInotify.cmake delete mode 100644 Modules/FindPLIST.cmake delete mode 100644 Modules/FindUSB.cmake delete mode 100644 Modules/LibFindMacros.cmake delete mode 100644 Modules/VersionTag.cmake delete mode 100644 Modules/cmake_uninstall.cmake.in delete mode 100755 Modules/describe.sh (limited to 'Modules') diff --git a/Modules/CheckConstantExists.cmake b/Modules/CheckConstantExists.cmake deleted file mode 100644 index 3d6d97e..0000000 --- a/Modules/CheckConstantExists.cmake +++ /dev/null @@ -1,38 +0,0 @@ -# - Check if the given constant exists (as an enum, define, or whatever) -# CHECK_CONSTANT_EXISTS (CONSTANT HEADER VARIABLE) -# -# CONSTANT - the name of the constant you are interested in -# HEADER - the header(s) where the prototype should be declared -# VARIABLE - variable to store the result -# -# The following variables may be set before calling this macro to -# modify the way the check is run: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories -# -# Example: CHECK_CONSTANT_EXISTS(O_NOFOLLOW fcntl.h HAVE_O_NOFOLLOW) - - -INCLUDE(CheckCSourceCompiles) - -MACRO (CHECK_CONSTANT_EXISTS _CONSTANT _HEADER _RESULT) - SET(_INCLUDE_FILES) - FOREACH (it ${_HEADER}) - SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") - ENDFOREACH (it) - - SET(_CHECK_CONSTANT_SOURCE_CODE " -${_INCLUDE_FILES} -void cmakeRequireConstant(int dummy,...){(void)dummy;} -int main() -{ - cmakeRequireConstant(0,${_CONSTANT}); - return 0; -} -") - CHECK_C_SOURCE_COMPILES("${_CHECK_CONSTANT_SOURCE_CODE}" ${_RESULT}) - -ENDMACRO (CHECK_CONSTANT_EXISTS) - diff --git a/Modules/FindInotify.cmake b/Modules/FindInotify.cmake deleted file mode 100644 index 90496d4..0000000 --- a/Modules/FindInotify.cmake +++ /dev/null @@ -1,11 +0,0 @@ -set(INOTIFY_H "NOTFOUND") -find_file(INOTIFY_H - "sys/inotify.h" - PATHS ENV INCLUDE -) - -if (INOTIFY_H) - set(INOTIFY_FOUND TRUE) -else() - set(INOTIFY_FOUND FALSE) -endif() diff --git a/Modules/FindPLIST.cmake b/Modules/FindPLIST.cmake deleted file mode 100644 index d51aa74..0000000 --- a/Modules/FindPLIST.cmake +++ /dev/null @@ -1,31 +0,0 @@ -# - Try to find libplist -# Once done, this will define -# -# PLIST_FOUND - system has libplist -# PLIST_INCLUDE_DIRS - the libplist include directories -# PLIST_LIBRARIES - link these to use libplist - -include(LibFindMacros) - -# Dependencies - -# Use pkg-config to get hints about paths -libfind_pkg_check_modules(PLIST_PKGCONF libplist >= 0.15) - -# Include dir -find_path(PLIST_INCLUDE_DIR - NAMES plist/plist.h - PATHS ${PLIST_PKGCONF_INCLUDE_DIRS} -) - -# Finally the library itself -find_library(PLIST_LIBRARY - NAMES plist - PATHS ${PLIST_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 that this lib depends on. -set(PLIST_PROCESS_INCLUDES PLIST_INCLUDE_DIR) -set(PLIST_PROCESS_LIBS PLIST_LIBRARY) -libfind_process(PLIST) diff --git a/Modules/FindUSB.cmake b/Modules/FindUSB.cmake deleted file mode 100644 index 486864f..0000000 --- a/Modules/FindUSB.cmake +++ /dev/null @@ -1,40 +0,0 @@ -# - Try to find libusb-1.0 -# Once done, this will define -# -# USB_FOUND - system has libusb-1.0 -# USB_INCLUDE_DIRS - the libusb-1.0 include directories -# USB_LIBRARIES - link these to use libusb-1.0 - -include(LibFindMacros) - -# Dependencies - -# pkg-config + libusb fails on FreeBSD, though libusb is in base -if(NOT(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")) - # Use pkg-config to get hints about paths - libfind_pkg_check_modules(USB_PKGCONF libusb-1.0>=1.0.3) - # We want to look for libusb-1.0 - set(USB_LIBRARY_NAME usb-1.0) -else() - set(USB_PKGCONF_INCLUDE_DIRS /usr/include) - set(USB_PKGCONF_LIBRARY_DIRS /usr/lib) - set(USB_LIBRARY_NAME usb) -endif() - -# Include dir -find_path(USB_INCLUDE_DIR - NAMES libusb.h - PATHS ${USB_PKGCONF_INCLUDE_DIRS} -) - -# Finally the library itself -find_library(USB_LIBRARY - NAMES ${USB_LIBRARY_NAME} - PATHS ${USB_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(USB_PROCESS_INCLUDES USB_INCLUDE_DIR) -set(USB_PROCESS_LIBS USB_LIBRARY) -libfind_process(USB) diff --git a/Modules/LibFindMacros.cmake b/Modules/LibFindMacros.cmake deleted file mode 100644 index 795d6b7..0000000 --- a/Modules/LibFindMacros.cmake +++ /dev/null @@ -1,99 +0,0 @@ -# Works the same as find_package, but forwards the "REQUIRED" and "QUIET" arguments -# used for the current package. For this to work, the first parameter must be the -# prefix of the current package, then the prefix of the new package etc, which are -# passed to find_package. -macro (libfind_package PREFIX) - set (LIBFIND_PACKAGE_ARGS ${ARGN}) - if (${PREFIX}_FIND_QUIETLY) - set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} QUIET) - endif (${PREFIX}_FIND_QUIETLY) - if (${PREFIX}_FIND_REQUIRED) - set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED) - endif (${PREFIX}_FIND_REQUIRED) - find_package(${LIBFIND_PACKAGE_ARGS}) -endmacro (libfind_package) - -# Damn CMake developers made the UsePkgConfig system deprecated in the same release (2.6) -# where they added pkg_check_modules. Consequently I need to support both in my scripts -# to avoid those deprecated warnings. Here's a helper that does just that. -# Works identically to pkg_check_modules, except that no checks are needed prior to use. -macro (libfind_pkg_check_modules PREFIX PKGNAME) - if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - include(UsePkgConfig) - pkgconfig(${PKGNAME} ${PREFIX}_INCLUDE_DIRS ${PREFIX}_LIBRARY_DIRS ${PREFIX}_LDFLAGS ${PREFIX}_CFLAGS) - else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND) - pkg_check_modules(${PREFIX} ${PKGNAME}) - endif (PKG_CONFIG_FOUND) - endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) -endmacro (libfind_pkg_check_modules) - -# 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. -macro (libfind_process PREFIX) - # Skip processing if already processed during this run - if (NOT ${PREFIX}_FOUND) - # Start with the assumption that the library was found - set (${PREFIX}_FOUND TRUE) - - # Process all includes and set _FOUND to false if any are missing - foreach (i ${${PREFIX}_PROCESS_INCLUDES}) - if (${i}) - set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${i}}) - mark_as_advanced(${i}) - else (${i}) - set (${PREFIX}_FOUND FALSE) - endif (${i}) - endforeach (i) - - # Process all libraries and set _FOUND to false if any are missing - foreach (i ${${PREFIX}_PROCESS_LIBS}) - if (${i}) - set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${i}}) - mark_as_advanced(${i}) - else (${i}) - set (${PREFIX}_FOUND FALSE) - endif (${i}) - endforeach (i) - - # Print message and/or exit on fatal error - if (${PREFIX}_FOUND) - if (NOT ${PREFIX}_FIND_QUIETLY) - message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}") - endif (NOT ${PREFIX}_FIND_QUIETLY) - else (${PREFIX}_FOUND) - if (${PREFIX}_FIND_REQUIRED) - foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS}) - message("${i}=${${i}}") - endforeach (i) - message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.") - endif (${PREFIX}_FIND_REQUIRED) - endif (${PREFIX}_FOUND) - endif (NOT ${PREFIX}_FOUND) -endmacro (libfind_process) - -macro(libfind_library PREFIX basename) - set(TMP "") - if(MSVC80) - set(TMP -vc80) - endif(MSVC80) - if(MSVC90) - set(TMP -vc90) - endif(MSVC90) - set(${PREFIX}_LIBNAMES ${basename}${TMP}) - if(${ARGC} GREATER 2) - set(${PREFIX}_LIBNAMES ${basename}${TMP}-${ARGV2}) - string(REGEX REPLACE "\\." "_" TMP ${${PREFIX}_LIBNAMES}) - set(${PREFIX}_LIBNAMES ${${PREFIX}_LIBNAMES} ${TMP}) - endif(${ARGC} GREATER 2) - find_library(${PREFIX}_LIBRARY - NAMES ${${PREFIX}_LIBNAMES} - PATHS ${${PREFIX}_PKGCONF_LIBRARY_DIRS} - ) -endmacro(libfind_library) - diff --git a/Modules/VersionTag.cmake b/Modules/VersionTag.cmake deleted file mode 100644 index 682ab3e..0000000 --- a/Modules/VersionTag.cmake +++ /dev/null @@ -1,13 +0,0 @@ -execute_process( - COMMAND "sh" "${CMAKE_SOURCE_DIR}/Modules/describe.sh" - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" - OUTPUT_VARIABLE DESCRIBE - OUTPUT_STRIP_TRAILING_WHITESPACE -) - -if(DESCRIBE STREQUAL "") - set (VERSION_TAG "UNKNOWN") -else() - string(REGEX REPLACE "^v" "" VERSION_TAG "${DESCRIBE}") -endif() - diff --git a/Modules/cmake_uninstall.cmake.in b/Modules/cmake_uninstall.cmake.in deleted file mode 100644 index 4bfb0bf..0000000 --- a/Modules/cmake_uninstall.cmake.in +++ /dev/null @@ -1,21 +0,0 @@ -IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") - MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") -ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") - -FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) -STRING(REGEX REPLACE "\n" ";" files "${files}") -FOREACH(file ${files}) - MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") - IF(EXISTS "$ENV{DESTDIR}${file}") - EXEC_PROGRAM( - "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" - OUTPUT_VARIABLE rm_out - RETURN_VALUE rm_retval - ) - IF(NOT "${rm_retval}" STREQUAL 0) - MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") - ENDIF(NOT "${rm_retval}" STREQUAL 0) - ELSE(EXISTS "$ENV{DESTDIR}${file}") - MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") - ENDIF(EXISTS "$ENV{DESTDIR}${file}") -ENDFOREACH(file) diff --git a/Modules/describe.sh b/Modules/describe.sh deleted file mode 100755 index 6425ed5..0000000 --- a/Modules/describe.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# Check for git and a git repo. -if head=`git rev-parse --verify HEAD 2>/dev/null`; then - /bin/echo -n `git describe` - - # Are there uncommitted changes? - git update-index --refresh --unmerged > /dev/null - git diff-index --quiet HEAD || /bin/echo -n -dirty -else -# Check for version tag - if [ -e version.tag ]; then - /bin/echo -n `cat version.tag` - fi -fi - -echo -- cgit v1.1-32-gdbae