Skip to content

Commit

Permalink
@curlymorphic suggestions :)
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed Sep 21, 2015
1 parent 5704db0 commit b83006b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@ ELSE(LMMS_BUILD_WIN32)
ENDIF(LMMS_BUILD_WIN32)


# TODO: Fix linking issues with msys debug builds
IF(LMMS_BUILD_MSYS AND CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(WANT_GIG OFF)
SET(WANT_STK OFF)
SET(WANT_SWH OFF)
SET(STATUS_GIG "not built as requested")
SET(STATUS_STK "not built as requested")
ENDIF()


CHECK_INCLUDE_FILES(stdint.h LMMS_HAVE_STDINT_H)
CHECK_INCLUDE_FILES(stdlib.h LMMS_HAVE_STDLIB_H)
Expand Down
4 changes: 4 additions & 0 deletions cmake/modules/BuildPlugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
LINK_LIBRARIES(${QT_LIBRARIES})
ENDIF(LMMS_BUILD_WIN32)
IF(LMMS_BUILD_MSYS AND CMAKE_BUILD_TYPE STREQUAL "Debug")
# Override Qt debug libraries with release versions
SET(QT_LIBRARIES "${QT_OVERRIDE_LIBRARIES}")
ENDIF()

ADD_LIBRARY(${PLUGIN_NAME} MODULE ${PLUGIN_SOURCES} ${plugin_MOC_out})
IF(QT5)
Expand Down
21 changes: 11 additions & 10 deletions cmake/modules/MinGWCrossCompile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ IF(LMMS_BUILD_MSYS)
SET(CMAKE_C_USE_RESPONSE_FILE_FOR_INCLUDES OFF)
SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES OFF)

# FIXME: There should be a cleaner way to do this
# Allows "Debug" msys builds to link against Qt "Release" libraries
# Variable to assist override Qt debug libraries with release versions
SET(QT_OVERRIDE_LIBRARIES
optimized;${MINGW_PREFIX}/bin/QtGui4.dll;
optimized;${MINGW_PREFIX}/bin/QtCore4.dll;
optimized;${MINGW_PREFIX}/bin/QtXml4.dll;
debug;${MINGW_PREFIX}/bin/QtGui4.dll;
debug;${MINGW_PREFIX}/bin/QtCore4.dll;
debug;${MINGW_PREFIX}/bin/QtXml4.dll;
)
IF(LMMS_BUILD_MSYS AND CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(QT_LIBRARIES
optimized;${MINGW_PREFIX}/bin/QtGui4.dll;
optimized;${MINGW_PREFIX}/bin/QtCore4.dll;
optimized;${MINGW_PREFIX}/bin/QtXml4.dll;
debug;${MINGW_PREFIX}/bin/QtGui4.dll;
debug;${MINGW_PREFIX}/bin/QtCore4.dll;
debug;${MINGW_PREFIX}/bin/QtXml4.dll;
)
# Override Qt debug libraries with release versions
SET(QT_LIBRARIES "${QT_OVERRIDE_LIBRARIES}")
ENDIF()
# Linux mingw requires explicitly defined tools to prevent clash with native system tools
ELSE()
Expand Down

0 comments on commit b83006b

Please sign in to comment.