# Tom migrations # --- # Default migrations path as the string for the make:migration command # The path can be absolute or relative (to the pwd at runtime) # It will look like this on the cmd. line: -DTINYTOM_MIGRATIONS_DIR="/" # If the path doesn't contain a space then the \" is not needed # Will be stringified in the tom/application.cpp #DEFINES += TINYTOM_MIGRATIONS_DIR="\"database/migrations\"" # Dependencies include and library paths # --- # MySQL C library # Arch - pacman -S mariadb-libs # Gentoo - emerge dev-db/mysql (package.use: -server -perl) # Ubuntu - apt install libmysqlclient-dev # range-v3 library (header only) # Arch - pacman -S range-v3 # Gentoo - emerge dev-cpp/range-v3 # Ubuntu - apt install librange-v3-dev # ccache # Arch - pacman -S ccache # Gentoo - emerge dev-util/ccache # Ubuntu - apt install ccache # MinGW win32-g++|win32-clang-g++ { # Enable ccache wrapper CONFIG *= tiny_ccache # Includes # tabulate INCLUDEPATH += $$quote(C:/msys64/home/xyz/vcpkg/installed/x64-mingw-dynamic/include/) QMAKE_CXXFLAGS += -isystem $$shell_quote(C:/msys64/home/xyz/vcpkg/installed/x64-mingw-dynamic/include/) # Libraries # MySQL C library # Find with the pkg-config (preferred), shared build only mysql_ping:!link_pkgconfig_off: \ !CONFIG(static, dll|shared|static|staticlib): \ !CONFIG(staticlib, dll|shared|static|staticlib) { CONFIG *= link_pkgconfig PKGCONFIG += libmariadb } # Static build else:mysql_ping: \ !CONFIG(shared, dll|shared|static|staticlib): \ !CONFIG(dll, dll|shared|static|staticlib): \ LIBS += -lmariadb.dll # Or add manually (use only one method, above or this manual method) mysql_ping: { # For shared build LIBS += -lmariadb # For static build LIBS += -lmariadb.dll } # Use faster linker # CONFIG *= use_lld_linker does not work on MinGW QMAKE_LFLAGS *= -fuse-ld=lld } else:win32-msvc { # Includes # range-v3 INCLUDEPATH += $$quote(E:/xyz/vcpkg/installed/x64-windows/include/) # Conditional dependencies # MySQL C library is used by TinyORM and it uses mysql_ping() mysql_ping { INCLUDEPATH += $$quote(C:/Program Files/MySQL/MySQL Server 8.0/include/) LIBS += $$quote(-LC:/Program Files/MySQL/MySQL Server 8.0/lib/) LIBS += -llibmysql } } else:unix { # Includes # range-v3 QMAKE_CXXFLAGS += -isystem $$shell_quote(/home/xyz/vcpkg/installed/x64-linux/include/) # Libraries # MySQL C library # Find with pkg-config (preferred) mysql_ping:!link_pkgconfig_off { CONFIG *= link_pkgconfig # Pick only one PKGCONFIG += mysqlclient PKGCONFIG += libmariadb } # Or add manually (use only one) mysql_ping { # Pick only one LIBS += -lmysqlclient LIBS += -lmariadb } # Use faster linkers clang: CONFIG *= use_lld_linker else: CONFIG *= use_gold_linker }