• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Staticlib configuration for qmake builds
2# For some reason qmake 3.1 fails to identify source dependencies and excludes format.cc and printf.cc
3# from compilation so it _MUST_ be called as qmake -nodepend
4# A workaround is implemented below: a custom compiler is defined which does not track dependencies
5
6TEMPLATE = lib
7
8TARGET = fmt
9
10QMAKE_EXT_CPP = .cc
11
12CONFIG = staticlib warn_on c++11
13
14FMT_SOURCES = \
15    ../src/format.cc \
16    ../src/posix.cc
17
18fmt.name = libfmt
19fmt.input = FMT_SOURCES
20fmt.output = ${QMAKE_FILE_BASE}$$QMAKE_EXT_OBJ
21fmt.clean = ${QMAKE_FILE_BASE}$$QMAKE_EXT_OBJ
22fmt.depends = ${QMAKE_FILE_IN}
23# QMAKE_RUN_CXX will not be expanded
24fmt.commands = $$QMAKE_CXX -c $$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_WARN_ON $$QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO $$QMAKE_CXXFLAGS_CXX11 ${QMAKE_FILE_IN}
25fmt.variable_out = OBJECTS
26fmt.CONFIG = no_dependencies no_link
27QMAKE_EXTRA_COMPILERS += fmt
28