# Capture whether this is a release/debug build. CONFIG(debug, debug|release) { # Target name. TARGET = internalsd } CONFIG(release, debug|release) { # Target name. TARGET = internals } TEMPLATE = lib DEFINES += OPMAPINTERNALS_LIBRARY DEFINES += QtOpmapInternals #VS的补丁 使用 自定义的数学常数 DEFINES += _USE_MATH_DEFINES #目标生成路径 DESTDIR = $$PWD/../../bin MOC_DIR = $$PWD/../../build OBJECTS_DIR = $$PWD/../../build QT += network QT += sql CONFIG += staticlib\ plugin HEADERS += core.h \ internalglobal.h \ mathdefine.h \ mousewheelzoomtype.h \ rectangle.h \ tile.h \ tilematrix.h \ loadtask.h \ copyrightstrings.h \ pureprojection.h \ pointlatlng.h \ rectlatlng.h \ sizelatlng.h \ debugheader.h SOURCES += core.cpp \ rectangle.cpp \ tile.cpp \ tilematrix.cpp \ pureprojection.cpp \ rectlatlng.cpp \ sizelatlng.cpp \ pointlatlng.cpp \ loadtask.cpp \ mousewheelzoomtype.cpp HEADERS += ./projections/lks94projection.h \ ./projections/mercatorprojection.h \ ./projections/mercatorprojectionyandex.h \ ./projections/platecarreeprojection.h \ ./projections/platecarreeprojectionpergo.h SOURCES += ./projections/lks94projection.cpp \ ./projections/mercatorprojection.cpp \ ./projections/mercatorprojectionyandex.cpp \ ./projections/platecarreeprojection.cpp \ ./projections/platecarreeprojectionpergo.cpp INCLUDEPATH += $$DESTDIR/include # Capture whether this is a release/debug build. CONFIG(debug, debug|release) { LIBS += -L$$DESTDIR -lcored } CONFIG(release, debug|release) { LIBS += -L$$DESTDIR -lcore } win32|win64 { src_dir = $$PWD\\*.h dst_dir = $$DESTDIR\\include\\ # dst_dir 最后的 \\ 是必须的,用来标示 xcopy 到一个文件夹,若不存在,创建之 # Replace slashes in paths with backslashes for Windows src_dir ~= s,/,\\,g dst_dir ~= s,/,\\,g system(xcopy $$src_dir $$dst_dir /y /e) } unix { src_dir = $$PWD/*.h dst_dir = $$DESTDIR/include/ !exists($$dst_dir): system(mkdir -p $$dst_dir) system(cp $$src_dir $$dst_dir -arf ) src_prodir = $$PWD/projections/*.h dst_prodir = $$PWD/../../thirdpart/include/projections/ !exists($$dst_prodir): system(mkdir -p $$dst_prodir) system(cp $$src_prodir $$dst_prodir -arf ) }