Coupure prévue mardi 3 Août au matin pour maintenance du serveur. Nous faisons au mieux pour que celle-ci soit la plus brève possible.

CMakeLists.txt 3.55 KB
Newer Older
Sylvain Thery's avatar
Sylvain Thery committed
1
cmake_minimum_required(VERSION 2.8)
Pierre Kraemer's avatar
Pierre Kraemer committed
2

Sylvain Thery's avatar
Sylvain Thery committed
3
4
5
6
7
8
9
10
11
12
project(CGoGNLibrary)

# SET(CMAKE_BUILD_TYPE Release)

#IF(WIN32)
#	SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib)
#ELSE(WIN32)
#	SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Release)
#	ADD_DEFINITIONS(-DNOTOPOWARNING)
#ENDIF(WIN32)
Pierre Kraemer's avatar
Pierre Kraemer committed
13
14


thery's avatar
thery committed
15
16
IF(WIN32)
	SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib)
Sylvain Thery's avatar
Sylvain Thery committed
17
18
19
ELSE()
	SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
ENDIF()
Pierre Kraemer's avatar
Pierre Kraemer committed
20
21

include_directories(
22
	${CMAKE_CURRENT_BINARY_DIR}
Pierre Kraemer's avatar
Pierre Kraemer committed
23
	${CGoGN_ROOT_DIR}/include
Sylvain Thery's avatar
Sylvain Thery committed
24
	${CGoGN_EXT_INCLUDES}
Pierre Kraemer's avatar
Pierre Kraemer committed
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
)

