Last active
December 26, 2015 08:39
-
-
Save MOZGIII/7124158 to your computer and use it in GitHub Desktop.
qmake helper to link swipl with qt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set swipl binary | |
isEmpty(SWIPL_BINARY) { | |
SWIPL_BINARY="swipl" | |
} | |
# Load options from swipl | |
isEmpty(PLDUMP) { | |
PLDUMP = $$system(\"$$SWIPL_BINARY\" --dump-runtime-variables) | |
} | |
# Set SWI-Prolog options | |
isEmpty(PLBASE) { PLBASE = $$system( 'echo \'$$PLDUMP\' | grep -o -P "(?<=PLBASE=\\\").+?(?=\\\")"' ) } | |
isEmpty(PLARCH) { PLARCH = $$system( 'echo \'$$PLDUMP\' | grep -o -P "(?<=PLARCH=\\\").+?(?=\\\")"' ) } | |
isEmpty(PLLIB) { PLLIB = $$system( 'echo \'$$PLDUMP\' | grep -o -P "(?<=PLLIB=\\\").+?(?=\\\")"' ) } | |
# Include SWI-Prolog | |
INCLUDEPATH += "$$PLBASE/include" | |
LIBS += "-L'$$quote('$$PLBASE/lib/$$PLARCH')'" | |
LIBS += "-L'$$quote('$$PLBASE/lib')'" | |
LIBS += $$PLLIB |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment