File: lib2.pro

package info (click to toggle)
qtbase-opensource-src 5.15.15%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 350,700 kB
  • sloc: cpp: 2,089,913; ansic: 336,851; xml: 115,491; python: 9,447; java: 7,499; asm: 4,023; perl: 2,047; sh: 2,037; yacc: 1,687; lex: 1,333; javascript: 878; makefile: 273; objc: 70
file content (53 lines) | stat: -rw-r--r-- 1,467 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
TEMPLATE = lib
CONFIG += dll
CONFIG -= staticlib
SOURCES		= mylib.c
TARGET = mylib
DESTDIR = ../
VERSION = 2
QT = core

msvc: DEFINES += WIN32_MSVC

# Force a copy of the library to have an extension that is non-standard.
# We want to test if we can load a shared library with *any* filename...

win32 {

    debug_and_release {
        CONFIG(debug, debug|release)) {
            BUILD_FOLDER = debug
        } else {
            BUILD_FOLDER = release
        }
        DESTDIR = ../$$BUILD_FOLDER/
    } else {
        BUILD_FOLDER =
        DESTDIR = ../
    }

    # vcproj and Makefile generators refer to target differently
    contains(TEMPLATE,vc.*) {
        src = $(TargetPath)
    } else {
        src = $(DESTDIR_TARGET)
    }
    files = $$BUILD_FOLDER$${QMAKE_DIR_SEP}mylib.dl2 $$BUILD_FOLDER$${QMAKE_DIR_SEP}system.qt.test.mylib.dll
} else {
    src = $(DESTDIR)$(TARGET)
    files = libmylib.so2 system.qt.test.mylib.so
}

# This project is testdata for tst_qlibrary
target.path = $$[QT_INSTALL_TESTS]$${QMAKE_DIR_SEP}tst_qlibrary
renamed_target.path = $$target.path

for(file, files) {
    QMAKE_POST_LINK += $$QMAKE_COPY $$src ..$$QMAKE_DIR_SEP$$file &&
    renamed_target.extra += $$QMAKE_COPY $$src $(INSTALL_ROOT)$${target.path}$$QMAKE_DIR_SEP$$file &&
    CLEAN_FILES += ..$$QMAKE_DIR_SEP$$file
}
renamed_target.extra = $$member(renamed_target.extra, 0, -2)
QMAKE_POST_LINK = $$member(QMAKE_POST_LINK, 0, -2)

INSTALLS += target renamed_target