CMakeLists.txt 2.16 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1 2 3 4 5 6
cmake_minimum_required(VERSION 2.6)

project(Tutos)

#SET (COMMON_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${DEVIL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES} gzstream AntTweakBar openctm)

Sylvain Thery's avatar
Sylvain Thery committed
7

Sylvain Thery's avatar
Sylvain Thery committed
8 9
#SET (CMAKE_BUILD_TYPE Debug)
SET(CMAKE_BUILD_TYPE Release)
Pierre Kraemer's avatar
Pierre Kraemer committed
10 11 12

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")

Sylvain Thery's avatar
Sylvain Thery committed
13 14 15 16 17 18 19
# FOR Qt4
FIND_PACKAGE(Qt4 REQUIRED)
SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})


Pierre Kraemer's avatar
Pierre Kraemer committed
20 21
# define includes path
include_directories(
Sylvain Thery's avatar
Sylvain Thery committed
22
	${CMAKE_CURRENT_BINARY_DIR}
Pierre Kraemer's avatar
Pierre Kraemer committed
23 24 25 26
	/usr/include/libxml2/
	${CGoGN_ROOT_DIR}/ThirdParty/gzstream
	${CGoGN_ROOT_DIR}/ThirdParty/OpenCTM
	${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include
27
	${CGoGN_ROOT_DIR}/ThirdParty/glm
Pierre Kraemer's avatar
Pierre Kraemer committed
28 29 30 31 32 33 34 35
	${CGoGN_ROOT_DIR}/include
)

# define libs path
link_directories(${CGoGN_ROOT_DIR}/lib/Release)

#define exec to compile

Sylvain Thery's avatar
Sylvain Thery committed
36 37
QT4_WRAP_CPP(tuto1_moc tuto1.h)
add_executable( tuto1 tuto1.cpp ${tuto1_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
38
target_link_libraries( tuto1
Sylvain Thery's avatar
Sylvain Thery committed
39
	container topology utils algo  ${COMMON_LIBS} ${QT_LIBRARIES})
Pierre Kraemer's avatar
Pierre Kraemer committed
40

Sylvain Thery's avatar
Sylvain Thery committed
41 42 43 44
QT4_WRAP_UI( tuto2_ui tuto2.ui )
QT4_WRAP_CPP(tuto2_moc tuto2.h)

add_executable( tuto2 tuto2.cpp tuto2.h ${tuto2_ui}  ${tuto2_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
45
target_link_libraries( tuto2
Sylvain Thery's avatar
Sylvain Thery committed
46
	container topology utils algo  ${COMMON_LIBS} ${QT_LIBRARIES} )
Pierre Kraemer's avatar
Pierre Kraemer committed
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66

add_executable( tuto3 tuto3.cpp)
target_link_libraries( tuto3
	container topology utils algo  ${COMMON_LIBS} )

add_executable( tuto4 tuto4.cpp)
target_link_libraries( tuto4
	container topology utils algo  ${COMMON_LIBS} )

add_executable( tuto5 tuto5.cpp)
target_link_libraries( tuto5
	container topology utils algo  ${COMMON_LIBS} )

add_executable( tuto_subdivision tuto_subdivision.cpp)
target_link_libraries( tuto_subdivision
	container topology utils algo  ${COMMON_LIBS} )

add_executable( tp_master tp_master.cpp)
target_link_libraries( tp_master
	container topology utils algo  ${COMMON_LIBS} )
Sylvain Thery's avatar
Sylvain Thery committed
67 68 69

add_executable( tuto_mt tuto_mt.cpp)
target_link_libraries( tuto_mt
70
	container topology utils algo ${COMMON_LIBS} boost_thread-mt)
71 72 73

add_executable( tuto_ogl3 tuto_ogl3.cpp)
target_link_libraries( tuto_ogl3
Sylvain Thery's avatar
Sylvain Thery committed
74
	container topology utils algo  ${COMMON_LIBS} )
75

76 77 78
add_executable( tuto_ogl2 tuto_ogl2.cpp)
target_link_libraries( tuto_ogl2
	container topology utils algo  ${COMMON_LIBS} )