CMakeLists.txt 2.39 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 3 4

project(Tutos)

Sylvain Thery's avatar
Sylvain Thery committed
5

6
SET (CMAKE_BUILD_TYPE Debug)
Pierre Kraemer's avatar
Pierre Kraemer committed
7 8
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")

Sylvain Thery's avatar
Sylvain Thery committed
9 10


Pierre Kraemer's avatar
Pierre Kraemer committed
11
include_directories(
Sylvain Thery's avatar
Sylvain Thery committed
12
	${CMAKE_CURRENT_BINARY_DIR}
Pierre Kraemer's avatar
Pierre Kraemer committed
13
	${CGoGN_ROOT_DIR}/include
Sylvain Thery's avatar
Sylvain Thery committed
14
	${CGoGN_EXT_INCLUDES}
Pierre Kraemer's avatar
Pierre Kraemer committed
15 16 17
)

# define libs path
thery's avatar
thery committed
18
IF(WIN32)
19
	link_directories(${CGoGN_ROOT_DIR}/lib/$(ConfigurationName) ${Boost_LIBRARY_DIRS})
thery's avatar
thery committed
20 21 22 23 24
ELSE(WIN32)
	link_directories(${CGoGN_ROOT_DIR}/lib/Release ${CGoGN_ROOT_DIR}/lib/Debug)
ENDIF(WIN32)


Pierre Kraemer's avatar
Pierre Kraemer committed
25 26
#define exec to compile

Sylvain Thery's avatar
Sylvain Thery committed
27 28
QT4_WRAP_CPP(tuto1_moc tuto1.h)
add_executable( tuto1 tuto1.cpp ${tuto1_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
29
target_link_libraries( tuto1
Sylvain Thery's avatar
Sylvain Thery committed
30
	${CGoGN_LIBS_D}  ${CGoGN_EXT_LIBS} )
Pierre Kraemer's avatar
Pierre Kraemer committed
31

Sylvain Thery's avatar
Sylvain Thery committed
32 33 34
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
35
target_link_libraries( tuto2
Sylvain Thery's avatar
Sylvain Thery committed
36
	${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
Pierre Kraemer's avatar
Pierre Kraemer committed
37

38 39
QT4_WRAP_CPP(tuto3_moc tuto3.h)
add_executable( tuto3 tuto3.cpp ${tuto3_moc})
Pierre Kraemer's avatar
Pierre Kraemer committed
40
target_link_libraries( tuto3
Sylvain Thery's avatar
Sylvain Thery committed
41
	${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
Pierre Kraemer's avatar
Pierre Kraemer committed
42

43 44 45
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
46
target_link_libraries( tuto4
Sylvain Thery's avatar
Sylvain Thery committed
47
	${CGoGN_LIBS_D}  ${CGoGN_EXT_LIBS}  )
Pierre Kraemer's avatar
Pierre Kraemer committed
48

49 50 51
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
52
target_link_libraries( tuto5
Sylvain Thery's avatar
Sylvain Thery committed
53
	${CGoGN_LIBS_D}  ${CGoGN_EXT_LIBS}  )
Pierre Kraemer's avatar
Pierre Kraemer committed
54

untereiner's avatar
untereiner committed
55

Sylvain Thery's avatar
Sylvain Thery committed
56 57
#add_executable( tuto_subdivision tuto_subdivision.cpp)
#target_link_libraries( tuto_subdivision
Sylvain Thery's avatar
Sylvain Thery committed
58
#	${CGoGN_LIBS_D}  ${CGoGN_EXT_LIBS} )
Pierre Kraemer's avatar
Pierre Kraemer committed
59

60 61
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
62
target_link_libraries( tp_master
Sylvain Thery's avatar
Sylvain Thery committed
63
	${CGoGN_LIBS_D}  ${CGoGN_EXT_LIBS}  )
Sylvain Thery's avatar
Sylvain Thery committed
64

65 66 67
#BOOST_LIBS macro: allow using compiled boost in windows (see readme)
# -first argument variable that will contain the libs
# -second argument list of boost libs separated by ; in " "
68
# exemple: BOOST_LIBS(boost_lib_lists "boost_thread-mt;boost_iostreams-mt")
Sylvain Thery's avatar
Sylvain Thery committed
69 70
#BOOST_LIBS(boost_lib_lists "boost_thread-mt")

71

72 73
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
74
target_link_libraries( tuto_mt
Sylvain Thery's avatar
Sylvain Thery committed
75
	${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ${Boost_THREAD_LIBRARY})
Sylvain Thery's avatar
Sylvain Thery committed
76

77

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

untereiner's avatar
untereiner committed
83 84


Sylvain Thery's avatar
Sylvain Thery committed
85 86
#add_executable( tuto_ogl2 tuto_ogl2.cpp)
#target_link_libraries( tuto_ogl2
Sylvain Thery's avatar
Sylvain Thery committed
87
#	${CGoGN_LIBS_D}  ${CGoGN_EXT_LIBS} )