Commit eacd30e2 authored by Lorenz Meier's avatar Lorenz Meier

Removed CMake files as support for CMake was largely unmaintained

parent 31696fda
This diff is collapsed.
FIND_PATH(FLITE_INCLUDE_DIR flite/flite.h)
FIND_LIBRARY(FLITE_MAIN_LIB NAMES flite)
FIND_LIBRARY(FLITE_CMULEX_LIB NAMES flite_cmulex)
FIND_LIBRARY(FLITE_CMU_US_KAL_LIB NAMES flite_cmu_us_kal)
FIND_LIBRARY(FLITE_US_ENGLISH_LIB NAMES flite_usenglish)
SET(FLITE_LIBRARIES
${FLITE_MAIN_LIB}
${FLITE_CMULEX_LIB}
${FLITE_CMU_US_KAL_LIB}
${FLITE_US_ENGLISH_LIB}
)
IF(FLITE_INCLUDE_DIR AND FLITE_LIBRARIES)
SET(FLITE_FOUND TRUE)
ENDIF(FLITE_INCLUDE_DIR AND FLITE_LIBRARIES)
IF(FLITE_FOUND)
IF (NOT Flite_FIND_QUIETLY)
MESSAGE(STATUS "Found flite includes: ${FLITE_INCLUDE_DIR}/flite/flite.h")
MESSAGE(STATUS "Found flite library: ${FLITE_LIBRARIES}")
ENDIF (NOT Flite_FIND_QUIETLY)
ELSE(FLITE_FOUND)
IF (Flite_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could NOT find flite development files")
ENDIF (Flite_FIND_REQUIRED)
ENDIF(FLITE_FOUND)
# - Try to find MAVLINK
# Once done, this will define
#
# MAVLINK_FOUND - system has scicoslab
# MAVLINK_INCLUDE_DIRS - the scicoslab include directories
include(LibFindMacros)
# Include dir
find_path(MAVLINK_INCLUDE_DIR
NAMES mavlink_types.h
PATHS
/usr/include/mavlink
/usr/local/include/mavlink
)
# 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(MAVLINK_PROCESS_INCLUDES MAVLINK_INCLUDE_DIR)
libfind_process(MAVLINK)
# Find libphonon
# Once done this will define
#
# PHONON_FOUND - system has Phonon Library
# PHONON_INCLUDES - the Phonon include directory
# PHONON_LIBS - link these to use Phonon
# PHONON_VERSION - the version of the Phonon Library
# Copyright (c) 2008, Matthias Kretz <kretz@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
macro(_phonon_find_version)
set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/phonon/phononnamespace.h")
if (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
endif (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
file(READ ${_phonon_namespace_header_file} _phonon_header LIMIT 5000 OFFSET 1000)
string(REGEX MATCH "define PHONON_VERSION_STR \"(4\\.[0-9]+\\.[0-9a-z]+)\"" _phonon_version_match "${_phonon_header}")
set(PHONON_VERSION "${CMAKE_MATCH_1}")
endmacro(_phonon_find_version)
# the dirs listed with HINTS are searched before the default sets of dirs
find_library(PHONON_LIBRARY NAMES phonon HINTS ${KDE4_LIB_INSTALL_DIR} ${QT_LIBRARY_DIR})
find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h HINTS ${KDE4_INCLUDE_INSTALL_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ${QT_LIBRARY_DIR})
if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY})
set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR}/phonon ${PHONON_INCLUDE_DIR}/KDE ${PHONON_INCLUDE_DIR})
_phonon_find_version()
endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Phonon DEFAULT_MSG PHONON_INCLUDE_DIR PHONON_LIBRARY)
mark_as_advanced(PHONON_INCLUDE_DIR PHONON_LIBRARY)
# - Try to find QSERIALPORT
# Once done, this will define
#
# QSERIALPORT_FOUND - system has scicoslab
# QSERIALPORT_INCLUDE_DIRS - the scicoslab include directories
# QSERIALPORT_LIBRARIES - libraries to link to
include(LibFindMacros)
# Include dir
find_path(QSERIALPORT_INCLUDE_DIR
NAMES QSerialPort
PATHS
/usr/include/QtSerialPort
/usr/local/include/QtSerialPort
/usr/local/qserialport/include/QtSerialPort
)
# Finally the library itself
find_library(QSERIALPORT_LIBRARY
NAMES
QtSerialPort
PATHS
/usr/lib
/usr/local/lib
/usr/local/qserialport/lib
)
# 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(QSERIALPORT_PROCESS_INCLUDES QSERIALPORT_INCLUDE_DIR)
set(QSERIALPORT_PROCESS_LIBS QSERIALPORT_LIBRARY QSERIALPORT_LIBRARIES)
libfind_process(QSERIALPORT)
# 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)
# 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)
#!/bin/bash
PS3='Please enter your choice: '
LIST="in_source_build install_build grab_debian_dependencies package_source package remake clean END"
MAKEARGS="-j8"
echo
echo in_source_build: is used for development and you can start the scicoslab toolbox by typing scicoslab in the oooark source directory
echo install_build: is used for building before final installation to the system.
echo grab_debian_dependencies: installs all the required packages for debian based systems \(ubuntu maverick/ debian squeeze,lenny\)
echo remake: calls make again after project has been configured as install or in source build
echo package_source: creates a source package for distribution
echo package: creates binary packages for distribution
echo clean: removes the build directory
echo
select OPT in $LIST
do
if [ $OPT = "in_source_build" ] &> /dev/null
then
echo you chose in source build
git submodule init && git submodule update && mkdir -p build && cd build && cmake -DIN_SRC_BUILD:bool=TRUE .. && make $MAKEARGS
exit 0
elif [ $OPT = "install_build" ] &> /dev/null
then
echo you chose install build
git submodule init && git submodule update mkdir -p build && cd build && cmake .. && make $MAKEARGS
exit 0
elif [ $OPT = "grab_debian_dependencies" ] &> /dev/null
then
echo you chose to install debian dependencies
sudo apt-get install cmake libqt4-dev flite1-dev libphonon-dev libopenscenegraph-dev libsdl1.2-dev
exit 0
elif [ $OPT = "remake" ] &> /dev/null
then
echo you chose to recall make on the previously configured build
cd build && make $MAKEARGS
exit 0
elif [ $OPT = "package_source" ] &> /dev/null
then
echo you chose to package the source
git submodule init && git submodule update && mkdir -p build && cd build && cmake .. && make package_source
exit 0
elif [ $OPT = "package" ] &> /dev/null
then
echo you chose to package the binary
git submodule init && git submodule update && mkdir -p build && cd build && cmake .. && make package
exit 0
elif [ $OPT = "clean" ] &> /dev/null
then
echo you chose to clean the build
rm -rf build
elif [ $OPT = "END" ] &> /dev/null
then
exit 0
fi
done
#!/bin/bash
astyle --style=k/r $(find src -regex ".*\.\(cpp\|cc\|h\|hpp\)")
rm -f $(find . -regex '.*orig$')
git commit
designer
.lib
.pdb
d4.dll
\ No newline at end of file
#!/bin/bash
ctags -RV --c++-kinds=+p --fields=+iaS --extra=+q \
. \
/usr/include/qt4 \
/usr/include/osg*
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment