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
e91bbca1
Commit
e91bbca1
authored
Nov 10, 2018
by
Daniel Agar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake OSX fixes
parent
7e11e615
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
48 additions
and
67 deletions
+48
-67
CMakeLists.txt
CMakeLists.txt
+21
-8
Macdeployqt.cmake
cmake/Macdeployqt.cmake
+0
-42
CMakeLists.txt
src/CMakeLists.txt
+11
-5
CMakeLists.txt
src/Joystick/CMakeLists.txt
+9
-7
CMakeLists.txt
src/MissionManager/CMakeLists.txt
+1
-2
CMakeLists.txt
src/QmlControls/CMakeLists.txt
+1
-1
CMakeLists.txt
src/Vehicle/CMakeLists.txt
+2
-0
CMakeLists.txt
src/ui/CMakeLists.txt
+3
-2
No files found.
CMakeLists.txt
View file @
e91bbca1
...
...
@@ -16,8 +16,8 @@ if(DEFINED ENV{QT_VERSION})
endif
()
if
(
NOT QT_VERSION
)
# try Qt 5.11.
0
if none specified
set
(
QT_VERSION
"5.11.
1
"
)
# try Qt 5.11.
2
if none specified
set
(
QT_VERSION
"5.11.
2
"
)
endif
()
if
(
DEFINED ENV{QT_MKSPEC}
)
...
...
@@ -206,6 +206,10 @@ endif()
target_link_libraries
(
QGroundControl PRIVATE qgc
)
if
(
BUILD_TESTING
)
target_link_libraries
(
QGroundControl PRIVATE Qt5::Test
)
endif
()
if
(
NOT QT_MKSPEC MATCHES
"winrt"
)
target_link_libraries
(
QGroundControl
PUBLIC
...
...
@@ -216,13 +220,22 @@ endif()
if
(
LINUX
)
elseif
(
APPLE
)
set_target_properties
(
${
PROJECT_NAME
}
PROPERTIES
MACOSX_BUNDLE YES
get_target_property
(
_qmake_executable Qt5::qmake IMPORTED_LOCATION
)
get_filename_component
(
_qt_bin_dir
"
${
_qmake_executable
}
"
DIRECTORY
)
find_program
(
MACDEPLOYQT_EXECUTABLE macdeployqt HINTS
"
${
_qt_bin_dir
}
"
)
add_custom_command
(
TARGET QGroundControl
POST_BUILD
COMMAND
${
MACDEPLOYQT_EXECUTABLE
}
$<TARGET_FILE_DIR:QGroundControl>/../.. -appstore-compliant -qmldir=
${
CMAKE_SOURCE_DIR
}
/src
COMMAND
rsync -a
${
CMAKE_SOURCE_DIR
}
/libs/lib/Frameworks $<TARGET_FILE_DIR:QGroundControl>/../../Contents/
COMMAND
${
CMAKE_INSTALL_NAME_TOOL
}
-change
"@rpath/SDL2.framework/Versions/A/SDL2"
"@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2"
$<TARGET_FILE:QGroundControl>
)
# deploy
include
(
Macdeployqt
)
macdeployqt
(
QGroundControl
)
set_target_properties
(
QGroundControl PROPERTIES MACOSX_BUNDLE YES
)
elseif
(
WIN32
)
...
...
cmake/Macdeployqt.cmake
deleted
100644 → 0
View file @
7e11e615
# The MIT License (MIT)
#
# Copyright (c) 2017 Nathan Osman
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
find_package
(
Qt5Core REQUIRED
)
# Retrieve the absolute path to qmake and then use that path to find
# the macdeployqt binary
get_target_property
(
_qmake_executable Qt5::qmake IMPORTED_LOCATION
)
get_filename_component
(
_qt_bin_dir
"
${
_qmake_executable
}
"
DIRECTORY
)
find_program
(
MACDEPLOYQT_EXECUTABLE macdeployqt HINTS
"
${
_qt_bin_dir
}
"
)
# Add commands that copy the required Qt files to the application bundle
# represented by the target
function
(
macdeployqt target
)
add_custom_command
(
TARGET
${
target
}
POST_BUILD
COMMAND
"
${
MACDEPLOYQT_EXECUTABLE
}
"
\
"$<TARGET_FILE_DIR:
${
target
}
>/../..
\"
-always-overwrite
COMMENT "
Deploying Qt...
"
)
endfunction()
mark_as_advanced(MACDEPLOYQT_EXECUTABLE)
src/CMakeLists.txt
View file @
e91bbca1
...
...
@@ -65,8 +65,6 @@ endif()
add_library
(
qgc
${
QGC_RESOURCES
}
${
EXTRA_SRC
}
CmdLineOptParser.cc
...
...
@@ -95,11 +93,13 @@ add_library(qgc
# UI
QGCQmlWidgetHolder.ui
QGCQmlWidgetHolder.h
)
set_source_files_properties
(
QGCApplication.cc PROPERTIES COMPILE_DEFINITIONS GIT_VERSION=
"
${
git_tag
}
"
)
add_subdirectory
(
ui
)
add_subdirectory
(
Airmap
)
add_subdirectory
(
AnalyzeView
)
add_subdirectory
(
api
)
...
...
@@ -121,7 +121,6 @@ add_subdirectory(QtLocationPlugin)
add_subdirectory
(
Settings
)
add_subdirectory
(
Terrain
)
add_subdirectory
(
uas
)
add_subdirectory
(
ui
)
add_subdirectory
(
Vehicle
)
add_subdirectory
(
VehicleSetup
)
add_subdirectory
(
VideoStreaming
)
...
...
@@ -166,4 +165,11 @@ if(BUILD_TESTING)
target_link_libraries
(
qgc PUBLIC qgcunittest
)
endif
()
target_include_directories
(
qgc INTERFACE
${
CMAKE_CURRENT_SOURCE_DIR
}
)
target_include_directories
(
qgc
PUBLIC
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
/ui/ui_autogen/include
# HACK: AUTOUIC paths not inheriting?
${
CMAKE_CURRENT_BINARY_DIR
}
/ui/ui_autogen/include_Debug
${
CMAKE_CURRENT_BINARY_DIR
}
/qgc_autogen/include
# HACK: AUTOUIC paths not inheriting?
${
CMAKE_CURRENT_BINARY_DIR
}
/qgc_autogen/include_Debug
)
src/Joystick/CMakeLists.txt
View file @
e91bbca1
...
...
@@ -15,8 +15,11 @@ add_library(Joystick
)
target_link_libraries
(
Joystick
PRIVATE
ui
PUBLIC
qgc
ui
)
target_include_directories
(
Joystick PUBLIC
${
CMAKE_CURRENT_SOURCE_DIR
}
)
...
...
@@ -27,10 +30,9 @@ if(LINUX)
string
(
STRIP
${
SDL2_LIBRARIES
}
SDL2_LIBRARIES
)
# work around for cmake warning
target_link_libraries
(
Joystick PRIVATE
${
SDL2_LIBRARIES
}
)
elseif
(
APPLE
)
include_directories
(
libs/lib/Frameworks/SDL2.framework/Headers
)
include_directories
(
${
CMAKE_SOURCE_DIR
}
/
libs/lib/Frameworks/SDL2.framework/Headers
)
target_link_libraries
(
Joystick PRIVATE -F
${
CMAKE_SOURCE_DIR
}
/libs/lib/Frameworks
"-framework SDL2"
)
set_target_properties
(
${
PROJECT_NAME
}
PROPERTIES
set_target_properties
(
Joystick PROPERTIES
MACOSX_BUNDLE YES
)
elseif
(
WIN32
)
...
...
src/MissionManager/CMakeLists.txt
View file @
e91bbca1
...
...
@@ -67,10 +67,9 @@ add_library(MissionManager
target_link_libraries
(
MissionManager
PUBLIC
Qt5::Xml
qgc
PRIVATE
qgc
ui
)
target_include_directories
(
MissionManager INTERFACE
${
CMAKE_CURRENT_SOURCE_DIR
}
)
src/QmlControls/CMakeLists.txt
View file @
e91bbca1
...
...
@@ -15,7 +15,7 @@ add_library(QmlControls
)
target_link_libraries
(
QmlControls
PRIVATE
PUBLIC
qgc
FactSystem
...
...
src/Vehicle/CMakeLists.txt
View file @
e91bbca1
...
...
@@ -16,6 +16,8 @@ add_library(Vehicle
)
target_link_libraries
(
Vehicle
PRIVATE
ui
PUBLIC
qgc
)
...
...
src/ui/CMakeLists.txt
View file @
e91bbca1
...
...
@@ -50,8 +50,9 @@ add_library(ui
)
target_link_libraries
(
ui
P
RIVATE
P
UBLIC
qgc
PRIVATE
qwt
)
...
...
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