Skip to content

Commit

Permalink
Fix compilation on older Apple versions
Browse files Browse the repository at this point in the history
Adds libc++ to CXX flags
Fixes macdeployqt on Qt5
  • Loading branch information
tresf committed Jun 19, 2016
1 parent 5dd650b commit a04c6eb
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmake/apple/install_apple.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ LIBREADLINE="libreadline.6.2.dylib"
MSG_COLOR='\x1B[1;36m'
COLOR_RESET='\x1B[0m'
echo -e "$MSG_COLOR\n\nCreating App Bundle \"$APP\"...$COLOR_RESET"

# Look for macdeployqt
which macdeployqt
if [ $? -ne 0 ]; then
export PATH=$PATH:$(brew --prefix qt5)/bin/
fi

# MacPorts only - check for u+w permissions on libreadline
if [ -f "@APPLE_PREFIX@/lib/$LIBREADLINE" ]; then
Expand Down
4 changes: 4 additions & 0 deletions plugins/GigPlayer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ if(LMMS_HAVE_GIG)

# Enable C++11
ADD_DEFINITIONS(-std=c++0x)

IF(LMMS_BUILD_APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
ENDIF()

LINK_DIRECTORIES(${GIG_LIBRARY_DIRS} ${SAMPLERATE_LIBRARY_DIRS})
LINK_LIBRARIES(${GIG_LIBRARIES} ${SAMPLERATE_LIBRARIES})
Expand Down
4 changes: 4 additions & 0 deletions plugins/MidiExport/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ INCLUDE(BuildPlugin)
# Enable C++11
ADD_DEFINITIONS(-std=c++0x)

IF(LMMS_BUILD_APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
ENDIF()

BUILD_PLUGIN(midiexport MidiExport.cpp MidiExport.h MidiFile.hpp
MOCFILES MidiExport.h)
4 changes: 4 additions & 0 deletions plugins/VstEffect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ ENDIF()
# Enable C++11
ADD_DEFINITIONS(-std=c++0x)

IF(LMMS_BUILD_APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
ENDIF()

BUILD_PLUGIN(vsteffect VstEffect.cpp VstEffectControls.cpp VstEffectControlDialog.cpp VstSubPluginFeatures.cpp VstEffect.h VstEffectControls.h VstEffectControlDialog.h VstSubPluginFeatures.h MOCFILES VstEffectControlDialog.h VstEffectControls.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
SET_TARGET_PROPERTIES(vsteffect PROPERTIES COMPILE_FLAGS "-Wno-attributes")
TARGET_LINK_LIBRARIES(vsteffect -lvstbase)
Expand Down
4 changes: 4 additions & 0 deletions plugins/lb302/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ INCLUDE(BuildPlugin)
# Enable C++11
ADD_DEFINITIONS(-std=c++0x)

IF(LMMS_BUILD_APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
ENDIF()

BUILD_PLUGIN(lb302 lb302.cpp lb302.h MOCFILES lb302.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
4 changes: 4 additions & 0 deletions plugins/opl2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ INCLUDE(BuildPlugin)
# Enable C++11
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")

IF(LMMS_BUILD_APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
ENDIF()

BUILD_PLUGIN(OPL2 opl2instrument.cpp opl2instrument.h opl.h fmopl.c fmopl.h temuopl.cpp temuopl.h MOCFILES opl2instrument.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
4 changes: 4 additions & 0 deletions plugins/vestige/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
IF(LMMS_SUPPORT_VST)
# Enable C++11
ADD_DEFINITIONS(-std=c++0x)

IF(LMMS_BUILD_APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
ENDIF()

INCLUDE(BuildPlugin)
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/../vst_base")
Expand Down
4 changes: 4 additions & 0 deletions plugins/zynaddsubfx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wno-write-strings -Wno-deprecated-d

# Enable C++11, but only for ZynAddSubFx.cpp
set_property(SOURCE ZynAddSubFx.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -std=c++0x ")

IF(LMMS_BUILD_APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
ENDIF()

# link system-libraries when on win32
IF(LMMS_BUILD_WIN32)
Expand Down

0 comments on commit a04c6eb

Please sign in to comment.