file(
	GLOB_RECURSE
	files_topology
	${CGoGN_ROOT_DIR}/src/Topology/*.cpp
	${CGoGN_ROOT_DIR}/include/Topology/*.hpp
	${CGoGN_ROOT_DIR}/include/Topology/*.h
)

file(
	GLOB_RECURSE
	files_container
	${CGoGN_ROOT_DIR}/src/Container/*.cpp
	${CGoGN_ROOT_DIR}/include/Container/*.hpp
	${CGoGN_ROOT_DIR}/include/Container/*.h
)

file(
	GLOB_RECURSE
	files_algo
	${CGoGN_ROOT_DIR}/src/Algo/*.cpp
	${CGoGN_ROOT_DIR}/src/Algo/*.c
	${CGoGN_ROOT_DIR}/include/Algo/*.hpp
	${CGoGN_ROOT_DIR}/include/Algo/*.h
)

52
file(
Sylvain Thery's avatar
Sylvain Thery committed
53
	GLOB
54
55
56
57
	shaders_src
	${CGoGN_ROOT_DIR}/include/Utils/*.frag
	${CGoGN_ROOT_DIR}/include/Utils/*.vert
	${CGoGN_ROOT_DIR}/include/Utils/*.geom	
Sylvain Thery's avatar
Sylvain Thery committed
58
59
60
	${CGoGN_ROOT_DIR}/include/Utils/Shaders/*.frag
	${CGoGN_ROOT_DIR}/include/Utils/Shaders/*.vert
	${CGoGN_ROOT_DIR}/include/Utils/Shaders/*.geom
61
62
)

63
64

IF(WIN32)
unknown's avatar
unknown committed
65
	add_custom_target(shader_target ${CGoGN_ROOT_DIR}/ThirdParty/bin/Release/shader_to_h ${shaders_src}
66
	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
unknown's avatar
unknown committed
67
	SOURCES ${shaders_src} )
Sylvain Thery's avatar
Sylvain Thery committed
68
ELSE()
unknown's avatar
unknown committed
69
	add_custom_target(shader_target ${CGoGN_ROOT_DIR}/ThirdParty/bin/shader_to_h ${shaders_src}
70
	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
unknown's avatar
unknown committed
71
	SOURCES ${shaders_src} )
Sylvain Thery's avatar
Sylvain Thery committed
72
ENDIF()
73

74

Pierre Kraemer's avatar
Pierre Kraemer committed
75
file(
Sylvain Thery's avatar
Sylvain Thery committed
76
	GLOB		# WARNING NO MORE RECURSE TO AVOID TAKING QT FILES
Pierre Kraemer's avatar
Pierre Kraemer committed
77
78
79
80
	files_utils
	${CGoGN_ROOT_DIR}/src/Utils/*.cpp
	${CGoGN_ROOT_DIR}/include/Utils/*.hpp
	${CGoGN_ROOT_DIR}/include/Utils/*.h
Sylvain Thery's avatar
Sylvain Thery committed
81
82
83
84

	${CGoGN_ROOT_DIR}/src/Utils/Shaders/*.cpp
	${CGoGN_ROOT_DIR}/include/Utils/Shaders/*.hpp
	${CGoGN_ROOT_DIR}/include/Utils/Shaders/*.h
Pierre Kraemer's avatar
Pierre Kraemer committed
85
)
Sylvain Thery's avatar
Sylvain Thery committed
86

87
88
IF(WITH_QT)
	file(
89
90
		GLOB
		files_utils_qt
91
92
		${CGoGN_ROOT_DIR}/src/Utils/Qt/*.cpp
		${CGoGN_ROOT_DIR}/include/Utils/Qt/*.hpp
93
94
		${CGoGN_ROOT_DIR}/include/Utils/Qt/*.h
	)
95
	file(
Sylvain Thery's avatar
Sylvain Thery committed
96
		GLOB
97
		utils_qt_headers
98
		${CGoGN_ROOT_DIR}/include/Utils/Qt/qtgl.h
Sylvain Thery's avatar
Sylvain Thery committed
99
		${CGoGN_ROOT_DIR}/include/Utils/Qt/qtSimple.h
Sylvain Thery's avatar
Sylvain Thery committed
100
101
102
		${CGoGN_ROOT_DIR}/include/Utils/Qt/qtQGLV_glw.h
		${CGoGN_ROOT_DIR}/include/Utils/Qt/qtQGLV.h
		${CGoGN_ROOT_DIR}/include/Utils/Qt/qtpopup.h
Sylvain Thery's avatar
Sylvain Thery committed
103
		${CGoGN_ROOT_DIR}/include/Utils/Qt/qthistodraw.h 
104
105
		${CGoGN_ROOT_DIR}/include/Utils/Qt/qtcolorschooser.h
	)	
106
		
107
	QT4_WRAP_CPP(UTILS_QT_HEADERS_MOC ${utils_qt_headers})
108
	SET (files_utils_withQt ${files_utils} ${files_utils_qt} ${UTILS_QT_HEADERS_MOC})
Sylvain Thery's avatar
Sylvain Thery committed
109
ENDIF()
110

111
112
113
114
115
116
117
118
119
120
121
file(	GLOB_RECURSE
		files_geometry
		${CGoGN_ROOT_DIR}/include/Geometry/*.h
		${CGoGN_ROOT_DIR}/include/Geometry/*.hpp
)

file(	GLOB_RECURSE
		files_thirdParty
		${CGoGN_ROOT_DIR}/ThirdParty/include/*.h
		${CGoGN_ROOT_DIR}/ThirdParty/include/*.hpp
)
Sylvain Thery's avatar
Sylvain Thery committed
122

123
124
125
IF (ONELIB)
	IF(WITH_QT)
		add_library( cgogn ${files_topology} ${files_container} ${files_algo} ${files_utils_withQt}) 
Sylvain Thery's avatar
Sylvain Thery committed
126
	ELSE()
127
		add_library( cgogn ${files_topology} ${files_container} ${files_algo} ${files_utils} )
Sylvain Thery's avatar
Sylvain Thery committed
128
	ENDIF()
Sylvain Thery's avatar
Sylvain Thery committed
129
	add_dependencies(cgogn shader_target )
Sylvain Thery's avatar
Sylvain Thery committed
130
ELSE()
131
132
133
	add_library( container	${files_container})
	add_library( topology	${files_topology})
	add_library( algo		${files_algo})
Sylvain Thery's avatar
Sylvain Thery committed
134
	IF (WITH_QT)
135
		add_library( utils ${files_utils_withQt} )
Sylvain Thery's avatar
Sylvain Thery committed
136
	ELSE()
137
		add_library( utils ${files_utils} )
Sylvain Thery's avatar
Sylvain Thery committed
138
	ENDIF()
139
140
141
	add_custom_target( Geometry 	SOURCES ${files_geometry} )
	add_custom_target( ThirdParty 	SOURCES ${files_thirdParty} )
	add_dependencies( utils shader_target )
Sylvain Thery's avatar
Sylvain Thery committed
142
143
ENDIF()