Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
55491754
Commit
55491754
authored
Feb 20, 2011
by
James Goppert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added cmake build system. Almost working.
parent
95679555
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
748 additions
and
3 deletions
+748
-3
.gitignore
.gitignore
+2
-0
.gitmodules
.gitmodules
+3
-3
CMakeLists.txt
CMakeLists.txt
+486
-0
FindMAVLINK.cmake
CMakeModules/FindMAVLINK.cmake
+20
-0
FindPhonon.cmake
CMakeModules/FindPhonon.cmake
+71
-0
LibFindMacros.cmake
CMakeModules/LibFindMacros.cmake
+98
-0
autobuild.sh
autobuild.sh
+62
-0
createTags
createTags
+5
-0
mavlink
thirdParty/mavlink
+1
-0
No files found.
.gitignore
View file @
55491754
*.swp
CMakeFiles
*Makefile*
tags
build
...
...
.gitmodules
View file @
55491754
[submodule "
MAVL
ink"]
path =
MAVL
ink
url =
git
://github.com/pixhawk/mavlink.git
[submodule "
thirdParty/mavl
ink"]
path =
thirdParty/mavl
ink
url =
https
://github.com/pixhawk/mavlink.git
CMakeLists.txt
0 → 100644
View file @
55491754
This diff is collapsed.
Click to expand it.
CMakeModules/FindMAVLINK.cmake
0 → 100644
View file @
55491754
# - 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
)
CMakeModules/FindPhonon.cmake
0 → 100644
View file @
55491754
# 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
}
"
)
message
(
STATUS
"Phonon Version:
${
PHONON_VERSION
}
"
)
endmacro
(
_phonon_find_version
)
if
(
PHONON_FOUND
)
# Already found, nothing more to do except figuring out the version
_phonon_find_version
()
else
(
PHONON_FOUND
)
if
(
PHONON_INCLUDE_DIR AND PHONON_LIBRARY
)
set
(
PHONON_FIND_QUIETLY TRUE
)
endif
(
PHONON_INCLUDE_DIR AND PHONON_LIBRARY
)
# As discussed on kde-buildsystem: first look at CMAKE_PREFIX_PATH, then at the suggested PATHS (kde4 install dir)
find_library
(
PHONON_LIBRARY NAMES phonon phonon4 PATHS
${
KDE4_LIB_INSTALL_DIR
}
${
QT_LIBRARY_DIR
}
NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH
)
# then at the default system locations (CMAKE_SYSTEM_PREFIX_PATH, i.e. /usr etc.)
find_library
(
PHONON_LIBRARY NAMES phonon phonon4
)
find_path
(
PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h PATHS
${
KDE4_INCLUDE_INSTALL_DIR
}
${
QT_INCLUDE_DIR
}
${
INCLUDE_INSTALL_DIR
}
${
QT_LIBRARY_DIR
}
NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH
)
find_path
(
PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h
)
if
(
PHONON_INCLUDE_DIR AND PHONON_LIBRARY
)
set
(
PHONON_LIBS
${
phonon_LIB_DEPENDS
}
${
PHONON_LIBRARY
}
)
set
(
PHONON_INCLUDES
${
PHONON_INCLUDE_DIR
}
/KDE
${
PHONON_INCLUDE_DIR
}
)
set
(
PHONON_FOUND TRUE
)
_phonon_find_version
()
else
(
PHONON_INCLUDE_DIR AND PHONON_LIBRARY
)
set
(
PHONON_FOUND FALSE
)
endif
(
PHONON_INCLUDE_DIR AND PHONON_LIBRARY
)
if
(
PHONON_FOUND
)
if
(
NOT PHONON_FIND_QUIETLY
)
message
(
STATUS
"Found Phonon:
${
PHONON_LIBRARY
}
"
)
message
(
STATUS
"Found Phonon Includes:
${
PHONON_INCLUDES
}
"
)
endif
(
NOT PHONON_FIND_QUIETLY
)
else
(
PHONON_FOUND
)
if
(
Phonon_FIND_REQUIRED
)
if
(
NOT PHONON_INCLUDE_DIR
)
message
(
STATUS
"Phonon includes NOT found!"
)
endif
(
NOT PHONON_INCLUDE_DIR
)
if
(
NOT PHONON_LIBRARY
)
message
(
STATUS
"Phonon library NOT found!"
)
endif
(
NOT PHONON_LIBRARY
)
message
(
FATAL_ERROR
"Phonon library or includes NOT found!"
)
else
(
Phonon_FIND_REQUIRED
)
message
(
STATUS
"Unable to find Phonon"
)
endif
(
Phonon_FIND_REQUIRED
)
endif
(
PHONON_FOUND
)
mark_as_advanced
(
PHONON_INCLUDE_DIR PHONON_LIBRARY PHONON_INCLUDES
)
endif
(
PHONON_FOUND
)
CMakeModules/LibFindMacros.cmake
0 → 100644
View file @
55491754
# 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.
\n
Install 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
)
autobuild.sh
0 → 100755
View file @
55491754
#!/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
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
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 libboost-all-dev libopenscenegraph-dev
sudo
apt-get
install
scicoslab-gtk
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
mkdir
-p
build
&&
cd
build
&&
cmake ..
&&
make package_source
exit
0
elif
[
$OPT
=
"package"
]
&> /dev/null
then
echo
you chose to package the binary
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
createTags
0 → 100755
View file @
55491754
#!/bin/bash
ctags
-RV
--c
++-kinds
=
+p
--fields
=
+iaS
--extra
=
+q
\
.
\
/usr/include/qt4
\
/usr/include/osg
*
mavlink
@
50ad6bf2
Subproject commit 50ad6bf278b87a105adb4887b5338daa2940f0c6
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment