mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
OP-1263 SDL is now downloaded and installed independently and is not added to Qt anymore
This commit is contained in:
parent
d778e2612c
commit
2ee3780d08
@ -113,10 +113,8 @@ GCS_LIBRARY_PATH
|
||||
data_copy.target = FORCE
|
||||
QMAKE_EXTRA_TARGETS += data_copy
|
||||
}
|
||||
# Windows release only, no debug target DLLs ending with 'd'
|
||||
# It is assumed that SDL.dll can be found in the same directory as mingw32-make.exe
|
||||
win32 {
|
||||
|
||||
win32 {
|
||||
# set debug suffix if needed
|
||||
CONFIG(debug, debug|release):DS = "d"
|
||||
|
||||
@ -227,12 +225,6 @@ GCS_LIBRARY_PATH
|
||||
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_QML]/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline()
|
||||
}
|
||||
|
||||
# copy MinGW DLLs
|
||||
MINGW_DLLS = SDL.dll
|
||||
for(dll, MINGW_DLLS) {
|
||||
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$(QTMINGW)/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline()
|
||||
}
|
||||
|
||||
# copy OpenSSL DLLs
|
||||
OPENSSL_DLLS = \
|
||||
ssleay32.dll \
|
||||
|
18
ground/openpilotgcs/src/libs/sdlgamepad/copydata.pro
Normal file
18
ground/openpilotgcs/src/libs/sdlgamepad/copydata.pro
Normal file
@ -0,0 +1,18 @@
|
||||
equals(copydata, 1) {
|
||||
|
||||
win32 {
|
||||
# copy SDL DLL
|
||||
SDL_DLLS = \
|
||||
SDL.dll
|
||||
for(dll, SDL_DLLS) {
|
||||
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$(SDL_DIR)/bin/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline()
|
||||
}
|
||||
|
||||
# add make target
|
||||
POST_TARGETDEPS += copydata
|
||||
|
||||
data_copy.target = copydata
|
||||
QMAKE_EXTRA_TARGETS += data_copy
|
||||
}
|
||||
|
||||
}
|
@ -1 +1,16 @@
|
||||
macx {
|
||||
# Ensures that SDL framework and header files are found when compiled with Qt5.1.1
|
||||
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
|
||||
SDL = -F/Library/Frameworks
|
||||
# Add SDL to CFLAGS fixes build problems on mac
|
||||
QMAKE_CFLAGS += $$SDL
|
||||
QMAKE_CXXFLAGS += $$SDL
|
||||
# Let the linker know where to find the frameworks
|
||||
LIBS += $$SDL
|
||||
}
|
||||
|
||||
win32 {
|
||||
INCLUDEPATH += $(SDL_DIR)/include
|
||||
}
|
||||
|
||||
LIBS *= -l$$qtLibraryName(sdlgamepad)
|
||||
|
@ -18,30 +18,35 @@
|
||||
# mail.nalla@gmail.com
|
||||
#
|
||||
|
||||
TEMPLATE = lib
|
||||
TARGET = sdlgamepad
|
||||
DEFINES += SDLGAMEPAD_LIBRARY
|
||||
macx {
|
||||
# Workaround to ensure that SDL framework and associated header files are found
|
||||
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
|
||||
SDL = -F/Library/Frameworks
|
||||
# Add SDL to CFLAGS fixes build problems on mac
|
||||
QMAKE_CFLAGS += $$SDL
|
||||
QMAKE_CXXFLAGS += $$SDL
|
||||
# Let the linker know where to find the frameworks
|
||||
LIBS += $$SDL
|
||||
}
|
||||
TEMPLATE = lib
|
||||
TARGET = sdlgamepad
|
||||
DEFINES += SDLGAMEPAD_LIBRARY
|
||||
|
||||
include(../../openpilotgcslibrary.pri)
|
||||
include(../../sdlgamepad.pri)
|
||||
|
||||
SOURCES += sdlgamepad.cpp
|
||||
HEADERS += sdlgamepad.h \
|
||||
sdlgamepad_global.h
|
||||
macx {
|
||||
# Let the linker know where to find the frameworks
|
||||
LIBS += -framework OpenGL -framework SDL -framework Cocoa
|
||||
}
|
||||
|
||||
macx:LIBS += -framework OpenGL -framework SDL -framework Cocoa
|
||||
!macx:LIBS += -lSDL
|
||||
win32 {
|
||||
LIBS += -L$(SDL_DIR)/lib
|
||||
}
|
||||
|
||||
OTHER_FILES += COPYING \
|
||||
README \
|
||||
sdlgamepad.dox \
|
||||
sdlgamepad.doc
|
||||
!mac:LIBS += -lSDL
|
||||
|
||||
SOURCES += \
|
||||
sdlgamepad.cpp
|
||||
|
||||
HEADERS += \
|
||||
sdlgamepad.h \
|
||||
sdlgamepad_global.h
|
||||
|
||||
OTHER_FILES += \
|
||||
COPYING \
|
||||
README \
|
||||
sdlgamepad.dox \
|
||||
sdlgamepad.doc
|
||||
|
||||
include(copydata.pro)
|
||||
|
@ -9,17 +9,6 @@ include(../../plugins/coreplugin/coreplugin.pri)
|
||||
include(../../plugins/uavobjects/uavobjects.pri)
|
||||
include(../../libs/sdlgamepad/sdlgamepad.pri)
|
||||
|
||||
macx {
|
||||
# Ensures that SDL framework and header files are found when compiled with Qt5.1.1
|
||||
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
|
||||
SDL = -F/Library/Frameworks
|
||||
# Add SDL to CFLAGS fixes build problems on mac
|
||||
QMAKE_CFLAGS += $$SDL
|
||||
QMAKE_CXXFLAGS += $$SDL
|
||||
# Let the linker know where to find the frameworks
|
||||
LIBS += $$SDL
|
||||
}
|
||||
|
||||
|
||||
HEADERS += gcscontrolgadget.h \
|
||||
gcscontrolgadgetconfiguration.h \
|
||||
|
@ -78,6 +78,7 @@ else ifeq ($(UNAME), Windows)
|
||||
ARM_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/gcc-arm-none-eabi-4_7-2013q1-20130313-windows.tar.bz2
|
||||
QT_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/qt-5.1.1-windows.tar.bz2
|
||||
NSIS_URL := http://wiki.openpilot.org/download/attachments/18612236/nsis-2.46-unicode.tar.bz2
|
||||
SDL_URL := http://wiki.openpilot.org/download/attachments/18612236/SDL-devel-1.2.15-mingw32.tar.gz
|
||||
OPENSSL_URL := http://wiki.openpilot.org/download/attachments/18612236/openssl-1.0.1e-win32.tar.bz2
|
||||
UNCRUSTIFY_URL := http://wiki.openpilot.org/download/attachments/18612236/uncrustify-0.60-windows.tar.bz2
|
||||
DOXYGEN_URL := http://wiki.openpilot.org/download/attachments/18612236/doxygen-1.8.3.1-windows.tar.bz2
|
||||
@ -91,6 +92,7 @@ QT_SDK_DIR := $(TOOLS_DIR)/qt-5.2.1
|
||||
MINGW_DIR := $(QT_SDK_DIR)/Tools/mingw48_32
|
||||
PYTHON_DIR := $(QT_SDK_DIR)/Tools/mingw48_32/opt/bin
|
||||
NSIS_DIR := $(TOOLS_DIR)/nsis-2.46-unicode
|
||||
SDL_DIR := $(TOOLS_DIR)/SDL-1.2.15
|
||||
OPENSSL_DIR := $(TOOLS_DIR)/openssl-1.0.1e-win32
|
||||
UNCRUSTIFY_DIR := $(TOOLS_DIR)/uncrustify-0.60
|
||||
DOXYGEN_DIR := $(TOOLS_DIR)/doxygen-1.8.3.1
|
||||
@ -106,7 +108,7 @@ QT_SDK_PREFIX := $(QT_SDK_DIR)
|
||||
|
||||
BUILD_SDK_TARGETS := arm_sdk qt_sdk
|
||||
ifeq ($(UNAME), Windows)
|
||||
BUILD_SDK_TARGETS += mingw python nsis openssl
|
||||
BUILD_SDK_TARGETS += mingw sdl python nsis openssl
|
||||
endif
|
||||
ALL_SDK_TARGETS := $(BUILD_SDK_TARGETS) gtest uncrustify doxygen
|
||||
|
||||
@ -401,7 +403,6 @@ endef
|
||||
#
|
||||
# Qt SDK
|
||||
#
|
||||
# Windows: native binary package has been provided
|
||||
# Mac OS X: user should install native Qt SDK package
|
||||
#
|
||||
##############################
|
||||
@ -555,6 +556,28 @@ nsis_version:
|
||||
|
||||
endif
|
||||
|
||||
##############################
|
||||
#
|
||||
# SDL (Windows only)
|
||||
#
|
||||
##############################
|
||||
|
||||
ifeq ($(UNAME), Windows)
|
||||
|
||||
$(eval $(call TOOL_INSTALL_TEMPLATE,sdl,$(SDL_DIR),$(SDL_URL),$(notdir $(SDL_URL))))
|
||||
|
||||
ifeq ($(shell [ -d "$(SDL_DIR)" ] && $(ECHO) "exists"), exists)
|
||||
export SDL_DIR := $(SDL_DIR)
|
||||
else
|
||||
# not installed, hope it's in the path...
|
||||
$(info $(EMPTY) WARNING $(call toprel, $(SDL_DIR)) not found (make sdl_install), using system PATH)
|
||||
endif
|
||||
|
||||
.PHONY: sdl_version
|
||||
sdl_version:
|
||||
-$(V1) $(ECHO) "SDL 1.2.15 $(SDL_DIR)"
|
||||
endif
|
||||
|
||||
##############################
|
||||
#
|
||||
# OpenSSL (Windows only)
|
||||
|
Loading…
x
Reference in New Issue
Block a user