Fixes paths, drops hardcoded archs, fixes unknown test function error: https://forum.qt.io/topic/35403/qmake-gives-unknown-test-function-for Notice that in the context of this port build64 does not necessarily mean 64-bit arch, but just uses doubles. CsoundLib64 builds fine on 32-bit. --- qcs-macx.pro 2020-07-03 05:55:55.000000000 +0800 +++ qcs-macx.pro 2023-12-31 14:53:05.000000000 +0800 @@ -5,18 +5,6 @@ message(Building CsoundQt for Macintosh OS X.) } -i386: { -CONFIG += i386 -QMAKE_CXXFLAGS += -arch i386 -} else:universal { -QMAKE_CXXFLAGS += -arch i386 -CONFIG += i386 -CONFIG += ppc -} else { -CONFIG += x86_64 -QMAKE_CXXFLAGS += -arch x86_64 -} - build32: MAC_LIB = CsoundLib build64: MAC_LIB = CsoundLib64 @@ -24,25 +12,21 @@ 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 +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 +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 +DEFAULT_PYTHON_INCLUDE_DIR = @PREFIX@/include +DEFAULT_PYTHONQT_LIBRARY_DIRS = @PREFIX@/lib -PYTHONQT_VARIANTS = "PythonQt3.2" "PythonQt3.1" "PythonQt3.0" "PythonQt" "PythonQt2.0.1" -for (pyqtdir, PYTHONQT_VARIANTS) { +PYTHONQT_VARIANTS = "PythonQt3.2" "PythonQt3.1" "PythonQt3.0" "PythonQt" "PythonQt2.0.1" +for(pyqtdir, PYTHONQT_VARIANTS) { DEFAULT_PYTHONQT_SRC_DIRS += ../../../$$pyqtdir \ ../$$pyqtdir \ $$pyqtdir @@ -69,8 +53,8 @@ RESOURCES += "src/quteapp_d_osx.qrc" } #LIBS += -framework QtCore -framework QtGui -framework QtXml -LCSOUND = -F$${HOME_DIRECTORY}/Library/Frameworks -F/Library/Frameworks -framework $${MAC_LIB} -csound6: LCSND = -L/usr/local/lib -lcsnd6.6.0 +LCSOUND = -F@PREFIX@/Library/Frameworks -framework $${MAC_LIB} +csound6: LCSND = -L@PREFIX@/lib -lcsnd6.6.0 else: LCSND = -l_csnd QMAKE_INFO_PLIST = $${PWD}/src/MyInfo.plist --- qcs.pro 2020-07-03 05:55:55.000000000 +0800 +++ qcs.pro 2023-12-31 18:20:56.000000000 +0800 @@ -34,6 +34,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@ DEFINES += NOMINMAX # DEFINES += USE_WIDGET_MUTEX @@ -46,7 +55,7 @@ greaterThan(QT_MAJOR_VERSION, 4){ CONFIG += c++11 } else { -QMAKE_CXXFLAGS += -std=c++0x +QMAKE_CXXFLAGS += -std=c++11 } !csound5 { @@ -170,11 +179,14 @@ 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} #DESTDIR = $${_PRO_FILE_PWD_}/bin -DESTDIR = bin +DESTDIR = @DESTDIR@ MOC_DIR = build/moc UI_DIR = build/ui RCC_DIR = build/rc @@ -194,10 +206,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 --- config.pri 2020-07-03 05:55:55.000000000 +0800 +++ config.pri 2023-12-31 14:55:46.000000000 +0800 @@ -10,7 +10,7 @@ OBJECTS_DIR = "$${TMPDIR}/obj" RTMIDI_VERSIONS = "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} \ @@ -128,19 +128,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) {