File: examples.pri

package info (click to toggle)
libqglviewer 2.6.3%2Bdfsg2-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 9,396 kB
  • ctags: 3,201
  • sloc: cpp: 26,447; sh: 84; makefile: 22
file content (98 lines) | stat: -rw-r--r-- 2,801 bytes parent folder | download | duplicates (2)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
QT *= xml opengl widgets gui

CONFIG += qt opengl warn_on thread rtti console embed_manifest_exe no_keywords

# Set path to include and lib files (see doc/compilation.html for details):
# Uncomment and tune these paths according to your configuration.

#INCLUDEPATH *= C:/Users/debunne/Documents/libQGLViewer-VERSION
#LIBS *= -LC:/Users/debunne/Documents/libQGLViewer-VERSION/QGLViewer -lQGLViewer2

# --------------------------------------------------------------------------------------

# The rest of this file sets these paths so that the examples
# can be compiled out of the box

ROOT_DIRECTORY = ../..

contains( _PRO_FILE_PWD_, ".*designerPlugin$" ) {
	ROOT_DIRECTORY = ..
}
contains( _PRO_FILE_PWD_, ".*/contribs/.+/.+" ) {
	ROOT_DIRECTORY = ../../../..
} else {	
	contains( _PRO_FILE_PWD_, ".*/contribs/.+" ) {
		ROOT_DIRECTORY = ../../..
	}
}

INCLUDE_DIR = $${ROOT_DIRECTORY}
LIB_DIR = $${ROOT_DIRECTORY}/QGLViewer

# Include path, taking QGLViewer path prefix into account
INCLUDEPATH *= $${INCLUDE_DIR}
DEPENDPATH  *= $${INCLUDE_DIR}

unix {
	CONFIG -= debug debug_and_release
	CONFIG *= release

	isEmpty( QGLVIEWER_STATIC ) {
		# The absolute path where the library or framework was found
		LIB_DIR_ABSOLUTE_PATH = $$dirname(PWD)/QGLViewer
		
		macx|darwin-g++ {
			# Use install_name_tool to set the absolute path of the lib in the executable
			exists( $${LIB_DIR_ABSOLUTE_PATH}/QGLViewer.framework ) {
				!plugin:QMAKE_POST_LINK=install_name_tool -change QGLViewer.framework/Versions/2/QGLViewer $${LIB_DIR_ABSOLUTE_PATH}/QGLViewer.framework/Versions/2/QGLViewer $${TARGET}.app/Contents/MacOS/$${TARGET} #VERSION_MAJOR
				LIBS += -F$${LIB_DIR_ABSOLUTE_PATH} -framework QGLViewer
			} else {
				!plugin:QMAKE_POST_LINK=install_name_tool -change libQGLViewer.2.dylib $${LIB_DIR_ABSOLUTE_PATH}/libQGLViewer.2.dylib $${TARGET}.app/Contents/MacOS/$${TARGET} #VERSION_MAJOR
				LIBS *= -L$${LIB_DIR} -lQGLViewer
			}
		} else {
			isEmpty(QMAKE_LFLAGS_RPATH) {
				!plugin:QMAKE_LFLAGS += -Wl,-rpath,$${LIB_DIR_ABSOLUTE_PATH}
			} else {
				!plugin:QMAKE_RPATHDIR *= $${LIB_DIR_ABSOLUTE_PATH}
			}
			LIBS *= -L$${LIB_DIR} -lQGLViewer
		}
	} else {
		LIBS *= $${LIB_DIR}/libQGLViewer.a
	}

	# Intermediate files are created in hidden folders
	MOC_DIR = .moc
	OBJECTS_DIR = .obj
}


win32 {
	CONFIG *= debug_and_release

	# Seems to be needed for Visual Studio with Intel compiler
	DEFINES *= WIN32

	isEmpty( QGLVIEWER_STATIC ) {
		LIBS *= -L$${LIB_DIR} -lQGLViewer2
	} else {
		DEFINES *= QGLVIEWER_STATIC
		LIBS *= $${LIB_DIR}/libQGLViewer2.a
	}
}



# Application icon
macx|darwin-g++ {
	ICON = $${ROOT_DIRECTORY}/QGLViewer/qglviewer.icns
}

win32 {
	!designer {
		exists( $${ROOT_DIRECTORY}/examples/qglviewer.rc ) {
			RC_FILE = $${ROOT_DIRECTORY}/examples/qglviewer.rc
		}
	}
}