CMakeLists.txt 2.51 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

8 9
SET (CMAKE_BUILD_TYPE Debug)

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
	${CGoGN_ROOT_DIR}/include
)

31

Pierre Kraemer's avatar
Pierre Kraemer committed
32
# define libs path
33
link_directories(${CGoGN_ROOT_DIR}/lib/Release ${CGoGN_ROOT_DIR}/lib/Debug)
Pierre Kraemer's avatar
Pierre Kraemer committed
34 35 36

#define exec to compile

Sylvain Thery's avatar
Sylvain Thery committed
37 38
QT4_WRAP_CPP(tuto1_moc tuto1.h)
add_executable( tuto1 tuto1.cpp ${tuto1_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
39
target_link_libraries( tuto1
40
	${CGoGN_LIBS_D}  ${COMMON_LIBS} ${QT_LIBRARIES} gl2ps)
Pierre Kraemer's avatar
Pierre Kraemer committed
41

Sylvain Thery's avatar
Sylvain Thery committed
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
46
	${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} )
Pierre Kraemer's avatar
Pierre Kraemer committed
47

48 49
QT4_WRAP_CPP(tuto3_moc tuto3.h)
add_executable( tuto3 tuto3.cpp ${tuto3_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
50
target_link_libraries( tuto3
51
	${CGoGN_LIBS_D} ${COMMON_LIBS}  ${QT_LIBRARIES})
Pierre Kraemer's avatar
Pierre Kraemer committed
52

53 54 55
QT4_WRAP_UI( tuto4_ui tuto4.ui )
QT4_WRAP_CPP(tuto4_moc tuto4.h)
add_executable( tuto4 tuto4.cpp ${tuto4_ui} ${tuto4_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
56
target_link_libraries( tuto4
57
	${CGoGN_LIBS_D}  ${COMMON_LIBS}  ${QT_LIBRARIES} )
Pierre Kraemer's avatar
Pierre Kraemer committed
58

59 60 61
QT4_WRAP_UI( tuto5_ui tuto5.ui )
QT4_WRAP_CPP(tuto5_moc tuto5.h)
add_executable( tuto5 tuto5.cpp ${tuto5_ui} ${tuto5_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
62
target_link_libraries( tuto5
63
	${CGoGN_LIBS_D}  ${COMMON_LIBS}  ${QT_LIBRARIES} )
Pierre Kraemer's avatar
Pierre Kraemer committed
64 65 66

add_executable( tuto_subdivision tuto_subdivision.cpp)
target_link_libraries( tuto_subdivision
67
	${CGoGN_LIBS_D}  ${COMMON_LIBS} )
Pierre Kraemer's avatar
Pierre Kraemer committed
68

69 70
QT4_WRAP_CPP(tp_master_moc tp_master.h)
add_executable( tp_master tp_master.cpp ${tp_master_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
71
target_link_libraries( tp_master
72
	${CGoGN_LIBS_D}  ${COMMON_LIBS}  ${QT_LIBRARIES} )
Sylvain Thery's avatar
Sylvain Thery committed
73

74 75
QT4_WRAP_CPP(tuto_mt_moc tuto_mt.h)
add_executable( tuto_mt tuto_mt.cpp  ${tuto_mt_moc})
Sylvain Thery's avatar
Sylvain Thery committed
76
target_link_libraries( tuto_mt
77
	${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES}  boost_thread-mt)
78

Sylvain Thery's avatar
Sylvain Thery committed
79 80
QT4_WRAP_CPP(tuto_ogl3_moc tuto_ogl3.h)
add_executable( tuto_ogl3 tuto_ogl3.cpp ${tuto_ogl3_moc})
81
target_link_libraries( tuto_ogl3
82
	${CGoGN_LIBS_D}  ${COMMON_LIBS} ${QT_LIBRARIES} )
83

84 85
add_executable( tuto_ogl2 tuto_ogl2.cpp)
target_link_libraries( tuto_ogl2
86
	${CGoGN_LIBS_D}  ${COMMON_LIBS} )