--- qcs-macx.pro.orig 2023-12-31 21:39:25 +++ qcs-macx.pro 2023-12-31 22:03:55 @@ -5,40 +5,30 @@ message(Building CsoundQt for Macintosh OS X.) } -CONFIG += x86_64 -QMAKE_CXXFLAGS += -arch x86_64 - build32: MAC_LIB = CsoundLib build64: MAC_LIB = CsoundLib64 -#paths set up for using the csound from installed package +# paths set up for using the csound from installed package HOME_DIRECTORY = # Set default paths -CSOUND_FRAMEWORK_DIR = Library/Frameworks/$${MAC_LIB}.framework/Versions/Current -DEFAULT_CSOUND_API_INCLUDE_DIRS = $${CSOUND_FRAMEWORK_DIR}/Headers \ - $${CSOUND_FRAMEWORK_DIR}/Headers \ - /usr/local/include/csound \ - /usr/local/opt/csound/Frameworks/CsoundLib64.framework/Headers +CSOUND_FRAMEWORK_DIR = @PREFIX@/Library/Frameworks/$${MAC_LIB}.framework/Versions/6.0 +DEFAULT_CSOUND_API_INCLUDE_DIRS = $${CSOUND_FRAMEWORK_DIR}/Headers \ + @PREFIX@/include/csound DEFAULT_CSOUND_INTERFACES_INCLUDE_DIRS = $${DEFAULT_CSOUND_API_INCLUDE_DIRS} -DEFAULT_CSOUND_LIBRARY_DIRS = $${HOME_DIRECTORY}/$${CSOUND_FRAMEWORK_DIR} \ - /$${CSOUND_FRAMEWORK_DIR} \ - /usr/local/lib \ - /usr/local/opt/csound/Frameworks/CsoundLib64.framework/Versions/Current - +DEFAULT_CSOUND_LIBRARY_DIRS = $${CSOUND_FRAMEWORK_DIR} \ + @PREFIX@/lib build32:DEFAULT_CSOUND_LIBS = CsoundLib build64:DEFAULT_CSOUND_LIBS = CsoundLib64 -# For OS X, the PythonQt.1.0.0.dylib and the libPythonQt.1.dylib must be on /usr/local/lib or other lib path -DEFAULT_PYTHON_INCLUDE_DIR = /usr/local/include \ - /usr/include -DEFAULT_PYTHONQT_LIBRARY_DIRS = /usr/local/lib \ - /usr/lib +# For OS X, the PythonQt.1.0.0.dylib and the libPythonQt.1.dylib must be on @PREFIX@/lib or other lib path +DEFAULT_PYTHON_INCLUDE_DIR = @PREFIX@/include +DEFAULT_PYTHONQT_LIBRARY_DIRS = @PREFIX@/lib PYTHONQT_VARIANTS = "pythonqt" "PythonQt3.2" "PythonQt3.1" "PythonQt3.0" "PythonQt" "PythonQt2.0.1" -for (pyqtdir, PYTHONQT_VARIANTS) { +for(pyqtdir, PYTHONQT_VARIANTS) { DEFAULT_PYTHONQT_SRC_DIRS += ../../../$$pyqtdir \ ../$$pyqtdir \ $$pyqtdir @@ -70,9 +60,9 @@ } #LIBS += -framework QtCore -framework QtGui -framework QtXml -LCSOUND = -F$${HOME_DIRECTORY}/Library/Frameworks -F/Library/Frameworks -F/usr/local/opt/csound/Frameworks -framework $${MAC_LIB} +LCSOUND = -F@PREFIX@/Library/Frameworks -framework $${MAC_LIB} -LCSND = -L/usr/local/lib -lcsnd6.6.0 +LCSND = -L@PREFIX@/lib -lcsnd6.6.0 QMAKE_INFO_PLIST = $${PWD}/src/MyInfo.plist ICON = $${PWD}/images/qtcs.icns --- qcs.pro.orig 2023-12-31 21:39:25 +++ qcs.pro 2023-12-31 22:08:38 @@ -35,6 +35,15 @@ # qmake qcs.pro INSTALL_DIR=~ SHARE_DIR=~/.local/share ################################################################################ +QMAKE_CC=@CC@ +QMAKE_CXX=@CXX@ +QMAKE_CFLAGS=@CFLAGS@ +QMAKE_CXXFLAGS=@CXXFLAGS@ +QMAKE_LFLAGS=@LFLAGS@ +QMAKE_LINK_C=@CC@ +QMAKE_LINK_C_SHLIB=@CC@ +QMAKE_LINK=@CXX@ +QMAKE_LINK_SHLIB=@CXX@ #Support for Qt4 dropped from v0.9.8 de facto, v1.0.0 declaring it here: lessThan(QT_MAJOR_VERSION,5): error("Qt5 or higher required. Use CsoundQt 0.9.7 or earlier to build for Qt4.") @@ -163,13 +172,15 @@ CONFIG += c++11 } +CSOUND_API_INCLUDE_DIR = @PREFIX@/Library/Frameworks/$${MAC_LIB}.framework/Versions/6.0/Headers +CSOUND_INTERFACES_INCLUDE_DIR = @PREFIX@/include/csound + INCLUDEPATH *= $${CSOUND_API_INCLUDE_DIR} INCLUDEPATH *= $${CSOUND_INTERFACES_INCLUDE_DIR} INCLUDEPATH += $$PWD/csound/include -#DESTDIR = $${_PRO_FILE_PWD_}/bin -DESTDIR = bin +DESTDIR = @DESTDIR@ MOC_DIR = build/moc UI_DIR = build/ui RCC_DIR = build/rc @@ -189,10 +200,10 @@ # use 'sudo make install' for system wide installation unix:!macx { isEmpty(INSTALL_DIR) { - INSTALL_DIR=/usr/local # ~ #for HOME + INSTALL_DIR=@PREFIX@ # ~ #for HOME } isEmpty(SHARE_DIR) { - SHARE_DIR=/usr/share # ~/.local/share for HOME install + SHARE_DIR=@PREFIX@/share # ~/.local/share for HOME install } target.path = $$INSTALL_DIR/bin @@ -200,7 +211,7 @@ INSTALLS += target postInstall.path = $$INSTALL_DIR/bin - postInstall.commands = cd $(INSTALL_ROOT)/$$INSTALL_DIR/bin; ln -sf $$TARGET csoundqt + postInstall.commands = cd $(INSTALL_ROOT)/$$INSTALL_DIR/bin; ln -sf $$TARGET csoundqt INSTALLS += postInstall # see comments: https://github.com/CsoundQt/CsoundQt/issues/258 --- config.pri.orig 2023-12-31 21:39:25 +++ config.pri 2023-12-31 21:58:26 @@ -11,7 +11,7 @@ DEFAULT_RTMIDI_DIRS = "rtmidi" RTMIDI_VERSIONS = "rtmidi-5.0.0" "rtmidi-4.0.0" "rtmidi-3.0.0" "rtmidi-2.1.1" "rtmidi-2.1.0" "rtmidi-2.0.1" "rtmidi-1.0.15" -for (rtdir, RTMIDI_VERSIONS) { +for(rtdir, RTMIDI_VERSIONS) { DEFAULT_RTMIDI_DIRNAME=$$rtdir DEFAULT_RTMIDI_DIRS += $${DEFAULT_RTMIDI_DIRNAME} \ ../$${DEFAULT_RTMIDI_DIRNAME} \ @@ -129,19 +129,12 @@ rtmidi { # check if RTMIDI is found in system unix:!macx { - exists("/usr/include/rtmidi") { - RTMIDI_DIR = "/usr/include/rtmidi" - !no_messages:message(RtMidi found in /usr/include/rtmidi) + exists("@PREFIX@/include/rtmidi") { + RTMIDI_DIR = "@PREFIX@/include/rtmidi" + !no_messages:message(RtMidi found in @PREFIX@/include/rtmidi) CONFIG -= rtmidi CONFIG += system_rtmidi } - exists("/usr/local/include/rtmidi") { - RTMIDI_DIR = "/usr/local/include/rtmidi" - !no_messages:message(RtMidi found in /usr/local/include/rtmidi) - CONFIG -= rtmidi - CONFIG += system_rtmidi - } - } isEmpty(RTMIDI_DIR) {