[Add] Added .pro file for MacOS build

Former-commit-id: dc485f34a9
This commit is contained in:
Leroy.H.Y 2019-06-23 18:25:14 -07:00
parent c8120e5a5f
commit ada39fd0b0

View File

@ -68,30 +68,48 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
WITH_PYTHON = no WITH_PYTHON = no
unix: exists( "/usr/include/python3.7m/Python.h" ) { unix:!macx {
equals(WITH_PYTHON, "no") { exists( "/usr/include/python3.7m/Python.h" ) {
message("Will build with python lib version 3.7.") equals(WITH_PYTHON, "no") {
INCLUDEPATH += /usr/include/python3.7m/ message("Will build with python lib version 3.7.")
LIBS += -lpython3.7m INCLUDEPATH += /usr/include/python3.7m/
WITH_PYTHON = yes LIBS += -lpython3.7m
WITH_PYTHON = yes
}
} }
} }
unix: exists( "/usr/include/python3.6m/Python.h" ) { unix:!macx {
equals(WITH_PYTHON, "no") { exists( "/usr/include/python3.6m/Python.h" ) {
message("Will build with python lib version 3.6.") equals(WITH_PYTHON, "no") {
INCLUDEPATH += /usr/include/python3.6m/ message("Will build with python lib version 3.6.")
LIBS += -lpython3.6m INCLUDEPATH += /usr/include/python3.6m/
WITH_PYTHON = yes LIBS += -lpython3.6m
WITH_PYTHON = yes
}
} }
} }
unix: exists( "/usr/include/python3.5m/Python.h" ) { unix:!macx {
equals(WITH_PYTHON, "no") { exists( "/usr/include/python3.5m/Python.h" ) {
message("Will build with python lib version 3.5.") equals(WITH_PYTHON, "no") {
INCLUDEPATH += /usr/include/python3.5m/ message("Will build with python lib version 3.5.")
LIBS += -lpython3.5m INCLUDEPATH += /usr/include/python3.5m/
WITH_PYTHON = yes LIBS += -lpython3.5m
WITH_PYTHON = yes
}
}
}
macx {
PYTHON_ROOT=/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions
exists( "$$PYTHON_ROOT/3.7/include/python3.7m/Python.h" ) {
equals(WITH_PYTHON, "no") {
message("Will build with python lib version 3.7.3.")
INCLUDEPATH += $$PYTHON_ROOT/3.7/include/python3.7m/
LIBS += -L$$PYTHON_ROOT/3.7/lib/python3.7/config-3.7m-darwin/ -lpython3.7m
WITH_PYTHON = yes
}
} }
} }