CMakeLists.txt 2.17 KB
Newer Older
1
2
3
4
cmake_minimum_required(VERSION 2.8)

INCLUDE_DIRECTORIES(
	${SCHNApps_ROOT_DIR}/include
5
	${SCHNApps_ROOT_DIR}/Plugins/differentialProperties/include
6
7
8
9
	${CMAKE_CURRENT_BINARY_DIR}
)

SET( PLUGIN_SRC
10
    ${SCHNApps_ROOT_DIR}/Plugins/differentialProperties/src/differentialProperties.cpp
11
12
    ${SCHNApps_ROOT_DIR}/Plugins/differentialProperties/src/computeNormalDialog.cpp
    ${SCHNApps_ROOT_DIR}/Plugins/differentialProperties/src/computeCurvatureDialog.cpp
13
14
15
)

SET( PLUGIN_H
16
    ${SCHNApps_ROOT_DIR}/Plugins/differentialProperties/include/differentialProperties.h
17
18
    ${SCHNApps_ROOT_DIR}/Plugins/differentialProperties/include/computeNormalDialog.h
    ${SCHNApps_ROOT_DIR}/Plugins/differentialProperties/include/computeCurvatureDialog.h
19
20
21
)

SET( PLUGIN_FORM
22
23
	${SCHNApps_ROOT_DIR}/Plugins/differentialProperties/forms/computeNormalDialog.ui
	${SCHNApps_ROOT_DIR}/Plugins/differentialProperties/forms/computeCurvatureDialog.ui
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
)

IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )

	ADD_DEFINITIONS(-DDEBUG)

	IF(WIN32)
		link_directories( ${CGoGN_ROOT_DIR}/lib/Release )
	ELSE (WIN32)
		link_directories( ${CGoGN_ROOT_DIR}/lib/Debug ${CGoGN_ROOT_DIR}/lib/Release )
	ENDIF (WIN32)

	QT4_WRAP_UI( PLUGIN_UI ${PLUGIN_FORM} )
	QT4_WRAP_CPP( PLUGIN_MOC ${PLUGIN_H} )
	
	ADD_LIBRARY( DifferentialPropertiesPluginD SHARED
		${PLUGIN_SRC}
		${PLUGIN_UI}
		${PLUGIN_MOC}
	)

	TARGET_LINK_LIBRARIES( DifferentialPropertiesPluginD
		${CGoGN_LIBS_D}
		${COMMON_LIBS}
		${QGLVIEWER_LIBRARIES}
	)

	ADD_DEPENDENCIES( DifferentialPropertiesPluginD SCHNAppsD )

	SET_TARGET_PROPERTIES( DifferentialPropertiesPluginD PROPERTIES COMPILE_DEFINITIONS "DEBUG" )
		
ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
	
	IF(WIN32)
	link_directories( ${CGoGN_ROOT_DIR}/lib/Release )
	ELSE (WIN32)
		link_directories( ${CGoGN_ROOT_DIR}/lib/Release )
	ENDIF (WIN32)

	QT4_WRAP_UI( PLUGIN_UI ${PLUGIN_FORM} )
	QT4_WRAP_CPP( PLUGIN_MOC ${PLUGIN_H} )

	ADD_LIBRARY( DifferentialPropertiesPlugin SHARED
		${PLUGIN_SRC}
		${PLUGIN_UI}
		${PLUGIN_MOC}
	)

	TARGET_LINK_LIBRARIES( DifferentialPropertiesPlugin
		${CGoGN_LIBS_R}
		${COMMON_LIBS}
		${QGLVIEWER_LIBRARIES}
	)

	ADD_DEPENDENCIES( DifferentialPropertiesPlugin SCHNApps )
	
ENDIF ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )