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
10163483
Commit
10163483
authored
Feb 23, 2011
by
James Goppert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added path fo FindPhonon script.
parent
caab6b36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
46 deletions
+12
-46
CMakeLists.txt
CMakeLists.txt
+1
-1
FindPhonon.cmake
CMakeModules/FindPhonon.cmake
+11
-45
No files found.
CMakeLists.txt
View file @
10163483
...
...
@@ -214,7 +214,7 @@ else()
endif
(
QT4_FOUND
)
if
(
PHONON_FOUND
)
message
(
STATUS
"
\t\t
PHONON
\t\t
YES"
)
list
(
APPEND qgroundcontrolIncludes
${
PHONON_INCLUDE
_DIR
}
/phonon
)
list
(
APPEND qgroundcontrolIncludes
${
PHONON_INCLUDE
S
}
)
list
(
APPEND qgroundcontrolLibs
${
PHONON_LIBS
}
)
else
()
message
(
STATUS
"
\t\t
PHONON
\t\t
NO"
)
...
...
CMakeModules/FindPhonon.cmake
View file @
10163483
...
...
@@ -19,53 +19,19 @@ macro(_phonon_find_version)
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 /usr/lib
${
KDE4_LIB_INSTALL_DIR
}
${
QT_LIBRARY_DIR
}
)
# 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 /usr/include
${
KDE4_INCLUDE_INSTALL_DIR
}
${
QT_INCLUDE_DIR
}
${
INCLUDE_INSTALL_DIR
}
${
QT_LIBRARY_DIR
}
)
find_path
(
PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h
)
# 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
}
/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
)
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 PHONON_INCLUDES
)
endif
(
PHONON_FOUND
)
mark_as_advanced
(
PHONON_INCLUDE_DIR PHONON_LIBRARY
)
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