2013-06-28 18:37:39 +04:00
|
|
|
|
|
|
|
include cmakeExecutable.mk
|
|
|
|
|
2012-06-19 00:25:10 +04:00
|
|
|
CMAKE_CURRENT_BINARY_DIR = "@CMAKE_CURRENT_BINARY_DIR@"
|
|
|
|
CMAKE_CXX_COMPILER = "@CMAKE_CXX_COMPILER@"
|
|
|
|
CMAKE_CXX_COMPILER_ID = "@CMAKE_CXX_COMPILER_ID@"
|
|
|
|
|
|
|
|
CMAKE_FOO = $(CMAKE) --find-package -DCMAKE_MODULE_PATH=$(CMAKE_CURRENT_BINARY_DIR) -DNAME=Foo -DLANGUAGE=CXX -DCOMPILER_ID=$(CMAKE_CXX_COMPILER_ID)
|
|
|
|
|
|
|
|
tmp = tmp.txt
|
|
|
|
|
2014-01-11 16:58:23 +04:00
|
|
|
all: pngtest
|
2011-08-12 01:27:19 +04:00
|
|
|
|
2014-01-11 16:58:23 +04:00
|
|
|
main.o: clean main.cpp
|
2012-06-19 00:25:10 +04:00
|
|
|
@$(CMAKE_FOO) -DMODE=COMPILE >$(tmp)
|
|
|
|
@foo="`cat $(tmp)`"; \
|
|
|
|
printf '"%s" %s %s -c main.cpp\n' $(CMAKE_CXX_COMPILER) "$(CXXFLAGS)" "$$foo" >$(tmp)
|
|
|
|
@cat $(tmp)
|
|
|
|
@sh $(tmp)
|
|
|
|
@rm -f $(tmp)
|
2011-08-14 17:38:24 +04:00
|
|
|
|
|
|
|
pngtest: main.o
|
2012-06-19 00:25:10 +04:00
|
|
|
@$(CMAKE_FOO) -DMODE=LINK >$(tmp)
|
|
|
|
@foo="`cat $(tmp)`"; \
|
|
|
|
printf '"%s" %s %s -o pngtest main.o %s\n' $(CMAKE_CXX_COMPILER) "$(CXXFLAGS)" "$(LDFLAGS)" "$$foo" >$(tmp)
|
|
|
|
@cat $(tmp)
|
|
|
|
@sh $(tmp)
|
|
|
|
@rm -f $(tmp)
|
2011-08-12 01:27:19 +04:00
|
|
|
|
|
|
|
clean:
|
2012-06-19 00:25:10 +04:00
|
|
|
rm -f $(tmp) *.o pngtest
|